summaryrefslogtreecommitdiffstats
path: root/userspace/ebtables2/Makefile
diff options
context:
space:
mode:
authorBart De Schuymer <bdschuym@pandora.be>2005-08-30 21:20:55 +0000
committerBart De Schuymer <bdschuym@pandora.be>2005-08-30 21:20:55 +0000
commit8ad9af76c8678b754b2a266b3e939121d18178ce (patch)
tree54b7657a7e9a7897c8fc464738140ea4af571d38 /userspace/ebtables2/Makefile
parentbbae1030686de7e7106d42a2f56590d13541b97e (diff)
update initialisation scripts
Diffstat (limited to 'userspace/ebtables2/Makefile')
-rw-r--r--userspace/ebtables2/Makefile24
1 files changed, 21 insertions, 3 deletions
diff --git a/userspace/ebtables2/Makefile b/userspace/ebtables2/Makefile
index ac3e9fa..00e377d 100644
--- a/userspace/ebtables2/Makefile
+++ b/userspace/ebtables2/Makefile
@@ -2,13 +2,15 @@
PROGNAME:=ebtables
PROGVERSION:=2.0.7
-PROGDATE:=June\ 2005
+PROGDATE:=September\ 2005
# default paths
LIBDIR:=/usr/lib
MANDIR:=/usr/local/man
BINDIR:=/usr/local/sbin
ETCDIR:=/etc
+INITDIR:=/etc/rc.d/init.d
+SYSCONFIGDIR:=/etc/sysconfig
DESTDIR:=
# include DESTDIR param
@@ -16,6 +18,8 @@ override LIBDIR:=$(DESTDIR)$(LIBDIR)/$(PROGNAME)
override MANDIR:=$(DESTDIR)$(MANDIR)
override BINDIR:=$(DESTDIR)$(BINDIR)
override ETCDIR:=$(DESTDIR)$(ETCDIR)
+override INITDIR:=$(DESTDIR)$(INITDIR)
+override SYSCONFIGDIR:=$(DESTDIR)$(SYSCONFIGDIR)
CFLAGS:=-Wall -Wunused
@@ -38,7 +42,7 @@ KERNEL_INCLUDES?=include/
ETHERTYPESPATH?=$(ETCDIR)
ETHERTYPESFILE:=$(ETHERTYPESPATH)/ethertypes
-PIPE_DIR?=/tmp/$(PROGNAME)-v$(PROGVERSION)
+PIPE_DIR?=$(DESTDIR)/tmp/$(PROGNAME)-v$(PROGVERSION)
PIPE=$(PIPE_DIR)/ebtablesd_pipe
EBTD_CMDLINE_MAXLN?=2048
EBTD_ARGC_MAX?=50
@@ -106,6 +110,20 @@ ebtablesd: $(OBJECTS) ebtablesd.o libebtc
.PHONY: daemon
daemon: ebtablesd ebtablesu
+tmp1:=$(shell printf $(BINDIR) | sed 's/\//\\\//g')
+tmp2:=$(shell printf $(SYSCONFIGDIR) | sed 's/\//\\\//g')
+.PHONY: scripts
+scripts: ebtables-save ebtables-restore ebtables.sysv ebtables-config
+ cat ebtables-save | sed 's/__EXEC_PATH__/$(tmp1)/g' > ebtables-save_
+ install -m 0755 -o root -g root ebtables-save_ $(BINDIR)/ebtables-save
+ cat ebtables-restore | sed 's/__EXEC_PATH__/$(tmp1)/g' > ebtables-restore_
+ install -m 0755 -o root -g root ebtables-restore_ $(BINDIR)/ebtables-restore
+ cat ebtables.sysv | sed 's/__EXEC_PATH__/$(tmp1)/g' | sed 's/__SYSCONFIG__/$(tmp2)/g'> ebtables.sysv_
+ install -m 0755 -o root -g root ebtables.sysv_ $(INITDIR)/ebtables
+ cat ebtables-config | sed 's/__SYSCONFIG__/$(tmp1)/g' > ebtables-config_
+ install -m 0600 -o root -g root ebtables-config_ $(SYSCONFIGDIR)/ebtables-config
+ rm -f ebtables-save_ ebtables-restore_ ebtables.sysv_ ebtables-config_
+
$(MANDIR)/man8/ebtables.8: ebtables.8
mkdir -p $(@D)
install -m 0644 -o root -g root $< $@
@@ -122,7 +140,7 @@ exec: ebtables daemon
install -m 0755 -o root -g root $(PROGNAME)u $(BINFILE_EBTU)
.PHONY: install
-install: $(MANDIR)/man8/ebtables.8 $(ETHERTYPESFILE) exec
+install: $(MANDIR)/man8/ebtables.8 $(ETHERTYPESFILE) exec scripts
mkdir -p $(LIBDIR)
install -m 0755 extensions/*.so $(LIBDIR)
install -m 0755 *.so $(LIBDIR)