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.

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