1
0

patch-Makefile 4.0 KB

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