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.

65 lines
1.6 KiB

  1. #
  2. # Copyright (c) 2018-2019 Dirk Brenken (dev@brenken.org)
  3. # This is free software, licensed under the GNU General Public License v3.
  4. #
  5. include $(TOPDIR)/rules.mk
  6. PKG_NAME:=banip
  7. PKG_VERSION:=0.3.11
  8. PKG_RELEASE:=1
  9. PKG_LICENSE:=GPL-3.0-or-later
  10. PKG_MAINTAINER:=Dirk Brenken <dev@brenken.org>
  11. include $(INCLUDE_DIR)/package.mk
  12. define Package/banip
  13. SECTION:=net
  14. CATEGORY:=Network
  15. TITLE:=Ban incoming and/or outgoing ip adresses via ipsets
  16. DEPENDS:=+jshn +jsonfilter +ip +ipset +iptables +ca-bundle +logd
  17. PKGARCH:=all
  18. endef
  19. define Package/banip/description
  20. Powerful banIP script to block ip addresses via ipsets.
  21. The script supports many ip blacklist sites plus manual black- and whitelist overrides.
  22. Please see https://github.com/openwrt/packages/blob/master/net/banip/files/README.md for further information.
  23. endef
  24. define Package/banip/conffiles
  25. /etc/config/banip
  26. /etc/banip/banip.whitelist
  27. /etc/banip/banip.blacklist
  28. endef
  29. define Build/Prepare
  30. endef
  31. define Build/Configure
  32. endef
  33. define Build/Compile
  34. endef
  35. define Package/banip/install
  36. $(INSTALL_DIR) $(1)/usr/bin
  37. $(INSTALL_BIN) ./files/banip.sh $(1)/usr/bin
  38. $(INSTALL_DIR) $(1)/etc/init.d
  39. $(INSTALL_BIN) ./files/banip.init $(1)/etc/init.d/banip
  40. $(INSTALL_DIR) $(1)/etc/config
  41. $(INSTALL_CONF) ./files/banip.conf $(1)/etc/config/banip
  42. $(INSTALL_DIR) $(1)/etc/banip
  43. $(INSTALL_BIN) ./files/banip.service $(1)/etc/banip
  44. $(INSTALL_CONF) ./files/banip.blacklist $(1)/etc/banip
  45. $(INSTALL_CONF) ./files/banip.whitelist $(1)/etc/banip
  46. $(INSTALL_DIR) $(1)/etc/hotplug.d/firewall
  47. $(INSTALL_DATA) ./files/banip.hotplug $(1)/etc/hotplug.d/firewall/30-banip
  48. endef
  49. $(eval $(call BuildPackage,banip))