You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by rn...@apache.org on 2023/12/11 18:04:22 UTC

(couchdb-pkg) branch podman-macos-inplace-sed created (now 3276ef2)

This is an automated email from the ASF dual-hosted git repository.

rnewson pushed a change to branch podman-macos-inplace-sed
in repository https://gitbox.apache.org/repos/asf/couchdb-pkg.git


      at 3276ef2  avoid in-place edit

This branch includes the following new commits:

     new 3276ef2  avoid in-place edit

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(couchdb-pkg) 01/01: avoid in-place edit

Posted by rn...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rnewson pushed a commit to branch podman-macos-inplace-sed
in repository https://gitbox.apache.org/repos/asf/couchdb-pkg.git

commit 3276ef2fea351744c06bb0bce18b61012395fde6
Author: Robert Newson <rn...@apache.org>
AuthorDate: Mon Dec 11 17:59:14 2023 +0000

    avoid in-place edit
    
    creating the temp file fails with podman on macos,
    this approach should work everywhere.
---
 Makefile | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/Makefile b/Makefile
index ba64d88..31f335c 100644
--- a/Makefile
+++ b/Makefile
@@ -253,9 +253,8 @@ build-couch:
 
 # ######################################
 sm-ver-debian:
-	cp debian/control.in debian/control
-	sed -i 's/%SPIDERMONKEY%/$(SPIDERMONKEY)/g' debian/control
-	sed -i 's/%SPIDERMONKEY_DEV%/$(SPIDERMONKEY_DEV)/g' debian/control
+	sed 's/%SPIDERMONKEY%/$(SPIDERMONKEY)/g;s/%SPIDERMONKEY_DEV%/$(SPIDERMONKEY_DEV)/g' \
+	debian/control.in > debian/control
 	echo 'SM_VER = $(SM_VER)' > debian/sm_ver.mk
 
 find-couch-dist:
@@ -285,10 +284,8 @@ link-couch-dist:
 	$(eval VERSION := $(shell echo $(VERSION) | sed 's/-/\./'))
 
 sm-ver-rpm:
-	cp rpm/SPECS/couchdb.spec.in rpm/SPECS/couchdb.spec
-	sed -i 's/%SPIDERMONKEY%/$(SPIDERMONKEY)/g' rpm/SPECS/couchdb.spec
-	sed -i 's/%SPIDERMONKEY_DEV%/$(SPIDERMONKEY_DEV)/g' rpm/SPECS/couchdb.spec
-	sed -i 's/%SM_VER%/$(SM_VER)/g' rpm/SPECS/couchdb.spec
+	sed 's/%SPIDERMONKEY%/$(SPIDERMONKEY)/g;s/%SPIDERMONKEY_DEV%/$(SPIDERMONKEY_DEV)/g;s/%SM_VER%/$(SM_VER)/g' \
+	rpm/SPECS/couchdb.spec.in > rpm/SPECS/couchdb.spec
 
 make-rpmbuild:
 	rm -rf ../rpmbuild