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.

118 lines
3.1 KiB

  1. #
  2. # Copyright (C) 2011-2012 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.3
  10. PKG_RELEASE:=1
  11. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  12. PKG_SOURCE_URL:=http://www.cipherdyne.org/fwknop/download
  13. PKG_MD5SUM:=79e8a2feff54b429503bc7cade3bc32e
  14. PKG_MAINTAINER:=Jonathan Bennett <JBennett@incomsystems.biz>
  15. PKG_INSTALL:=1
  16. include $(INCLUDE_DIR)/package.mk
  17. define Package/fwknop/Default
  18. TITLE:=FireWall KNock OPerator
  19. URL:=http://www.cipherdyne.org/fwknop/
  20. endef
  21. define Package/fwknop/Default/description
  22. Fwknop implements an authorization scheme known as Single Packet Authorization
  23. (SPA) for Linux systems running iptables. This mechanism requires only a
  24. single encrypted and non-replayed packet to communicate various pieces of
  25. information including desired access through an iptables policy. The main
  26. application of this program is to use iptables in a default-drop stance to
  27. protect services such as SSH with an additional layer of security in order to
  28. make the exploitation of vulnerabilities (both 0-day and unpatched code) much
  29. more difficult.
  30. endef
  31. define Package/fwknopd
  32. $(call Package/fwknop/Default)
  33. SECTION:=net
  34. CATEGORY:=Network
  35. SUBMENU:=Firewall
  36. TITLE+= Daemon
  37. DEPENDS:=+iptables +libfko +libpcap
  38. endef
  39. define Package/fwknopd/description
  40. $(call Package/fwknop/Default/description)
  41. This package contains the fwknop daemon.
  42. endef
  43. define Package/fwknopd/conffiles
  44. /etc/fwknop/access.conf
  45. /etc/fwknop/fwknopd.conf
  46. endef
  47. define Package/fwknop
  48. $(call Package/fwknop/Default)
  49. SECTION:=net
  50. CATEGORY:=Network
  51. SUBMENU:=Firewall
  52. TITLE+= Client
  53. DEPENDS:=+libfko
  54. endef
  55. define Package/fwknop/description
  56. $(call Package/fwknop/Default/description)
  57. This package contains the fwknop client.
  58. endef
  59. define Package/libfko
  60. $(call Package/fwknop/Default)
  61. SECTION:=libs
  62. CATEGORY:=Libraries
  63. SUBMENU:=Firewall
  64. TITLE+= Library
  65. endef
  66. define Package/libfko/description
  67. $(call Package/fwknop/Default/description)
  68. This package contains the libfko shared library.
  69. endef
  70. CONFIGURE_ARGS += \
  71. --without-gpgme \
  72. --with-iptables=/usr/sbin/iptables
  73. define Build/InstallDev
  74. $(INSTALL_DIR) $(1)/usr/include
  75. $(CP) $(PKG_INSTALL_DIR)/usr/include/fko.h $(1)/usr/include/
  76. $(INSTALL_DIR) $(1)/usr/lib
  77. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfko.{a,la,so*} $(1)/usr/lib/
  78. endef
  79. define Package/fwknopd/install
  80. $(INSTALL_DIR) $(1)/etc/fwknop
  81. $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/fwknop/{access,fwknopd}.conf \
  82. $(1)/etc/fwknop/
  83. $(INSTALL_DIR) $(1)/etc/init.d
  84. $(INSTALL_BIN) $(PKG_BUILD_DIR)/extras/fwknop.init.openwrt \
  85. $(1)/etc/init.d/fwknopd
  86. $(INSTALL_DIR) $(1)/usr/sbin
  87. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/fwknopd $(1)/usr/sbin/
  88. endef
  89. define Package/fwknop/install
  90. $(INSTALL_DIR) $(1)/usr/bin
  91. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fwknop $(1)/usr/bin/
  92. endef
  93. define Package/libfko/install
  94. $(INSTALL_DIR) $(1)/usr/lib
  95. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfko.so.* $(1)/usr/lib/
  96. endef
  97. $(eval $(call BuildPackage,fwknopd))
  98. $(eval $(call BuildPackage,fwknop))
  99. $(eval $(call BuildPackage,libfko))