2 BuildRequires: python-rpm
4 Summary: Rpm correctness checker
6 Group: Development/Packaging
9 Source0: http://rpmlint.zarb.org/download/rpmlint-%{version}.tar.bz2
10 Source1: rpmlint-checks-master.tar.gz
12 Source10: rpmgroups.config
14 Source12: licenses.config
15 Source100: syntax-validator.py
16 Url: http://rpmlint.zarb.org/
17 Requires: /usr/bin/readelf
21 Requires: desktop-file-utils
24 Requires: python-magic
29 Rpmlint is a tool to check common errors on rpm packages. Binary and
30 source packages can be checked.
31 Source1001: rpmlint.manifest
34 %setup -q -n rpmlint-%{version} -a1
37 # Only move top-level python files
38 chmod 0755 rpmlint-checks-master/*.py
39 mv rpmlint-checks-master/*.py .
45 make install DESTDIR=$RPM_BUILD_ROOT
46 # the provided bash-completion does not work and only prints bash errors
47 rm -rf $RPM_BUILD_ROOT/etc/bash_completion.d
48 mv $RPM_BUILD_ROOT/etc/rpmlint/config $RPM_BUILD_ROOT/usr/share/rpmlint/config
49 head -n 8 $RPM_BUILD_ROOT/usr/share/rpmlint/config > $RPM_BUILD_ROOT/etc/rpmlint/config
50 # make sure that the package is sane
51 python -tt %{SOURCE100} $RPM_BUILD_ROOT/usr/share/rpmlint/*.py $RPM_BUILD_ROOT/usr/share/rpmlint/config
52 %__install -m 644 %{SOURCE10} %{buildroot}/%{_sysconfdir}/rpmlint/
53 %__install -m 644 %{SOURCE11} %{buildroot}/%{_sysconfdir}/rpmlint/
54 %__install -m 644 %{SOURCE12} %{buildroot}/%{_sysconfdir}/rpmlint/
58 %manifest %{name}.manifest
59 %defattr(-,root,root,0755)
62 %{_prefix}/share/rpmlint
63 %config(noreplace) /etc/rpmlint/config
64 %config(noreplace) /etc/rpmlint/licenses.config
65 %config %{_sysconfdir}/rpmlint/rpmgroups.config
66 %config %{_sysconfdir}/rpmlint/pie.config
68 %doc /usr/share/man/man1/rpmlint.1.gz