1
0

patch-Makefile 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. --- ebtables-v2.0.9-1.orig/Makefile 2009-06-21 15:13:25.000000000 +0200
  2. +++ ebtables-v2.0.9-1/Makefile 2009-11-29 15:39:30.000000000 +0100
  3. @@ -8,17 +8,16 @@ PROGDATE:=June\ 2009
  4. # default paths
  5. LIBDIR:=/usr/lib
  6. -MANDIR:=/usr/local/man
  7. -BINDIR:=/usr/local/sbin
  8. +MANDIR:=/usr/man
  9. +BINDIR:=/usr/sbin
  10. ETCDIR:=/etc
  11. -INITDIR:=/etc/rc.d/init.d
  12. +INITDIR:=/etc/init.d
  13. SYSCONFIGDIR:=/etc/sysconfig
  14. DESTDIR:=
  15. -CFLAGS:=-Wall -Wunused
  16. +CFLAGS?=-Wall -Wunused
  17. CFLAGS_SH_LIB:=-fPIC
  18. -CC:=gcc
  19. -LD:=ld
  20. +CC?=gcc
  21. ifeq ($(shell uname -m),sparc64)
  22. CFLAGS+=-DEBT_MIN_ALIGN=8 -DKERNEL_64_USERSPACE_32
  23. @@ -85,7 +84,7 @@ ebtables-standalone.o: ebtables-standalo
  24. .PHONY: libebtc
  25. libebtc: $(OBJECTS2)
  26. - $(LD) -shared -soname libebtc.so -o libebtc.so -lc $(OBJECTS2)
  27. + $(CC) -shared -o libebtc.so -lc $(OBJECTS2)
  28. ebtables: $(OBJECTS) ebtables-standalone.o libebtc
  29. $(CC) $(CFLAGS) $(CFLAGS_SH_LIB) -o $@ ebtables-standalone.o -I$(KERNEL_INCLUDES) -L. -Lextensions -lebtc $(EXT_LIBSI) \
  30. @@ -154,28 +153,29 @@ tmp3:=$(shell printf $(PIPE) | sed 's/\/
  31. .PHONY: scripts
  32. scripts: ebtables-save ebtables.sysv ebtables-config
  33. cat ebtables-save | sed 's/__EXEC_PATH__/$(tmp1)/g' > ebtables-save_
  34. - install -m 0755 -o root -g root ebtables-save_ $(DESTDIR)$(BINDIR)/ebtables-save
  35. + install -m 0755 ebtables-save_ $(DESTDIR)$(BINDIR)/ebtables-save
  36. cat ebtables.sysv | sed 's/__EXEC_PATH__/$(tmp1)/g' | sed 's/__SYSCONFIG__/$(tmp2)/g' > ebtables.sysv_
  37. - install -m 0755 -o root -g root ebtables.sysv_ $(DESTDIR)$(INITDIR)/ebtables
  38. + mkdir -p $(DESTDIR)$(INITDIR)
  39. + install -m 0755 ebtables.sysv_ $(DESTDIR)$(INITDIR)/ebtables
  40. cat ebtables-config | sed 's/__SYSCONFIG__/$(tmp2)/g' > ebtables-config_
  41. - install -m 0600 -o root -g root ebtables-config_ $(DESTDIR)$(SYSCONFIGDIR)/ebtables-config
  42. + #install -m 0600 ebtables-config_ $(DESTDIR)$(SYSCONFIGDIR)/ebtables-config
  43. rm -f ebtables-save_ ebtables.sysv_ ebtables-config_
  44. $(MANDIR)/man8/ebtables.8: ebtables.8
  45. mkdir -p $(DESTDIR)$(@D)
  46. sed 's/$$(VERSION)/$(PROGVERSION)/' ebtables.8 | sed 's/$$(DATE)/$(PROGDATE)/' > ebtables.8_
  47. - install -m 0644 -o root -g root ebtables.8_ $(DESTDIR)$@
  48. + install -m 0644 ebtables.8_ $(DESTDIR)$@
  49. rm -f ebtables.8_
  50. $(ETHERTYPESFILE): ethertypes
  51. mkdir -p $(DESTDIR)$(@D)
  52. - install -m 0644 -o root -g root $< $(DESTDIR)$@
  53. + install -m 0644 $< $(DESTDIR)$@
  54. .PHONY: exec
  55. exec: ebtables ebtables-restore
  56. mkdir -p $(DESTDIR)$(BINDIR)
  57. - install -m 0755 -o root -g root $(PROGNAME) $(DESTDIR)$(BINDIR)/$(PROGNAME)
  58. - install -m 0755 -o root -g root ebtables-restore $(DESTDIR)$(BINDIR)/ebtables-restore
  59. + install -m 0755 $(PROGNAME) $(DESTDIR)$(BINDIR)/$(PROGNAME)
  60. + install -m 0755 ebtables-restore $(DESTDIR)$(BINDIR)/ebtables-restore
  61. .PHONY: install
  62. install: $(MANDIR)/man8/ebtables.8 $(ETHERTYPESFILE) exec scripts
  63. @@ -199,18 +199,18 @@ release:
  64. rm -f extensions/ebt_inat.c
  65. rm -rf $(CVSDIRS)
  66. mkdir -p include/linux/netfilter_bridge
  67. - install -m 0644 -o root -g root \
  68. + install -m 0644 \
  69. $(KERNEL_INCLUDES)/linux/netfilter_bridge.h include/linux/
  70. # To keep possible compile error complaints about undefined ETH_P_8021Q
  71. # off my back
  72. - install -m 0644 -o root -g root \
  73. + install -m 0644 \
  74. $(KERNEL_INCLUDES)/linux/if_ether.h include/linux/
  75. - install -m 0644 -o root -g root \
  76. + install -m 0644 \
  77. $(KERNEL_INCLUDES)/linux/types.h include/linux/
  78. - install -m 0644 -o root -g root \
  79. + install -m 0644 \
  80. $(KERNEL_INCLUDES)/linux/netfilter_bridge/*.h \
  81. include/linux/netfilter_bridge/
  82. - install -m 0644 -o root -g root \
  83. + install -m 0644 \
  84. include/ebtables.h include/linux/netfilter_bridge/
  85. make clean
  86. touch *