patch-Makefile 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. --- ebtables-v2.0.10-4.orig/Makefile 2011-12-15 21:02:47.000000000 +0100
  2. +++ ebtables-v2.0.10-4/Makefile 2014-03-23 15:46:20.000000000 +0100
  3. @@ -10,16 +10,16 @@ LOCKDIR:=$(shell echo $(LOCKFILE) | sed
  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 -Werror
  16. +CFLAGS?=-Wall -Wunused -Werror
  17. CFLAGS_SH_LIB:=-fPIC -O3
  18. -CC:=gcc
  19. +CC?=gcc
  20. ifeq ($(shell uname -m),sparc64)
  21. CFLAGS+=-DEBT_MIN_ALIGN=8 -DKERNEL_64_USERSPACE_32
  22. @@ -157,31 +157,31 @@ tmp3:=$(shell printf $(PIPE) | sed 's/\/
  23. scripts: ebtables-save ebtables.sysv ebtables-config
  24. cat ebtables-save | sed 's/__EXEC_PATH__/$(tmp1)/g' > ebtables-save_
  25. mkdir -p $(DESTDIR)$(BINDIR)
  26. - install -m 0755 -o root -g root ebtables-save_ $(DESTDIR)$(BINDIR)/ebtables-save
  27. + install -m 0755 ebtables-save_ $(DESTDIR)$(BINDIR)/ebtables-save
  28. cat ebtables.sysv | sed 's/__EXEC_PATH__/$(tmp1)/g' | sed 's/__SYSCONFIG__/$(tmp2)/g' > ebtables.sysv_
  29. if [ "$(DESTDIR)" != "" ]; then mkdir -p $(DESTDIR)$(INITDIR); fi
  30. - if test -d $(DESTDIR)$(INITDIR); then install -m 0755 -o root -g root ebtables.sysv_ $(DESTDIR)$(INITDIR)/ebtables; fi
  31. + if test -d $(DESTDIR)$(INITDIR); then install -m 0755 ebtables.sysv_ $(DESTDIR)$(INITDIR)/ebtables; fi
  32. cat ebtables-config | sed 's/__SYSCONFIG__/$(tmp2)/g' > ebtables-config_
  33. if [ "$(DESTDIR)" != "" ]; then mkdir -p $(DESTDIR)$(SYSCONFIGDIR); fi
  34. - if test -d $(DESTDIR)$(SYSCONFIGDIR); then install -m 0600 -o root -g root ebtables-config_ $(DESTDIR)$(SYSCONFIGDIR)/ebtables-config; fi
  35. + if test -d $(DESTDIR)$(SYSCONFIGDIR); then install -m 0600 ebtables-config_ $(DESTDIR)$(SYSCONFIGDIR)/ebtables-config; fi
  36. rm -f ebtables-save_ ebtables.sysv_ ebtables-config_
  37. tmp4:=$(shell printf $(LOCKFILE) | sed 's/\//\\\//g')
  38. $(MANDIR)/man8/ebtables.8: ebtables.8
  39. mkdir -p $(DESTDIR)$(@D)
  40. sed -e 's/$$(VERSION)/$(PROGVERSION)/' -e 's/$$(DATE)/$(PROGDATE)/' -e 's/$$(LOCKFILE)/$(tmp4)/' ebtables.8 > ebtables.8_
  41. - install -m 0644 -o root -g root ebtables.8_ $(DESTDIR)$@
  42. + install -m 0644 ebtables.8_ $(DESTDIR)$@
  43. rm -f ebtables.8_
  44. $(DESTDIR)$(ETHERTYPESFILE): ethertypes
  45. mkdir -p $(@D)
  46. - install -m 0644 -o root -g root $< $@
  47. + install -m 0644 $< $@
  48. .PHONY: exec
  49. exec: ebtables ebtables-restore
  50. mkdir -p $(DESTDIR)$(BINDIR)
  51. - install -m 0755 -o root -g root $(PROGNAME) $(DESTDIR)$(BINDIR)/$(PROGNAME)
  52. - install -m 0755 -o root -g root ebtables-restore $(DESTDIR)$(BINDIR)/ebtables-restore
  53. + install -m 0755 $(PROGNAME) $(DESTDIR)$(BINDIR)/$(PROGNAME)
  54. + install -m 0755 ebtables-restore $(DESTDIR)$(BINDIR)/ebtables-restore
  55. .PHONY: install
  56. install: $(MANDIR)/man8/ebtables.8 $(DESTDIR)$(ETHERTYPESFILE) exec scripts
  57. @@ -205,18 +205,18 @@ release:
  58. rm -f extensions/ebt_inat.c
  59. rm -rf $(CVSDIRS)
  60. mkdir -p include/linux/netfilter_bridge
  61. - install -m 0644 -o root -g root \
  62. + install -m 0644 \
  63. $(KERNEL_INCLUDES)/linux/netfilter_bridge.h include/linux/
  64. # To keep possible compile error complaints about undefined ETH_P_8021Q
  65. # off my back
  66. - install -m 0644 -o root -g root \
  67. + install -m 0644 \
  68. $(KERNEL_INCLUDES)/linux/if_ether.h include/linux/
  69. - install -m 0644 -o root -g root \
  70. + install -m 0644 \
  71. $(KERNEL_INCLUDES)/linux/types.h include/linux/
  72. - install -m 0644 -o root -g root \
  73. + install -m 0644 \
  74. $(KERNEL_INCLUDES)/linux/netfilter_bridge/*.h \
  75. include/linux/netfilter_bridge/
  76. - install -m 0644 -o root -g root \
  77. + install -m 0644 \
  78. include/ebtables.h include/linux/netfilter_bridge/
  79. make clean
  80. touch *