]> git.pld-linux.org Git - packages/rpm-build-macros.git/blobdiff - rpm-build-macros.spec
- explictly close files opened in lua because implict closing happens too late this...
[packages/rpm-build-macros.git] / rpm-build-macros.spec
index ddef28339b1c0a168e9b1ee8459d520f31c41760..5faf7228f169b94d5f2cc21642dd1552187f5b1c 100644 (file)
@@ -1,5 +1,12 @@
-%define                rpm_macros_rev  1.652
-%define                find_lang_rev   1.35
+#
+# Conditional build:
+%bcond_with    rpm4    # prepare macros for PLD rpm 4.5 instead of rpm5
+#
+%if "%{pld_release}" == "ac"
+%define        with_rpm4       1
+%endif
+%define                rpm_macros_rev  1.667
+%define                find_lang_rev   1.36
 Summary:       PLD Linux RPM build macros
 Summary(pl.UTF-8):     Makra do budowania pakietów RPM dla Linuksa PLD
 Name:          rpm-build-macros
@@ -9,9 +16,10 @@ License:      GPL
 Group:         Development/Building
 Source0:       rpm.macros
 Source1:       service_generator.sh
-Source3:       rpm-find-lang
+Source3:       find-lang.sh
 Source4:       dokuwiki-find-lang.sh
 Patch0:                disable-systemd.patch
+Patch1:                rpm4.patch
 #Patchx: %{name}-pydebuginfo.patch
 BuildRequires: rpm >= 4.4.9-56
 BuildRequires: sed >= 4.0
@@ -54,9 +62,10 @@ cp -p %{SOURCE1} .
 %{__sed} -i -e '/libtoolize --copy --force --install/s/ --install//' rpm.macros
 %patch0 -p1
 %endif
+%{?with_rpm4:%patch1 -p1}
 
 %build
-%{__sed} -i -e 's,\$Revision\$,%{rpm_macros_rev},' rpm.macros
+%{__sed} -i -e 's,{Revision},%{rpm_macros_rev},' rpm.macros
 
 rev=$(awk '/^%%rpm_build_macros/{print $2}' rpm.macros)
 if [ "$rev" != "%rpm_macros_rev" ]; then
This page took 0.084577 seconds and 4 git commands to generate.