diff options
author | Bart De Schuymer <bdschuym@pandora.be> | 2005-08-30 21:20:55 +0000 |
---|---|---|
committer | Bart De Schuymer <bdschuym@pandora.be> | 2005-08-30 21:20:55 +0000 |
commit | 50441e96eaf341384e999fdac8128401e9fcfbca (patch) | |
tree | 2f0950a79267ddc397d75f4cb6f02921566e4193 /Makefile | |
parent | e94eaf74a01f9f4b346b80fb40f4e23e2b58e796 (diff) | |
download | ebtables-50441e96eaf341384e999fdac8128401e9fcfbca.tar.gz |
update initialisation scripts
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 24 |
1 files changed, 21 insertions, 3 deletions
@@ -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) |