|
|
05e71a |
From 67613b5a7ce545683a4831bf6297f9a108538827 Mon Sep 17 00:00:00 2001
|
|
|
05e71a |
From: Jan Engelhardt <jengelh@inai.de>
|
|
|
05e71a |
Date: Wed, 27 Jun 2018 11:50:39 +0200
|
|
|
05e71a |
Subject: [PATCH] build: rename sed source files to .in
|
|
|
05e71a |
|
|
|
05e71a |
Prepare for autoconf-based substitution of macros in the file.
|
|
|
05e71a |
|
|
|
05e71a |
Signed-off-by: Florian Westphal <fw@strlen.de>
|
|
|
05e71a |
Signed-off-by: Phil Sutter <psutter@redhat.com>
|
|
|
05e71a |
---
|
|
|
05e71a |
Makefile | 14 +++++++-------
|
|
|
05e71a |
ebtables-config => ebtables-config.in | 0
|
|
|
05e71a |
ebtables-save => ebtables-save.in | 0
|
|
|
05e71a |
ebtables.8 => ebtables.8.in | 0
|
|
|
05e71a |
ebtables.sysv => ebtables.sysv.in | 0
|
|
|
05e71a |
5 files changed, 7 insertions(+), 7 deletions(-)
|
|
|
05e71a |
rename ebtables-config => ebtables-config.in (100%)
|
|
|
05e71a |
rename ebtables-save => ebtables-save.in (100%)
|
|
|
05e71a |
rename ebtables.8 => ebtables.8.in (100%)
|
|
|
05e71a |
rename ebtables.sysv => ebtables.sysv.in (100%)
|
|
|
05e71a |
|
|
|
05e71a |
diff --git a/Makefile b/Makefile
|
|
|
05e71a |
index 79ee167e0258b..d0a12d6ed7325 100644
|
|
|
05e71a |
--- a/Makefile
|
|
|
05e71a |
+++ b/Makefile
|
|
|
05e71a |
@@ -154,22 +154,22 @@ tmp1:=$(shell printf $(BINDIR) | sed 's/\//\\\//g')
|
|
|
05e71a |
tmp2:=$(shell printf $(SYSCONFIGDIR) | sed 's/\//\\\//g')
|
|
|
05e71a |
tmp3:=$(shell printf $(PIPE) | sed 's/\//\\\//g')
|
|
|
05e71a |
.PHONY: scripts
|
|
|
05e71a |
-scripts: ebtables-save ebtables.sysv ebtables-config
|
|
|
05e71a |
- cat ebtables-save | sed 's/__EXEC_PATH__/$(tmp1)/g' > ebtables-save_
|
|
|
05e71a |
+scripts: ebtables-save.in ebtables.sysv.in ebtables-config.in
|
|
|
05e71a |
+ sed -e 's/__EXEC_PATH__/$(tmp1)/g' <ebtables-save.in >ebtables-save_
|
|
|
05e71a |
mkdir -p $(DESTDIR)$(BINDIR)
|
|
|
05e71a |
install -m 0755 ebtables-save_ $(DESTDIR)$(BINDIR)/ebtables-save
|
|
|
05e71a |
- cat ebtables.sysv | sed 's/__EXEC_PATH__/$(tmp1)/g' | sed 's/__SYSCONFIG__/$(tmp2)/g' > ebtables.sysv_
|
|
|
05e71a |
+ sed -e 's/__EXEC_PATH__/$(tmp1)/g' -e 's/__SYSCONFIG__/$(tmp2)/g' <ebtables.sysv.in >ebtables.sysv_
|
|
|
05e71a |
if [ "$(DESTDIR)" != "" ]; then mkdir -p $(DESTDIR)$(INITDIR); fi
|
|
|
05e71a |
if test -d $(DESTDIR)$(INITDIR); then install -m 0755 ebtables.sysv_ $(DESTDIR)$(INITDIR)/ebtables; fi
|
|
|
05e71a |
- cat ebtables-config | sed 's/__SYSCONFIG__/$(tmp2)/g' > ebtables-config_
|
|
|
05e71a |
+ sed -e 's/__SYSCONFIG__/$(tmp2)/g' <ebtables-config >ebtables-config_
|
|
|
05e71a |
if [ "$(DESTDIR)" != "" ]; then mkdir -p $(DESTDIR)$(SYSCONFIGDIR); fi
|
|
|
05e71a |
if test -d $(DESTDIR)$(SYSCONFIGDIR); then install -m 0600 ebtables-config_ $(DESTDIR)$(SYSCONFIGDIR)/ebtables-config; fi
|
|
|
05e71a |
rm -f ebtables-save_ ebtables.sysv_ ebtables-config_
|
|
|
05e71a |
|
|
|
05e71a |
tmp4:=$(shell printf $(LOCKFILE) | sed 's/\//\\\//g')
|
|
|
05e71a |
-$(MANDIR)/man8/ebtables.8: ebtables.8
|
|
|
05e71a |
+$(MANDIR)/man8/ebtables.8: ebtables.8.in
|
|
|
05e71a |
mkdir -p $(DESTDIR)$(@D)
|
|
|
05e71a |
- sed -e 's/$$(VERSION)/$(PROGVERSION)/' -e 's/$$(DATE)/$(PROGDATE)/' -e 's/$$(LOCKFILE)/$(tmp4)/' ebtables.8 > ebtables.8_
|
|
|
05e71a |
+ sed -e 's/$$(VERSION)/$(PROGVERSION)/' -e 's/$$(DATE)/$(PROGDATE)/' -e 's/$$(LOCKFILE)/$(tmp4)/' <$< >ebtables.8_
|
|
|
05e71a |
install -m 0644 ebtables.8_ $(DESTDIR)$@
|
|
|
05e71a |
rm -f ebtables.8_
|
|
|
05e71a |
|
|
|
05e71a |
@@ -224,7 +224,7 @@ release:
|
|
|
05e71a |
touch include/*
|
|
|
05e71a |
touch include/linux/*
|
|
|
05e71a |
touch include/linux/netfilter_bridge/*
|
|
|
05e71a |
- sed -i -e 's/$$(VERSION)/$(PROGVERSION)/' -e 's/$$(DATE)/$(PROGDATE)/' -e 's/$$(LOCKFILE)/$(tmp4)/' ebtables.8
|
|
|
05e71a |
+ sed -i -e 's/$$(VERSION)/$(PROGVERSION)/' -e 's/$$(DATE)/$(PROGDATE)/' -e 's/$$(LOCKFILE)/$(tmp4)/' <ebtables.8.in >ebtables.8
|
|
|
05e71a |
sed -i -e 's/$$(VERSION)/$(PROGVERSION_)/' -e 's/$$(RELEASE)/$(PROGRELEASE)/' ebtables.spec
|
|
|
05e71a |
cd ..;tar -c $(DIR) | gzip >$(DIR).tar.gz; cd -
|
|
|
05e71a |
rm -rf include/linux
|
|
|
05e71a |
diff --git a/ebtables-config b/ebtables-config.in
|
|
|
05e71a |
similarity index 100%
|
|
|
05e71a |
rename from ebtables-config
|
|
|
05e71a |
rename to ebtables-config.in
|
|
|
05e71a |
diff --git a/ebtables-save b/ebtables-save.in
|
|
|
05e71a |
similarity index 100%
|
|
|
05e71a |
rename from ebtables-save
|
|
|
05e71a |
rename to ebtables-save.in
|
|
|
05e71a |
diff --git a/ebtables.8 b/ebtables.8.in
|
|
|
05e71a |
similarity index 100%
|
|
|
05e71a |
rename from ebtables.8
|
|
|
05e71a |
rename to ebtables.8.in
|
|
|
05e71a |
diff --git a/ebtables.sysv b/ebtables.sysv.in
|
|
|
05e71a |
similarity index 100%
|
|
|
05e71a |
rename from ebtables.sysv
|
|
|
05e71a |
rename to ebtables.sysv.in
|
|
|
05e71a |
--
|
|
|
05e71a |
2.21.0
|
|
|
05e71a |
|