blob: 3f7f3841d8f8adcff570c990c47c6df40ed73764 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
Name: rpmlint
BuildRequires: python-rpm
BuildRequires: xz
Summary: Rpm correctness checker
License: GPL-2.0+
Group: System/Packages
Version: 1.4
Release: 0
Source0: http://rpmlint.zarb.org/download/rpmlint-%{version}.tar.bz2
Url: http://rpmlint.zarb.org/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: /usr/bin/readelf
Requires: bash
#Requires: checkbashisms
Requires: cpio
Requires: dash
Requires: desktop-file-utils
Requires: file
Requires: findutils
Requires: python-magic
Requires: python-rpm
BuildArch: noarch
%py_requires
%description
Rpmlint is a tool to check common errors on rpm packages. Binary and
source packages can be checked.
%prep
%setup -q -n rpmlint-%{version}
%build
make %{?_smp_mflags}
%install
make install DESTDIR=$RPM_BUILD_ROOT
# the provided bash-completion does not work and only prints bash errors
rm -rf $RPM_BUILD_ROOT/etc/bash_completion.d
mv $RPM_BUILD_ROOT/etc/rpmlint/config $RPM_BUILD_ROOT/usr/share/rpmlint/config
head -n 8 $RPM_BUILD_ROOT/usr/share/rpmlint/config > $RPM_BUILD_ROOT/etc/rpmlint/config
# make sure that the package is sane
#python -tt %{SOURCE100} $RPM_BUILD_ROOT/usr/share/rpmlint/*.py $RPM_BUILD_ROOT/usr/share/rpmlint/config
#%__install -m 644 %{SOURCE10} %{buildroot}/%{_sysconfdir}/rpmlint/
#%__install -m 644 %{SOURCE11} %{buildroot}/%{_sysconfdir}/rpmlint/
#cp %{SOURCE12} licenses.config
# note there is a tab character behind the -d, so don't copy&paste lightly
#cut '-d ' -f1 /usr/lib/obs/service/format_spec_file.files/licenses_changes.txt | tail -n +2 | sort -u | while read l; do
# sed -i -e "s/\(#VALIDLICENSES\)/\1\n '$l',/" licenses.config
#done
#%__install -m 644 licenses.config %{buildroot}/%{_sysconfdir}/rpmlint/
%clean
rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,0755)
%license COPYING
%{_prefix}/bin/*
%{_prefix}/share/rpmlint
%config(noreplace) /etc/rpmlint/config
#%config %{_sysconfdir}/rpmlint/rpmgroups.config
#%config %{_sysconfdir}/rpmlint/pie.config
#%config %{_sysconfdir}/rpmlint/licenses.config
%dir /etc/rpmlint
%doc /usr/share/man/man1/rpmlint.1.gz
|