fix %autosetup support

This commit is contained in:
Andrew Bauer 2017-02-28 07:26:54 -06:00
parent 526d1bc99e
commit cd9a3fd59b
2 changed files with 28 additions and 2 deletions

View File

@ -0,0 +1,22 @@
From fed25ab3e7609478d80b4d49916c6b22def1588c Mon Sep 17 00:00:00 2001
From: Andy Bauer <knnniggett@hotmail.com>
Date: Mon, 27 Feb 2017 20:31:21 -0600
Subject: [PATCH] config sed to replace only the first occurance of %autosetup
---
pack/rpm.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pack/rpm.mk b/pack/rpm.mk
index 7ead710..a17a9b9 100644
--- a/pack/rpm.mk
+++ b/pack/rpm.mk
@@ -24,7 +24,7 @@ $(BUILDDIR)/$(RPMSPEC): $(RPMSPECIN)
-e 's/Release:\([ ]*\).*/Release: $(RELEASE)%{dist}/' \
-e 's/Source0:\([ ]*\).*/Source0: $(TARBALL)/' \
-e 's/%setup.*/%setup -q -n $(PRODUCT)-$(VERSION)/' \
- -e 's/%autosetup.*/%autosetup -n $(PRODUCT)-$(VERSION)/' \
+ -e '0,/%autosetup.*/ s/%autosetup.*/%autosetup -n $(PRODUCT)-$(VERSION)/' \
-i $@.tmp
grep -F "Version: $(VERSION)" $@.tmp && \
grep -F "Release: $(RELEASE)" $@.tmp && \

View File

@ -48,8 +48,12 @@ fi
if [ "${OS}" == "el" ] || [ "${OS}" == "fedora" ]; then
echo "Begin Redhat build..."
# %autosetup support has been merged upstream. No need to patch
#patch -p1 < utils/packpack/autosetup.patch
# fix %autosetup support
patch --dry-run --silent -f -p1 < utils/packpack/fixautosetup.patch 2>/dev/null
if [ $? -eq 0 ]; then
patch -p1 < utils/packpack/fixautosetup.patch
fi
ln -sf distros/redhat rpm
# The rpm specfile requires the Crud submodule folder to be empty