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.

119 lines
3.2 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.5
  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:=1ae000a499bf604a2aeef4d0a7a178c8
  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 +libpcap
  39. endef
  40. define Package/fwknopd/description
  41. $(call Package/fwknop/Default/description)
  42. This package contains the fwknop daemon.
  43. endef
  44. define Package/fwknopd/conffiles
  45. /etc/fwknop/access.conf
  46. /etc/fwknop/fwknopd.conf
  47. endef
  48. define Package/fwknop
  49. $(call Package/fwknop/Default)
  50. SECTION:=net
  51. CATEGORY:=Network
  52. SUBMENU:=Firewall
  53. TITLE+= Client
  54. DEPENDS:=+libfko
  55. endef
  56. define Package/fwknop/description
  57. $(call Package/fwknop/Default/description)
  58. This package contains the fwknop client.
  59. endef
  60. define Package/libfko
  61. $(call Package/fwknop/Default)
  62. SECTION:=libs
  63. CATEGORY:=Libraries
  64. SUBMENU:=Firewall
  65. TITLE+= Library
  66. endef
  67. define Package/libfko/description
  68. $(call Package/fwknop/Default/description)
  69. This package contains the libfko shared library.
  70. endef
  71. CONFIGURE_ARGS += \
  72. --without-gpgme \
  73. --with-iptables=/usr/sbin/iptables
  74. define Build/InstallDev
  75. $(INSTALL_DIR) $(1)/usr/include
  76. $(CP) $(PKG_INSTALL_DIR)/usr/include/fko.h $(1)/usr/include/
  77. $(INSTALL_DIR) $(1)/usr/lib
  78. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfko.{a,la,so*} $(1)/usr/lib/
  79. endef
  80. define Package/fwknopd/install
  81. $(INSTALL_DIR) $(1)/etc/fwknop
  82. $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/fwknop/{access,fwknopd}.conf \
  83. $(1)/etc/fwknop/
  84. $(INSTALL_DIR) $(1)/etc/init.d
  85. $(INSTALL_BIN) $(PKG_BUILD_DIR)/extras/fwknop.init.openwrt \
  86. $(1)/etc/init.d/fwknopd
  87. $(INSTALL_DIR) $(1)/usr/sbin
  88. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/sbin/fwknopd $(1)/usr/sbin/
  89. endef
  90. define Package/fwknop/install
  91. $(INSTALL_DIR) $(1)/usr/bin
  92. $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/fwknop $(1)/usr/bin/
  93. endef
  94. define Package/libfko/install
  95. $(INSTALL_DIR) $(1)/usr/lib
  96. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libfko.so.* $(1)/usr/lib/
  97. endef
  98. $(eval $(call BuildPackage,fwknopd))
  99. $(eval $(call BuildPackage,fwknop))
  100. $(eval $(call BuildPackage,libfko))