3 %bcond_without tests # build without tests
5 Summary: Tool for checking common errors in RPM packages
6 Summary(pl.UTF-8): Narzędzie do sprawdzania pakietów RPM pod kątem częstych błędów
11 Group: Development/Building
12 Source0: http://downloads.sourceforge.net/rpmlint/%{name}-%{version}.tar.xz
13 # Source0-md5: 0b78c2fa4a98c6f660003a679ad6ea90
14 Source1: %{name}.config
15 Source3: %{name}-etc.config
16 Patch0: %{name}-groups.patch
17 Patch1: pythonpath.patch
18 Patch2: %{name}-licenses.patch
19 Patch3: postshell.patch
21 Patch5: bash-completion.patch
22 Patch6: revert-9f71923e.patch
23 URL: http://sourceforge.net/projects/rpmlint/
24 BuildRequires: python >= 1:2.6
25 BuildRequires: python-modules
26 %{?with_tests:BuildRequires: python-rpm >= 5.4.10-12}
27 BuildRequires: rpm-pythonprov
28 BuildRequires: rpmbuild(macros) >= 1.673
29 # tests require rpmlint in installed packages database
30 %{?with_tests:BuildRequires: rpmlint}
31 BuildRequires: tar >= 1:1.22
38 Requires: desktop-file-utils
43 Requires: python >= 1.5.2
44 Requires: python-magic
45 Requires: python-pyenchant
46 Requires: python-rpm >= 5.4.10-12
49 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
52 Rpmlint is a tool to check common errors on rpm packages. Binary and
53 source packages can be checked.
55 %description -l pl.UTF-8
56 rpmlint to narzędzie do sprawdzania pakietów RPM pod kątem często
57 występujących błędów. Można sprawdzać pakiety źródłowe i binarne.
59 %package -n bash-completion-%{name}
60 Summary: bash-completion for rpmlint
61 Summary(pl.UTF-8): Bashowe uzupełnianie parametrów dla polecenia rpmlint
62 Group: Applications/Shells
63 Requires: %{name} = %{version}-%{release}
64 Requires: bash-completion >= 2.0
66 %description -n bash-completion-%{name}
67 bash-completion for rpmlint.
69 %description -n bash-completion-%{name} -l pl.UTF-8
70 Bashowe uzupełnianie parametrów dla polecenia rpmlint.
82 cp -p config config.example
83 cp -p %{SOURCE3} config
86 %{__sed} -i -e 's,python ./rpmlint,./rpmlint.py,' test.sh
90 exec python -tt -u -O %{py_sitescriptdir}/%{name}/rpmlint.pyc "$@"
95 # Create GROUPS for -groups.patch
96 rpmnv=$(rpm -q rpm --qf '%{N}-%{V}')
97 gzip -dc "%{_docdir}/$rpmnv/groups.gz" | awk '/^[A-Z].*/ { print }' > GROUPS
101 bash_compdir=%{bash_compdir} \
109 rm -rf $RPM_BUILD_ROOT
111 bash_compdir=%{bash_compdir} \
112 ETCDIR=%{_sysconfdir} \
114 LIBDIR=%{py_sitescriptdir}/%{name} \
116 DESTDIR=$RPM_BUILD_ROOT
118 install -p %{name} $RPM_BUILD_ROOT%{_bindir}/%{name}
119 install -d $RPM_BUILD_ROOT%{_datadir}/%{name}
120 cp -p GROUPS $RPM_BUILD_ROOT%{_datadir}/%{name}
121 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/%{name}/config
123 %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
124 %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
128 rm -rf $RPM_BUILD_ROOT
131 %defattr(644,root,root,755)
132 %doc ChangeLog README* config.example
133 %dir %{_sysconfdir}/rpmlint
134 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rpmlint/config
135 %attr(755,root,root) %{_bindir}/rpmdiff
136 %attr(755,root,root) %{_bindir}/rpmlint
137 %{_mandir}/man1/rpmdiff.1*
138 %{_mandir}/man1/rpmlint.1*
139 %dir %{_datadir}/%{name}
140 %{_datadir}/%{name}/GROUPS
141 %{_datadir}/%{name}/config
142 %dir %{py_sitescriptdir}/%{name}
143 %{py_sitescriptdir}/%{name}/*.py[co]
145 %files -n bash-completion-%{name}
146 %defattr(644,root,root,755)
147 %{bash_compdir}/rpmlint
148 %{bash_compdir}/rpmdiff