From 84bc5ffe1af6924f88841755ea3450397e957619 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Elan=20Ruusam=C3=A4e?= Date: Thu, 2 Aug 2012 22:38:44 +0300 Subject: [PATCH] adjust to build with git --- rpm-build-macros.spec | 7 +++++-- rpm-find-lang | 3 +-- rpm.macros | 3 +-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/rpm-build-macros.spec b/rpm-build-macros.spec index 6de164e..9f150b0 100644 --- a/rpm-build-macros.spec +++ b/rpm-build-macros.spec @@ -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 diff --git a/rpm-find-lang b/rpm-find-lang index 12e47cd..8b440fa 100644 --- a/rpm-find-lang +++ b/rpm-find-lang @@ -1,5 +1,4 @@ #!/bin/sh -# $Id$ # find-lang - automagically generate list of language specific files # for inclusion in an rpm spec file. @@ -35,7 +34,7 @@ # * start support for KDE help files PROG=${0##*/} -VERSION=$(set -- $Revision$; echo $2) +VERSION=1.35 usage () { cat < # can be used by builder script to check for version -%rpm_build_macros %(R="$Revision$"; RR="${R##: }"; echo ${RR%%?}) +%rpm_build_macros $Revision$ %epoch 0 %x8664 x86_64 amd64 ia32e -- 2.43.0