ebtables/ebtables-2.0.8-fixbrokendestdir.patch
2007-08-23 14:49:27 +00:00

68 lines
2.5 KiB
Diff

diff -up ebtables-v2.0.8-1/Makefile.destdir ebtables-v2.0.8-1/Makefile
--- ebtables-v2.0.8-1/Makefile.destdir 2007-08-23 10:05:00.000000000 -0400
+++ ebtables-v2.0.8-1/Makefile 2007-08-23 10:05:44.000000000 -0400
@@ -15,13 +15,8 @@ INITDIR:=/etc/rc.d/init.d
SYSCONFIGDIR:=/etc/sysconfig
DESTDIR:=
-# include DESTDIR param
-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)
+# include PROGNAME in LIBDIR
+override LIBDIR:=$(LIBDIR)/$(PROGNAME)
CFLAGS:=-Wall -Wunused
@@ -163,34 +158,34 @@ tmp3:=$(shell printf $(PIPE) | sed 's/\/
.PHONY: scripts
scripts: ebtables-save ebtables.sysv ebtables-config
cat ebtables-save | sed 's/__EXEC_PATH__/$(tmp1)/g' > ebtables-save_
- install -m 0755 ebtables-save_ $(BINDIR)/ebtables-save
+ install -m 0755 ebtables-save_ $(DESTDIR)$(BINDIR)/ebtables-save
cat ebtables.sysv | sed 's/__EXEC_PATH__/$(tmp1)/g' | sed 's/__SYSCONFIG__/$(tmp2)/g' > ebtables.sysv_
- install -m 0755 ebtables.sysv_ $(INITDIR)/ebtables
+ install -m 0755 ebtables.sysv_ $(DESTDIR)$(INITDIR)/ebtables
cat ebtables-config | sed 's/__SYSCONFIG__/$(tmp2)/g' > ebtables-config_
- install -m 0600 ebtables-config_ $(SYSCONFIGDIR)/ebtables-config
+ install -m 0600 ebtables-config_ $(DESTDIR)$(SYSCONFIGDIR)/ebtables-config
rm -f ebtables-save_ ebtables.sysv_ ebtables-config_
$(MANDIR)/man8/ebtables.8: ebtables.8
- mkdir -p $(@D)
+ mkdir -p $(DESTDIR)$(@D)
sed 's/$$(VERSION)/$(PROGVERSION)/' ebtables.8 | sed 's/$$(DATE)/$(PROGDATE)/' > ebtables.8_
- install -m 0644 ebtables.8_ $@
+ install -m 0644 ebtables.8_ $(DESTDIR)$@
rm -f ebtables.8_
$(ETHERTYPESFILE): ethertypes
- mkdir -p $(@D)
- install -m 0644 $< $@
+ mkdir -p $(DESTDIR)$(@D)
+ install -m 0644 $< $(DESTDIR)$@
.PHONY: exec
exec: ebtables ebtables-restore
- mkdir -p $(BINDIR)
- install -m 0755 $(PROGNAME) $(BINDIR)/$(PROGNAME)
- install -m 0755 ebtables-restore $(BINDIR)/ebtables-restore
+ mkdir -p $(DESTDIR)$(BINDIR)
+ install -m 0755 $(PROGNAME) $(DESTDIR)$(BINDIR)/$(PROGNAME)
+ install -m 0755 ebtables-restore $(DESTDIR)$(BINDIR)/ebtables-restore
.PHONY: install
install: $(MANDIR)/man8/ebtables.8 $(ETHERTYPESFILE) exec scripts
- mkdir -p $(LIBDIR)
- install -m 0755 extensions/*.so $(LIBDIR)
- install -m 0755 *.so $(LIBDIR)
+ mkdir -p $(DESTDIR)$(LIBDIR)
+ install -m 0755 extensions/*.so $(DESTDIR)$(LIBDIR)
+ install -m 0755 *.so $(DESTDIR)$(LIBDIR)
.PHONY: clean
clean: