]> git.pld-linux.org Git - packages/rpmlint.git/blame - rpmlint.spec
- remaining pl
[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
3f2e0c60 6Summary(pl.UTF-8): Narzędzie do sprawdzania pakietów RPM pod kątem częstych błędów
c502a620 7Name: rpmlint
6d06987b 8Version: 1.7
d51dcadb 9Release: 2
b0a00fa5 10License: GPL v2
c502a620 11Group: Development/Building
3fbd9f80 12Source0: http://downloads.sourceforge.net/rpmlint/%{name}-%{version}.tar.xz
6d06987b 13# Source0-md5: 0b78c2fa4a98c6f660003a679ad6ea90
f021bddd
ER
14Source1: %{name}.config
15Source3: %{name}-etc.config
cc5a0c30 16Patch0: %{name}-groups.patch
18f9b171 17Patch1: pythonpath.patch
0cb3fb55 18Patch2: %{name}-licenses.patch
88c94542
JR
19Patch3: postshell.patch
20Patch4: rpm5.patch
1f50ca43 21Patch5: bash-completion.patch
f5b2d519 22Patch6: revert-9f71923e.patch
545215d1 23URL: http://sourceforge.net/projects/rpmlint/
21e8a795 24BuildRequires: python >= 1:2.6
f7da4619 25BuildRequires: python-modules
47a5242e 26%{?with_tests:BuildRequires: python-rpm >= 5.4.10-12}
f7da4619 27BuildRequires: rpm-pythonprov
545215d1 28BuildRequires: rpmbuild(macros) >= 1.673
3f2e0c60
JB
29# tests require rpmlint in installed packages database
30%{?with_tests:BuildRequires: rpmlint}
e92cd3fd
ER
31BuildRequires: tar >= 1:1.22
32BuildRequires: xz
99ee1f6f
JB
33Requires: /bin/bash
34Requires: /lib/cpp
35Requires: binutils
a8e9a8e0 36Requires: bzip2
99ee1f6f 37Requires: cpio
a8e9a8e0 38Requires: desktop-file-utils
99ee1f6f
JB
39Requires: file
40Requires: findutils
41Requires: grep
a8e9a8e0 42Requires: gzip
9fef494b 43Requires: python >= 1.5.2
a8e9a8e0
ER
44Requires: python-magic
45Requires: python-pyenchant
f1e83b32 46Requires: python-rpm >= 5.4.10-12
a8e9a8e0 47Requires: xz
c502a620 48BuildArch: noarch
99ee1f6f 49BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
c502a620 50
51%description
52Rpmlint is a tool to check common errors on rpm packages. Binary and
53source packages can be checked.
54
6cf0c67a
JR
55%description -l pl.UTF-8
56rpmlint to narzędzie do sprawdzania pakietów RPM pod kątem często
57występujących błędów. Można sprawdzać pakiety źródłowe i binarne.
99ee1f6f 58
a8e9a8e0
ER
59%package -n bash-completion-%{name}
60Summary: bash-completion for rpmlint
3f2e0c60 61Summary(pl.UTF-8): Bashowe uzupełnianie parametrów dla polecenia rpmlint
a8e9a8e0
ER
62Group: Applications/Shells
63Requires: %{name} = %{version}-%{release}
545215d1 64Requires: bash-completion >= 2.0
a8e9a8e0
ER
65
66%description -n bash-completion-%{name}
67bash-completion for rpmlint.
68
3f2e0c60
JB
69%description -n bash-completion-%{name} -l pl.UTF-8
70Bashowe 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
82cp -p config config.example
83cp -p %{SOURCE3} config
84
8f0b3aa9
ER
85mv %{name} %{name}.py
86%{__sed} -i -e 's,python ./rpmlint,./rpmlint.py,' test.sh
87
88cat <<'EOF' > %{name}
7eff95a4
ER
89#!/bin/sh
90exec python -tt -u -O %{py_sitescriptdir}/%{name}/rpmlint.pyc "$@"
91EOF
92touch __init__.py
c502a620 93
94%build
a8e9a8e0 95# Create GROUPS for -groups.patch
07c5699d
ER
96rpmnv=$(rpm -q rpm --qf '%{N}-%{V}')
97gzip -dc "%{_docdir}/$rpmnv/groups.gz" | awk '/^[A-Z].*/ { print }' > GROUPS
98test -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
109rm -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 118install -p %{name} $RPM_BUILD_ROOT%{_bindir}/%{name}
7eff95a4 119install -d $RPM_BUILD_ROOT%{_datadir}/%{name}
545215d1
ER
120cp -p GROUPS $RPM_BUILD_ROOT%{_datadir}/%{name}
121cp -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
128rm -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
This page took 0.079291 seconds and 4 git commands to generate.