3 %bcond_without tests # build without tests
5 Summary: Tool for checking common errors in RPM packages
10 Group: Development/Building
11 Source0: http://downloads.sourceforge.net/rpmlint/%{name}-%{version}.tar.xz
12 # Source0-md5: ad09ff960c7f3561af59f7886f3619ef
13 Source1: %{name}.config
14 Source3: %{name}-etc.config
15 Patch0: %{name}-groups.patch
16 Patch1: pythonpath.patch
17 Patch2: %{name}-licenses.patch
18 Patch3: postshell.patch
20 Patch5: bash-completion.patch
21 Patch6: revert-9f71923e.patch
22 URL: http://sourceforge.net/projects/rpmlint/
23 BuildRequires: python >= 1:2.6
24 BuildRequires: python-modules
25 BuildRequires: python-rpm >= 5.4.10-12
26 BuildRequires: rpm-pythonprov
27 BuildRequires: rpmbuild(macros) >= 1.673
28 BuildRequires: tar >= 1:1.22
35 Requires: desktop-file-utils
40 Requires: python >= 1.5.2
41 Requires: python-magic
42 Requires: python-pyenchant
43 Requires: python-rpm >= 5.4.10-12
46 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
49 Rpmlint is a tool to check common errors on rpm packages. Binary and
50 source packages can be checked.
52 %description -l pl.UTF-8
53 rpmlint to narzędzie do sprawdzania pakietów RPM pod kątem często
54 występujących błędów. Można sprawdzać pakiety źródłowe i binarne.
56 %package -n bash-completion-%{name}
57 Summary: bash-completion for rpmlint
58 Group: Applications/Shells
59 Requires: %{name} = %{version}-%{release}
60 Requires: bash-completion >= 2.0
62 %description -n bash-completion-%{name}
63 bash-completion for rpmlint.
75 cp -p config config.example
76 cp -p %{SOURCE3} config
79 %{__sed} -i -e 's,python ./rpmlint,./rpmlint.py,' test.sh
83 exec python -tt -u -O %{py_sitescriptdir}/%{name}/rpmlint.pyc "$@"
88 # Create GROUPS for -groups.patch
89 rpmnv=$(rpm -q rpm --qf '%{N}-%{V}')
90 gzip -dc "%{_docdir}/$rpmnv/groups.gz" | awk '/^[A-Z].*/ { print }' > GROUPS
94 bash_compdir=%{bash_compdir} \
102 rm -rf $RPM_BUILD_ROOT
104 ETCDIR=%{_sysconfdir} \
106 LIBDIR=%{py_sitescriptdir}/%{name} \
108 DESTDIR=$RPM_BUILD_ROOT
110 install -p %{name} $RPM_BUILD_ROOT%{_bindir}/%{name}
111 install -d $RPM_BUILD_ROOT%{_datadir}/%{name}
112 cp -p GROUPS $RPM_BUILD_ROOT%{_datadir}/%{name}
113 cp -p %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/%{name}/config
115 %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
116 %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
120 rm -rf $RPM_BUILD_ROOT
123 %defattr(644,root,root,755)
124 %doc ChangeLog README* config.example
125 %dir %{_sysconfdir}/rpmlint
126 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rpmlint/config
127 %attr(755,root,root) %{_bindir}/rpmdiff
128 %attr(755,root,root) %{_bindir}/rpmlint
129 %{_mandir}/man1/rpmdiff.1*
130 %{_mandir}/man1/rpmlint.1*
131 %dir %{_datadir}/%{name}
132 %{_datadir}/%{name}/GROUPS
133 %{_datadir}/%{name}/config
134 %dir %{py_sitescriptdir}/%{name}
135 %{py_sitescriptdir}/%{name}/*.py[co]
137 %files -n bash-completion-%{name}
138 %defattr(644,root,root,755)
139 %{bash_compdir}/rpmlint
140 %{bash_compdir}/rpmdiff