]>
Commit | Line | Data |
---|---|---|
f021bddd ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without tests # build without tests | |
4 | ||
a8e9a8e0 | 5 | Summary: Tool for checking common errors in RPM packages |
c502a620 | 6 | Name: rpmlint |
3fbd9f80 ER |
7 | Version: 1.5 |
8 | Release: 1 | |
b0a00fa5 | 9 | License: GPL v2 |
c502a620 | 10 | Group: Development/Building |
3fbd9f80 ER |
11 | Source0: http://downloads.sourceforge.net/rpmlint/%{name}-%{version}.tar.xz |
12 | # Source0-md5: d7e82d97211ba0128ef864c7eac2fab8 | |
f021bddd ER |
13 | Source1: %{name}.config |
14 | Source3: %{name}-etc.config | |
cc5a0c30 | 15 | Patch0: %{name}-groups.patch |
18f9b171 | 16 | Patch1: pythonpath.patch |
0cb3fb55 | 17 | Patch2: %{name}-licenses.patch |
88c94542 JR |
18 | Patch3: postshell.patch |
19 | Patch4: rpm5.patch | |
1f50ca43 | 20 | Patch5: bash-completion.patch |
a8e9a8e0 | 21 | URL: http://rpmlint.zarb.org/ |
99ee1f6f | 22 | BuildRequires: python >= 1.5.2 |
f7da4619 | 23 | BuildRequires: python-modules |
f1e83b32 | 24 | BuildRequires: python-rpm >= 5.4.10-12 |
f7da4619 | 25 | BuildRequires: rpm-pythonprov |
e92cd3fd ER |
26 | BuildRequires: tar >= 1:1.22 |
27 | BuildRequires: xz | |
99ee1f6f JB |
28 | Requires: /bin/bash |
29 | Requires: /lib/cpp | |
30 | Requires: binutils | |
a8e9a8e0 | 31 | Requires: bzip2 |
99ee1f6f | 32 | Requires: cpio |
a8e9a8e0 | 33 | Requires: desktop-file-utils |
99ee1f6f JB |
34 | Requires: file |
35 | Requires: findutils | |
36 | Requires: grep | |
a8e9a8e0 | 37 | Requires: gzip |
9fef494b | 38 | Requires: python >= 1.5.2 |
a8e9a8e0 ER |
39 | Requires: python-magic |
40 | Requires: python-pyenchant | |
f1e83b32 | 41 | Requires: python-rpm >= 5.4.10-12 |
a8e9a8e0 | 42 | Requires: xz |
c502a620 | 43 | BuildArch: noarch |
99ee1f6f | 44 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
c502a620 | 45 | |
46 | %description | |
47 | Rpmlint is a tool to check common errors on rpm packages. Binary and | |
48 | source packages can be checked. | |
49 | ||
6cf0c67a JR |
50 | %description -l pl.UTF-8 |
51 | rpmlint to narzędzie do sprawdzania pakietów RPM pod kątem często | |
52 | występujących błędów. Można sprawdzać pakiety źródłowe i binarne. | |
99ee1f6f | 53 | |
a8e9a8e0 ER |
54 | %package -n bash-completion-%{name} |
55 | Summary: bash-completion for rpmlint | |
56 | Group: Applications/Shells | |
57 | Requires: %{name} = %{version}-%{release} | |
58 | Requires: bash-completion | |
59 | ||
60 | %description -n bash-completion-%{name} | |
61 | bash-completion for rpmlint. | |
62 | ||
c502a620 | 63 | %prep |
64 | %setup -q | |
cc5a0c30 | 65 | %patch0 -p1 |
18f9b171 | 66 | %patch1 -p1 |
0cb3fb55 | 67 | %patch2 -p1 |
706415a2 | 68 | %patch3 -p1 |
7eff95a4 | 69 | %patch4 -p1 |
4fafb4fa | 70 | %patch5 -p1 |
7eff95a4 | 71 | |
f021bddd ER |
72 | cp -p config config.example |
73 | cp -p %{SOURCE3} config | |
74 | ||
8f0b3aa9 ER |
75 | mv %{name} %{name}.py |
76 | %{__sed} -i -e 's,python ./rpmlint,./rpmlint.py,' test.sh | |
77 | ||
78 | cat <<'EOF' > %{name} | |
7eff95a4 ER |
79 | #!/bin/sh |
80 | exec python -tt -u -O %{py_sitescriptdir}/%{name}/rpmlint.pyc "$@" | |
81 | EOF | |
82 | touch __init__.py | |
c502a620 | 83 | |
84 | %build | |
a8e9a8e0 ER |
85 | # Create GROUPS for -groups.patch |
86 | rpm --qf '%{_docdir}/%{N}-%{V}/groups.gz' -q rpm | xargs gzip -dc | awk '/^[A-Z].*/ { print }' > GROUPS | |
87 | ||
88 | %{__make} \ | |
89 | COMPILE_PYC=1 | |
c502a620 | 90 | |
f021bddd ER |
91 | %if %{with tests} |
92 | %{__make} check | |
93 | %endif | |
94 | ||
c502a620 | 95 | %install |
96 | rm -rf $RPM_BUILD_ROOT | |
97 | %{__make} install \ | |
a8e9a8e0 ER |
98 | ETCDIR=%{_sysconfdir} \ |
99 | MANDIR=%{_mandir} \ | |
7eff95a4 | 100 | LIBDIR=%{py_sitescriptdir}/%{name} \ |
a8e9a8e0 | 101 | BINDIR=%{_bindir} \ |
c502a620 | 102 | DESTDIR=$RPM_BUILD_ROOT |
103 | ||
8f0b3aa9 | 104 | install -p %{name} $RPM_BUILD_ROOT%{_bindir}/%{name} |
7eff95a4 | 105 | install -d $RPM_BUILD_ROOT%{_datadir}/%{name} |
a8e9a8e0 | 106 | cp -a GROUPS $RPM_BUILD_ROOT%{_datadir}/%{name} |
f021bddd | 107 | cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/%{name}/config |
a8e9a8e0 | 108 | |
7eff95a4 ER |
109 | %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir} |
110 | %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir} | |
111 | %py_postclean | |
a8e9a8e0 | 112 | |
c502a620 | 113 | %clean |
114 | rm -rf $RPM_BUILD_ROOT | |
115 | ||
116 | %files | |
117 | %defattr(644,root,root,755) | |
3fbd9f80 | 118 | %doc ChangeLog README* config.example |
7eff95a4 ER |
119 | %dir %{_sysconfdir}/rpmlint |
120 | %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/rpmlint/config | |
a8e9a8e0 ER |
121 | %attr(755,root,root) %{_bindir}/rpmdiff |
122 | %attr(755,root,root) %{_bindir}/rpmlint | |
123 | %{_mandir}/man1/rpmlint.1* | |
f021bddd ER |
124 | %dir %{_datadir}/%{name} |
125 | %{_datadir}/%{name}/GROUPS | |
126 | %{_datadir}/%{name}/config | |
127 | %dir %{py_sitescriptdir}/%{name} | |
128 | %{py_sitescriptdir}/%{name}/*.py[co] | |
a8e9a8e0 ER |
129 | |
130 | %files -n bash-completion-%{name} | |
131 | %defattr(644,root,root,755) | |
1f50ca43 | 132 | /etc/bash_completion.d/rpmlint |