]> git.pld-linux.org Git - packages/rpmlint.git/blob - rpmlint.spec
up to 1.7
[packages/rpmlint.git] / rpmlint.spec
1 #
2 # Conditional build:
3 %bcond_without  tests           # build without tests
4
5 Summary:        Tool for checking common errors in RPM packages
6 Name:           rpmlint
7 Version:        1.7
8 Release:        1
9 License:        GPL v2
10 Group:          Development/Building
11 Source0:        http://downloads.sourceforge.net/rpmlint/%{name}-%{version}.tar.xz
12 # Source0-md5:  0b78c2fa4a98c6f660003a679ad6ea90
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
19 Patch4:         rpm5.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
29 BuildRequires:  xz
30 Requires:       /bin/bash
31 Requires:       /lib/cpp
32 Requires:       binutils
33 Requires:       bzip2
34 Requires:       cpio
35 Requires:       desktop-file-utils
36 Requires:       file
37 Requires:       findutils
38 Requires:       grep
39 Requires:       gzip
40 Requires:       python >= 1.5.2
41 Requires:       python-magic
42 Requires:       python-pyenchant
43 Requires:       python-rpm >= 5.4.10-12
44 Requires:       xz
45 BuildArch:      noarch
46 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
47
48 %description
49 Rpmlint is a tool to check common errors on rpm packages. Binary and
50 source packages can be checked.
51
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.
55
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
61
62 %description -n bash-completion-%{name}
63 bash-completion for rpmlint.
64
65 %prep
66 %setup -q
67 %patch0 -p1
68 %patch1 -p1
69 %patch2 -p1
70 %patch3 -p1
71 %patch4 -p1
72 %patch5 -p1
73 %patch6 -p1
74
75 cp -p config config.example
76 cp -p %{SOURCE3} config
77
78 mv %{name} %{name}.py
79 %{__sed} -i -e 's,python ./rpmlint,./rpmlint.py,' test.sh
80
81 cat <<'EOF' > %{name}
82 #!/bin/sh
83 exec python -tt -u -O %{py_sitescriptdir}/%{name}/rpmlint.pyc "$@"
84 EOF
85 touch __init__.py
86
87 %build
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
91 test -s GROUPS
92
93 %{__make} \
94         bash_compdir=%{bash_compdir} \
95         COMPILE_PYC=1
96
97 %if %{with tests}
98 %{__make} check
99 %endif
100
101 %install
102 rm -rf $RPM_BUILD_ROOT
103 %{__make} install \
104         ETCDIR=%{_sysconfdir} \
105         MANDIR=%{_mandir} \
106         LIBDIR=%{py_sitescriptdir}/%{name} \
107         BINDIR=%{_bindir} \
108         DESTDIR=$RPM_BUILD_ROOT
109
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
114
115 %py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
116 %py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
117 %py_postclean
118
119 %clean
120 rm -rf $RPM_BUILD_ROOT
121
122 %files
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]
136
137 %files -n bash-completion-%{name}
138 %defattr(644,root,root,755)
139 %{bash_compdir}/rpmlint
140 %{bash_compdir}/rpmdiff
This page took 0.170053 seconds and 3 git commands to generate.