]>
Commit | Line | Data |
---|---|---|
1 | %define rpm_macros_rev 1.469 | |
2 | %define find_lang_rev 1.32 | |
3 | Summary: PLD Linux RPM build macros | |
4 | Summary(pl.UTF-8): Makra do budowania pakietów RPM dla Linuksa PLD | |
5 | Name: rpm-build-macros | |
6 | Version: %{rpm_macros_rev} | |
7 | Release: 1 | |
8 | License: GPL | |
9 | Group: Development/Building | |
10 | Source0: rpm.macros | |
11 | Source1: service_generator.sh | |
12 | Source2: rpm-build.sh | |
13 | Source3: rpm-find-lang | |
14 | BuildRequires: rpm >= 4.4.9-56 | |
15 | Requires: findutils >= 1:4.2.26 | |
16 | Provides: rpmbuild(find_lang) = %{find_lang_rev} | |
17 | Provides: rpmbuild(macros) = %{rpm_macros_rev} | |
18 | Obsoletes: rpm-macros | |
19 | Conflicts: gettext-devel < 0.11 | |
20 | # tmpdir/_tmppath macros problems | |
21 | Conflicts: rpm < 4.4.9-52 | |
22 | # php-config --sysconfdir | |
23 | Conflicts: php-devel < 4:5.2.0-3 | |
24 | Conflicts: php4-devel < 3:4.4.4-10 | |
25 | %if "%{pld_release}" != "ac" | |
26 | # libtool --install | |
27 | Conflicts: libtool < 2:2.2 | |
28 | %endif | |
29 | BuildArch: noarch | |
30 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
31 | ||
32 | %define _rpmlibdir %{_prefix}/lib/rpm | |
33 | ||
34 | %description | |
35 | This package contains rpm build macros for PLD Linux. | |
36 | ||
37 | %description -l pl.UTF-8 | |
38 | Ten pakiet zawiera makra rpm-a do budowania pakietów dla Linuksa PLD. | |
39 | ||
40 | %prep | |
41 | %setup -qcT | |
42 | rev=$(awk '/^#.*Revision:.*Date/{print $3}' %{SOURCE0}) | |
43 | if [ "$rev" != "%rpm_macros_rev" ]; then | |
44 | : Update rpm_macros_rev define to $rev, and retry | |
45 | exit 1 | |
46 | fi | |
47 | rev=$(awk '/^#.*Id:.*/{print $4}' %{SOURCE3}) | |
48 | if [ "$rev" != "%find_lang_rev" ]; then | |
49 | : Update find_lang_rev define to $rev, and retry | |
50 | exit 1 | |
51 | fi | |
52 | cp %{SOURCE0} . | |
53 | ||
54 | %if "%{pld_release}" == "ac" | |
55 | %{__sed} -i -e '/libtoolize --copy --force --install/s/ --install//' rpm.macros | |
56 | %endif | |
57 | ||
58 | %install | |
59 | rm -rf $RPM_BUILD_ROOT | |
60 | install -d $RPM_BUILD_ROOT{%{_rpmlibdir},/etc/shrc.d} | |
61 | cp rpm.macros $RPM_BUILD_ROOT%{_rpmlibdir}/macros.build | |
62 | install %{SOURCE1} $RPM_BUILD_ROOT%{_rpmlibdir}/service_generator.sh | |
63 | install %{SOURCE2} $RPM_BUILD_ROOT/etc/shrc.d/rpm-build.sh | |
64 | install %{SOURCE3} $RPM_BUILD_ROOT%{_rpmlibdir}/find-lang.sh | |
65 | ||
66 | %clean | |
67 | rm -rf $RPM_BUILD_ROOT | |
68 | ||
69 | %files | |
70 | %defattr(644,root,root,755) | |
71 | %{_rpmlibdir}/macros.build | |
72 | %attr(755,root,root) %{_rpmlibdir}/service_generator.sh | |
73 | %attr(755,root,root) %{_rpmlibdir}/find-lang.sh | |
74 | /etc/shrc.d/rpm-build.sh |