Makefile 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #
  2. # Copyright (C) 2014 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. include $(TOPDIR)/rules.mk
  7. PKG_NAME:=minimalist-pcproxy
  8. PKG_SOURCE_VERSION:=2d6d1b0b0a3b79a9b4a9b0a7606a84600a967bcb
  9. PKG_VERSION:=2015-01-12-$(PKG_SOURCE_VERSION)
  10. PKG_RELEASE:=1
  11. PKG_SOURCE_PROTO:=git
  12. PKG_SOURCE_URL:=https://github.com/fingon/minimalist-pcproxy.git
  13. PKG_MAINTAINER:=Markus Stenberg <fingon@iki.fi>
  14. PKG_LICENSE:=GPL-2.0
  15. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
  16. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  17. include $(INCLUDE_DIR)/package.mk
  18. include $(INCLUDE_DIR)/cmake.mk
  19. define Package/minimalist-pcproxy
  20. SECTION:=net
  21. CATEGORY:=Network
  22. TITLE:=Lightweight PCP proxy
  23. URL:=https://github.com/fingon/minimalist-pcproxy
  24. DEPENDS:=+libubox @IPV6
  25. endef
  26. define Package/minimalist-pcproxy/description
  27. This package contains a daemon which can be used to forward
  28. PCP (Port Control Protocol - RFC6887) requests requests to PCP remote servers.
  29. In and of itself, it is not very useful, but combined with hnetd+miniupnpd
  30. it allows for control of NAT forwarding and firewall pinholes from multiple
  31. hops away.
  32. endef
  33. define Package/minimalist-pcproxy/install
  34. $(INSTALL_DIR) $(1)/usr/sbin/
  35. $(INSTALL_BIN) $(PKG_BUILD_DIR)/minimalist-pcproxy $(1)/usr/sbin/
  36. $(INSTALL_DIR) $(1)/etc/uci-defaults
  37. $(INSTALL_BIN) ./files/minimalist-pcproxy.defaults $(1)/etc/uci-defaults/x-minimalist-pcproxy.defaults
  38. endef
  39. define Package/minimalist-pcproxy/postinst
  40. #!/bin/sh
  41. [ -n "$${IPKG_INSTROOT}" ] || {
  42. (. /etc/uci-defaults/x-minimalist-pcproxy.defaults) && rm -f /etc/uci-defaults/x-minimalist-pcproxy.defaults
  43. }
  44. exit 0
  45. endef
  46. $(eval $(call BuildPackage,minimalist-pcproxy))