]> git.pld-linux.org Git - packages/rpmlint.git/blame - rpmlint.spec
up to 1.5; project sources in sourceforge now
[packages/rpmlint.git] / rpmlint.spec
CommitLineData
f021bddd
ER
1#
2# Conditional build:
3%bcond_without tests # build without tests
4
a8e9a8e0 5Summary: Tool for checking common errors in RPM packages
c502a620 6Name: rpmlint
3fbd9f80
ER
7Version: 1.5
8Release: 1
b0a00fa5 9License: GPL v2
c502a620 10Group: Development/Building
3fbd9f80
ER
11Source0: http://downloads.sourceforge.net/rpmlint/%{name}-%{version}.tar.xz
12# Source0-md5: d7e82d97211ba0128ef864c7eac2fab8
f021bddd
ER
13Source1: %{name}.config
14Source3: %{name}-etc.config
cc5a0c30 15Patch0: %{name}-groups.patch
18f9b171 16Patch1: pythonpath.patch
0cb3fb55 17Patch2: %{name}-licenses.patch
88c94542
JR
18Patch3: postshell.patch
19Patch4: rpm5.patch
1f50ca43 20Patch5: bash-completion.patch
a8e9a8e0 21URL: http://rpmlint.zarb.org/
99ee1f6f 22BuildRequires: python >= 1.5.2
f7da4619 23BuildRequires: python-modules
f1e83b32 24BuildRequires: python-rpm >= 5.4.10-12
f7da4619 25BuildRequires: rpm-pythonprov
e92cd3fd
ER
26BuildRequires: tar >= 1:1.22
27BuildRequires: xz
99ee1f6f
JB
28Requires: /bin/bash
29Requires: /lib/cpp
30Requires: binutils
a8e9a8e0 31Requires: bzip2
99ee1f6f 32Requires: cpio
a8e9a8e0 33Requires: desktop-file-utils
99ee1f6f
JB
34Requires: file
35Requires: findutils
36Requires: grep
a8e9a8e0 37Requires: gzip
9fef494b 38Requires: python >= 1.5.2
a8e9a8e0
ER
39Requires: python-magic
40Requires: python-pyenchant
f1e83b32 41Requires: python-rpm >= 5.4.10-12
a8e9a8e0 42Requires: xz
c502a620 43BuildArch: noarch
99ee1f6f 44BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
c502a620 45
46%description
47Rpmlint is a tool to check common errors on rpm packages. Binary and
48source packages can be checked.
49
6cf0c67a
JR
50%description -l pl.UTF-8
51rpmlint to narzędzie do sprawdzania pakietów RPM pod kątem często
52występujących błędów. Można sprawdzać pakiety źródłowe i binarne.
99ee1f6f 53
a8e9a8e0
ER
54%package -n bash-completion-%{name}
55Summary: bash-completion for rpmlint
56Group: Applications/Shells
57Requires: %{name} = %{version}-%{release}
58Requires: bash-completion
59
60%description -n bash-completion-%{name}
61bash-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
72cp -p config config.example
73cp -p %{SOURCE3} config
74
8f0b3aa9
ER
75mv %{name} %{name}.py
76%{__sed} -i -e 's,python ./rpmlint,./rpmlint.py,' test.sh
77
78cat <<'EOF' > %{name}
7eff95a4
ER
79#!/bin/sh
80exec python -tt -u -O %{py_sitescriptdir}/%{name}/rpmlint.pyc "$@"
81EOF
82touch __init__.py
c502a620 83
84%build
a8e9a8e0
ER
85# Create GROUPS for -groups.patch
86rpm --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
96rm -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 104install -p %{name} $RPM_BUILD_ROOT%{_bindir}/%{name}
7eff95a4 105install -d $RPM_BUILD_ROOT%{_datadir}/%{name}
a8e9a8e0 106cp -a GROUPS $RPM_BUILD_ROOT%{_datadir}/%{name}
f021bddd 107cp -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
114rm -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
This page took 0.135495 seconds and 4 git commands to generate.