summaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorBart De Schuymer <bdschuym@pandora.be>2006-12-15 11:37:07 +0000
committerBart De Schuymer <bdschuym@pandora.be>2006-12-15 11:37:07 +0000
commit865dd4dea29d35a95137ca284b80684422089fec (patch)
treed095f4db2ecbe52bd86b15ee7e8c7e870ca79691 /Makefile
parent592d565e1cae5b7efa870bee2cdc869dfac57758 (diff)
make ebtables.8 and ebtables.spec independent of version and release
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile21
1 files changed, 17 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index a05ce17..58bd53c 100644
--- a/Makefile
+++ b/Makefile
@@ -1,8 +1,14 @@
# ebtables Makefile
PROGNAME:=ebtables
-PROGVERSION:=2.0.8-rc2
-PROGDATE:=March\ 2006
+PROGRELEASE:=rc3
+PROGVERSION_:=2.0.8
+ifneq (PROGRELEASE,)
+PROGVERSION:=$(PROGVERSION_)-$(PROGRELEASE)
+else
+PROGVERSION:=$(PROGVERSION_)
+endif
+PROGDATE:=December\ 2006
# default paths
LIBDIR:=/usr/lib
@@ -170,7 +176,9 @@ scripts: ebtables-save ebtables.sysv ebtables-config
$(MANDIR)/man8/ebtables.8: ebtables.8
mkdir -p $(@D)
- install -m 0644 -o root -g root $< $@
+ sed 's/$$(VERSION)/$(PROGVERSION)/' ebtables.8 | sed 's/$$(PROGDATE)/$(PROGDATE)/' > ebtables.8_
+ install -m 0644 -o root -g root ebtables.8_ $@
+ rm -f ebtables.8_
$(ETHERTYPESFILE): ethertypes
mkdir -p $(@D)
@@ -195,7 +203,8 @@ clean:
rm -f extensions/*.o extensions/*.c~ extensions/*.so include/*~
DIR:=$(PROGNAME)-v$(PROGVERSION)
-# This is used to make a new userspace release
+# This is used to make a new userspace release, some files are altered so
+# do this on a temporary version
.PHONY: release
release:
mkdir -p include/linux/netfilter_bridge
@@ -216,6 +225,10 @@ release:
touch include/*
touch include/linux/*
touch include/linux/netfilter_bridge/*
+ sed -i 's/$$(VERSION)/$(PROGVERSION)/' ebtables.8
+ sed -i 's/$$(DATE)/$(PROGDATE)/' ebtables.8
+ sed -i 's/$$(VERSION)/$(PROGVERSION_)/' ebtables.spec
+ sed -i 's/$$(RELEASE)/$(PROGRELEASE)/' ebtables.spec
cd ..;tar -c $(DIR) | gzip >$(DIR).tar.gz; cd -
rm -rf include/linux