Adapt groups and added more filters
[platform/upstream/rpmlint.git] / packaging / rpmlint.spec
1 Name:           rpmlint
2 Version:        1.4
3 Release:        0
4 License:        GPL-2.0+
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
10 Source2:        config
11 Source10:       rpmgroups.config
12 Source11:       pie.config
13 Source12:       licenses.config
14 Source100:      syntax-validator.py
15 Source1001:     rpmlint.manifest
16 BuildRequires:  python-rpm
17 BuildRequires:  xz
18 Requires:       /usr/bin/readelf
19 Requires:       bash
20 Requires:       cpio
21 Requires:       dash
22 Requires:       desktop-file-utils
23 Requires:       file
24 Requires:       findutils
25 Requires:       python-magic
26 Requires:       python-rpm
27 BuildArch:      noarch
28
29 %description
30 Rpmlint is a tool to check common errors on rpm packages. Binary and
31 source packages can be checked.
32
33 %prep
34 %setup -q -n rpmlint-%{version}  -a1
35 cp %{SOURCE1001} .
36 cp %{SOURCE2} .
37 # Only move top-level python files
38 chmod 0755 rpmlint-checks-master/*.py
39 mv rpmlint-checks-master/*.py .
40
41 %build
42 make %{?_smp_mflags}
43
44 %install
45 %make_install
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/
55
56
57 %files
58 %manifest %{name}.manifest
59 %defattr(-,root,root,0755)
60 %license COPYING
61 %{_bindir}/*
62 %{_datadir}/rpmlint
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
69