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.

134 lines
3.6 KiB

  1. #
  2. # Copyright (C) 2011-2016 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=fwknop
  9. PKG_VERSION:=2.6.9
  10. PKG_RELEASE:=4
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_URL:=http://www.cipherdyne.org/fwknop/download
  13. PKG_HASH:=5bf47fe1fd30e862d29464f762c0b8bf89b5e298665c37624d6707826da956d4
  14. PKG_MAINTAINER:=Jonathan Bennett <JBennett@incomsystems.biz>
  15. PKG_LICENSE:=GPLv2
  16. PKG_INSTALL:=1
  17. include $(INCLUDE_DIR)/package.mk
  18. define Package/fwknop/Default
  19. TITLE:=FireWall KNock OPerator
  20. URL:=http://www.cipherdyne.org/fwknop/
  21. endef
  22. define Package/fwknop/Default/description
  23. Fwknop implements an authorization scheme known as Single Packet Authorization
  24. (SPA) for Linux systems running iptables. This mechanism requires only a
  25. single encrypted and non-replayed packet to communicate various pieces of
  26. information including desired access through an iptables policy. The main
  27. application of this program is to use iptables in a default-drop stance to
  28. protect services such as SSH with an additional layer of security in order to
  29. make the exploitation of vulnerabilities (both 0-day and unpatched code) much
  30. more difficult.
  31. endef
  32. define Package/fwknopd
  33. $(call Package/fwknop/Default)
  34. SECTION:=net
  35. CATEGORY:=Network
  36. SUBMENU:=Firewall
  37. TITLE+= Daemon
  38. DEPENDS:=+iptables +libfko +!FWKNOPD_NFQ_CAPTURE:libpcap +FWKNOPD_NFQ_CAPTURE:iptables-mod-nfqueue +FWKNOP_GPG:gnupg \
  39. +FWKNOPD_NFQ_CAPTURE:libnetfilter-queue +FWKNOPD_NFQ_CAPTURE:libnfnetlink
  40. endef
  41. define Package/fwknopd/description
  42. $(call Package/fwknop/Default/description)
  43. This package contains the fwknop daemon.
  44. endef
  45. define Package/fwknopd/conffiles
  46. /etc/fwknop/access.conf
  47. /etc/fwknop/fwknopd.conf
  48. /etc/config/fwknopd
  49. endef
  50. define Package/fwknopd/config
  51. source "$(SOURCE)/Config.in"
  52. endef
  53. define Package/fwknop
  54. $(call Package/fwknop/Default)
  55. SECTION:=net
  56. CATEGORY:=Network
  57. SUBMENU:=Firewall
  58. TITLE+= Client
  59. DEPENDS:=+libfko
  60. endef
  61. define Package/fwknop/description
  62. $(call Package/fwknop/Default/description)
  63. This package contains the fwknop client.
  64. endef
  65. define Package/libfko
  66. $(call Package/fwknop/Default)
  67. SECTION:=libs
  68. CATEGORY:=Libraries
  69. SUBMENU:=Firewall
  70. TITLE+= Library
  71. endef
  72. define Package/libfko/description
  73. $(call Package/fwknop/Default/description)
  74. This package contains the libfko shared library.
  75. endef
  76. ifneq ($(CONFIG_FWKNOPD_GPG),y)
  77. CONFIGURE_ARGS += --without-gpgme
  78. endif
  79. ifeq ($(CONFIG_FWKNOPD_NFQ_CAPTURE),y)
  80. CONFIGURE_ARGS += --enable-nfq-capture
  81. endif
  82. CONFIGURE_ARGS += \
  83. --with-iptables=/usr/sbin/iptables
  84. define Build/InstallDev
  85. $(INSTALL_DIR) $(1)/usr/include
  86. $(CP) $(PKG_INSTALL_DIR)/usr/include/fko.h $(1)/usr/include/
  87. $(INSTALL_DIR) $(1)/usr/lib
  88. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfko.{a,la,so*} $(1)/usr/lib/
  89. endef
  90. define Package/fwknopd/install
  91. $(INSTALL_DIR) $(1)/etc/config
  92. $(INSTALL_CONF) ./files/fwknopd $(1)/etc/config/fwknopd
  93. $(INSTALL_DIR) $(1)/etc/fwknop
  94. $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/fwknop/{access,fwknopd}.conf \
  95. $(1)/etc/fwknop/
  96. $(INSTALL_DIR) $(1)/etc/init.d
  97. $(INSTALL_BIN) ./files/fwknopd.init $(1)/etc/init.d/fwknopd
  98. $(INSTALL_DIR) $(1)/usr/sbin
  99. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/fwknopd $(1)/usr/sbin/
  100. endef
  101. define Package/fwknop/install
  102. $(INSTALL_DIR) $(1)/usr/bin
  103. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fwknop $(1)/usr/bin/
  104. endef
  105. define Package/libfko/install
  106. $(INSTALL_DIR) $(1)/usr/lib
  107. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfko.so.* $(1)/usr/lib/
  108. endef
  109. $(eval $(call BuildPackage,fwknopd))
  110. $(eval $(call BuildPackage,fwknop))
  111. $(eval $(call BuildPackage,libfko))