Blob Blame History Raw
Name:           krazy2
Version:        2.6
Release:        4.20080918svn862357%{?dist}
Summary:        Krazy is a tool for checking code against the KDE coding guidelines

Group:          Development/Libraries
License:        GPLv2+
URL:            http://techbase.kde.org/Development/Tutorials/Code_Checking
# The source for this package was pulled from upstream's vcs.  Use the
# following commands to generate the tarball:
#  svn export -r 862357 svn://anonsvn.kde.org/home/kde/trunk/quality/krazy2 krazy2-2.6
#  tar -c krazy2-2.6 | bzip2 --best -c > krazy2-2.6.tar.bz2
Source0:        krazy2-%{version}.tar.bz2
Patch0:         krazy2-passbyvalue-libsuffix.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

BuildRequires:  groff
BuildRequires:  perl(ExtUtils::MakeMaker)
BuildRequires:  perl(HTML::Parser)
BuildRequires:  perl(Tie::IxHash)
BuildRequires:  perl(XML::LibXML)
BuildRequires:  qt4-devel
Requires:       perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo $version))
Requires:       desktop-file-utils

%description
Krazy scans KDE source code looking for issues that should be fixed
for reasons of policy, good coding practice, optimization, or any other
good reason.


%prep
%setup -q
%patch0


%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
make
pushd src/passbyvalue
%{_qt4_qmake}
make %{?_smp_mflags}
popd


%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=%{buildroot} PREFIX=%{_prefix} install
chmod 0755 %{buildroot}%{_bindir}/krazy2{,all,ebn}
pushd helpers
make DESTDIR=%{buildroot} PREFIX=%{_prefix} \
    %if "%{_lib}" == "lib64"
        LIBSUFFIX=64 \
    %endif
    install
popd
pushd plugins
make PREFIX=%{buildroot}%{_prefix} \
    %if "%{_lib}" == "lib64"
        LIBSUFFIX=64 \
    %endif
    install
popd
pushd extras
make DESTDIR=%{buildroot} PREFIX=%{_prefix} \
    %if "%{_lib}" == "lib64"
        LIBSUFFIX=64 \
    %endif
    install
popd
pushd src/passbyvalue
make INSTALL_ROOT=%{buildroot}%{_prefix} \
    %if "%{_lib}" == "lib64"
        LIBSUFFIX=64 \
    %endif
    install
popd
pushd share
mkdir -p %{buildroot}%{_datadir}/dtd
install -m 644 -p kpartgui.dtd %{buildroot}%{_datadir}/dtd/kpartgui.dtd
install -m 644 -p kcfg.dtd %{buildroot}%{_datadir}/dtd/kcfg.dtd
popd
pushd doc
make DESTDIR=%{buildroot}%{_mandir} install
popd
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} ';'
find $RPM_BUILD_ROOT -type f -name perllocal.pod -exec rm -f {} ';'
find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null ';'
# chmod -R ug+w %{buildroot}%{_bindir}
# chmod -R ug+w %{buildroot}%{_libdir}


%check


%clean
rm -rf $RPM_BUILD_ROOT


%files
%defattr(-,root,root,-)
%doc COPYING README
%{_mandir}/man1/krazy2.1.gz
%{_mandir}/man1/krazy2all.1.gz
%{_mandir}/man1/krazy2ebn.1.gz
%{_mandir}/man5/krazyrc.5.gz
%{_bindir}/krazy2
%{_bindir}/krazy2all
%{_bindir}/krazy2ebn
%{_libdir}/krazy2
%{_datadir}/dtd
%{perl_vendorlib}/Krazy


%changelog
* Thu Sep 18 2008 Ben Boeckel <MathStuf@gmail.com> 2.6-4.20080918svn862357
- Updated SVN
- Spec file cleaned up

* Thu Sep 18 2008 Ben Boeckel <MathStuf@gmail.com> 2.6-3
- Fixed where the plugins get installed to

* Wed Sep 17 2008 Ben Boeckel <MathStuf@gmail.com> 2.6-2
- Fixed the rpmlint errors

* Wed Sep 17 2008 Ben Boeckel <MathStuf@gmail.com> 2.6-1
- Fixed the spec file up

* Wed May 21 2008 Ben Boeckel <MathStuf@gmail.com> 1.11-1
- Created