5 Summary: Rpm correctness checker
6 Url: http://rpmlint.zarb.org/
7 Group: Development/Packaging
8 Source0: http://rpmlint.zarb.org/download/rpmlint-%{version}.tar.bz2
9 Source1: rpmlint-checks-master.tar.gz
11 Source10: rpmgroups.config
13 Source12: licenses.config
14 Source100: syntax-validator.py
15 Source1001: rpmlint.manifest
16 BuildRequires: python-rpm
18 Requires: /usr/bin/readelf
22 Requires: desktop-file-utils
25 Requires: python-magic
30 Rpmlint is a tool to check common errors on rpm packages. Binary and
31 source packages can be checked.
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 .
46 # the provided bash-completion does not work and only prints bash errors
47 rm -rf %{buildroot}%{_sysconfdir}/bash_completion.d
48 mv %{buildroot}%{_sysconfdir}/rpmlint/config %{buildroot}%{_datadir}/rpmlint/config
49 head -n 8 %{buildroot}%{_datadir}/rpmlint/config > %{buildroot}%{_sysconfdir}/rpmlint/config
50 # make sure that the package is sane
51 python -tt %{SOURCE100} %{buildroot}%{_datadir}/rpmlint/*.py %{buildroot}%{_datadir}/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)
63 %config(noreplace) %{_sysconfdir}/rpmlint/config
64 %config(noreplace) %{_sysconfdir}/rpmlint/licenses.config
65 %config %{_sysconfdir}/rpmlint/rpmgroups.config
66 %config %{_sysconfdir}/rpmlint/pie.config
67 %dir %{_sysconfdir}/rpmlint
68 %doc %{_mandir}/man1/rpmlint.1.gz