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