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.

135 lines
3.8 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:=7
  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 \
  42. +FWKNOPD_NFQ_CAPTURE:libnetfilter-queue +FWKNOPD_NFQ_CAPTURE:libnfnetlink \
  43. +FWKNOP_GPG:gnupg +FWKNOP_GPG:libgpgme
  44. endef
  45. define Package/fwknopd/description
  46. $(call Package/fwknop/Default/description)
  47. This package contains the fwknop daemon.
  48. endef
  49. define Package/fwknopd/conffiles
  50. /etc/fwknop/access.conf
  51. /etc/fwknop/fwknopd.conf
  52. /etc/config/fwknopd
  53. endef
  54. define Package/fwknopd/config
  55. source "$(SOURCE)/Config.in"
  56. endef
  57. define Package/fwknop
  58. $(call Package/fwknop/Default)
  59. SECTION:=net
  60. CATEGORY:=Network
  61. SUBMENU:=Firewall
  62. TITLE+= Client
  63. DEPENDS:=+libfko +FWKNOPD_GPG:gnupg +FWKNOPD_GPG:libgpgme
  64. endef
  65. define Package/fwknop/description
  66. $(call Package/fwknop/Default/description)
  67. This package contains the fwknop client.
  68. endef
  69. define Package/libfko
  70. $(call Package/fwknop/Default)
  71. SECTION:=libs
  72. CATEGORY:=Libraries
  73. SUBMENU:=Firewall
  74. TITLE+= Library
  75. DEPENDS:=+FWKNOPD_GPG:gnupg +FWKNOPD_GPG:libgpgme
  76. endef
  77. define Package/libfko/description
  78. $(call Package/fwknop/Default/description)
  79. This package contains the libfko shared library.
  80. endef
  81. CONFIGURE_ARGS += \
  82. --$(if $(CONFIG_FWKNOPD_NFQ_CAPTURE),en,dis)able-nfq-capture \
  83. --with$(if $(CONFIG_FWKNOPD_GPG),,out)-gpgme \
  84. --with-iptables=/usr/sbin/iptables \
  85. define Build/InstallDev
  86. $(INSTALL_DIR) $(1)/usr/include
  87. $(CP) $(PKG_INSTALL_DIR)/usr/include/fko.h $(1)/usr/include/
  88. $(INSTALL_DIR) $(1)/usr/lib
  89. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfko.{a,la,so*} $(1)/usr/lib/
  90. endef
  91. define Package/fwknopd/install
  92. $(INSTALL_DIR) $(1)/etc/config
  93. $(INSTALL_CONF) ./files/fwknopd $(1)/etc/config/fwknopd
  94. $(INSTALL_DIR) $(1)/etc/fwknop
  95. $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/fwknop/{access,fwknopd}.conf \
  96. $(1)/etc/fwknop/
  97. $(INSTALL_DIR) $(1)/etc/init.d
  98. $(INSTALL_BIN) ./files/fwknopd.init $(1)/etc/init.d/fwknopd
  99. $(INSTALL_DIR) $(1)/usr/sbin
  100. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/fwknopd $(1)/usr/sbin/
  101. endef
  102. define Package/fwknop/install
  103. $(INSTALL_DIR) $(1)/usr/bin
  104. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fwknop $(1)/usr/bin/
  105. endef
  106. define Package/libfko/install
  107. $(INSTALL_DIR) $(1)/usr/lib
  108. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfko.so.* $(1)/usr/lib/
  109. endef
  110. $(eval $(call BuildPackage,fwknopd))
  111. $(eval $(call BuildPackage,fwknop))
  112. $(eval $(call BuildPackage,libfko))