Makefile 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #
  2. # Copyright (C) 2014 Openwrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. include $(TOPDIR)/rules.mk
  6. PKG_NAME:=bcp38
  7. PKG_VERSION:=5
  8. PKG_RELEASE:=2
  9. PKG_LICENCE:=GPL-3.0+
  10. include $(INCLUDE_DIR)/package.mk
  11. define Package/bcp38
  12. SECTION:=net
  13. CATEGORY:=Network
  14. SUBMENU:=Routing and Redirection
  15. TITLE:=BCP38 compliance
  16. URL:=https://github.com/dtaht/ceropackages-3.10
  17. MAINTAINER:=Toke Høiland-Jørgensen <toke@toke.dk>
  18. DEPENDS:=+ipset
  19. endef
  20. define Package/bcp38/description
  21. bcp38 implements IETF BCP38 for home routers.
  22. See https://tools.ietf.org/html/bcp38.
  23. This package provides BCP38 for IPv4 only - IPv6 uses source
  24. specific default routes, so no firewall configuration is needed.
  25. endef
  26. define Package/bcp38/conffiles
  27. /etc/config/bcp38
  28. endef
  29. define Build/Prepare
  30. endef
  31. define Build/Configure
  32. endef
  33. define Build/Compile
  34. endef
  35. define Package/bcp38/install
  36. $(INSTALL_DIR) $(1)/etc/config
  37. $(INSTALL_CONF) ./files/bcp38.config $(1)/etc/config/bcp38
  38. $(INSTALL_DIR) $(1)/usr/lib/bcp38
  39. $(INSTALL_BIN) ./files/run.sh $(1)/usr/lib/bcp38/run.sh
  40. $(INSTALL_DIR) $(1)/etc/uci-defaults
  41. $(INSTALL_BIN) ./files/bcp38.defaults $(1)/etc/uci-defaults/bcp38
  42. endef
  43. define Package/bcp38/postinst
  44. #!/bin/sh
  45. [ -x /etc/uci-defaults/bcp38 ] && /etc/uci-defaults/bcp38 || exit 0
  46. endef
  47. define Package/bcp38/postrm
  48. #!/bin/sh
  49. uci delete firewall.bcp38
  50. uci commit
  51. endef
  52. $(eval $(call BuildPackage,bcp38))