]> git.pld-linux.org Git - packages/rpm-build-macros.git/blobdiff - rpm-build-macros.spec
fetch tags before figuring out last tag
[packages/rpm-build-macros.git] / rpm-build-macros.spec
index ce95726ecf3b230dfc5e0e9f1f639c0c67eebc47..326b4f7961dac8b3ecde0fb087dc30cc6f181dc5 100644 (file)
@@ -1,10 +1,10 @@
-%define                rpm_macros_rev  1.648
+%define                rpm_macros_rev  1.650
 %define                find_lang_rev   1.35
 Summary:       PLD Linux RPM build macros
 Summary(pl.UTF-8):     Makra do budowania pakietów RPM dla Linuksa PLD
 Name:          rpm-build-macros
 Version:       %{rpm_macros_rev}
-Release:       1
+Release:       2
 License:       GPL
 Group:         Development/Building
 Source0:       rpm.macros
@@ -15,6 +15,7 @@ Source4:      dokuwiki-find-lang.sh
 Patch0:                disable-systemd.patch
 #Patchx: %{name}-pydebuginfo.patch
 BuildRequires: rpm >= 4.4.9-56
+BuildRequires: sed >= 4.0
 Requires:      findutils >= 1:4.2.26
 Provides:      rpmbuild(find_lang) = %{find_lang_rev}
 Provides:      rpmbuild(macros) = %{rpm_macros_rev}
@@ -56,12 +57,14 @@ cp -p %{SOURCE1} .
 %endif
 
 %build
-rev=$(awk '/^#.*Revision:.*Date/{print $3}' 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
        : Update rpm_macros_rev define to $rev, and retry
        exit 1
 fi
-rev=$(awk '/^#.*Id:.*/{print $4}' %{SOURCE3})
+rev=$(awk -F= '/^VERSION/{print $2}' %{SOURCE3})
 if [ "$rev" != "%find_lang_rev" ]; then
        : Update find_lang_rev define to $rev, and retry
        exit 1
This page took 0.041795 seconds and 4 git commands to generate.