You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

69 lines
1.5 KiB

  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:=6
  9. PKG_LICENCE:=GPL-3.0-or-later
  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. PKGARCH:=all
  20. endef
  21. define Package/bcp38/description
  22. bcp38 implements IETF BCP38 for home routers.
  23. See https://tools.ietf.org/html/bcp38.
  24. This package provides BCP38 for IPv4 only - IPv6 uses source
  25. specific default routes, so no firewall configuration is needed.
  26. endef
  27. define Package/bcp38/conffiles
  28. /etc/config/bcp38
  29. endef
  30. define Build/Prepare
  31. endef
  32. define Build/Configure
  33. endef
  34. define Build/Compile
  35. endef
  36. define Package/bcp38/install
  37. $(INSTALL_DIR) $(1)/etc/config
  38. $(INSTALL_CONF) ./files/bcp38.config $(1)/etc/config/bcp38
  39. $(INSTALL_DIR) $(1)/usr/lib/bcp38
  40. $(INSTALL_BIN) ./files/run.sh $(1)/usr/lib/bcp38/run.sh
  41. $(INSTALL_DIR) $(1)/etc/uci-defaults
  42. $(INSTALL_BIN) ./files/bcp38.defaults $(1)/etc/uci-defaults/bcp38
  43. $(INSTALL_DIR) $(1)/etc/init.d
  44. $(INSTALL_BIN) ./files/bcp38.init $(1)/etc/init.d/bcp38
  45. endef
  46. define Package/bcp38/postinst
  47. #!/bin/sh
  48. [ -x /etc/uci-defaults/bcp38 ] && /etc/uci-defaults/bcp38 || exit 0
  49. endef
  50. define Package/bcp38/postrm
  51. #!/bin/sh
  52. uci delete firewall.bcp38
  53. uci commit
  54. endef
  55. $(eval $(call BuildPackage,bcp38))