hnetd: rework dependencies for luci-app-hnet
[feed/routing.git] / minimalist-pcproxy / Makefile
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
7 include $(TOPDIR)/rules.mk
8
9 PKG_NAME:=minimalist-pcproxy
10 PKG_SOURCE_VERSION:=c8d47ff42c4354f502830faeae13bd8f269401af
11 PKG_VERSION:=2014-06-02-$(PKG_SOURCE_VERSION)
12 PKG_RELEASE:=2
13
14 PKG_SOURCE_PROTO:=git
15 PKG_SOURCE_URL:=git://github.com/fingon/minimalist-pcproxy.git
16 PKG_MAINTAINER:=Markus Stenberg <fingon@iki.fi>
17
18 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
19 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
20
21 include $(INCLUDE_DIR)/package.mk
22 include $(INCLUDE_DIR)/cmake.mk
23
24 define Package/minimalist-pcproxy
25 SECTION:=net
26 CATEGORY:=Network
27 TITLE:=Lightweight PCP proxy
28 URL:=https://github.com/fingon/minimalist-pcproxy
29 DEPENDS:=+libubox +@IPV6
30 endef
31
32 define Package/minimalist-pcproxy/description
33 This package contains a daemon which can be used to forward
34 PCP (Port Control Protocol - RFC6887) requests requests to PCP remote servers.
35
36 In and of itself, it is not very useful, but combined with hnetd+miniupnpd
37 it allows for control of NAT forwarding and firewall pinholes from multiple
38 hops away.
39 endef
40
41 define Package/minimalist-pcproxy/install
42 $(INSTALL_DIR) $(1)/usr/sbin/
43 $(INSTALL_BIN) $(PKG_BUILD_DIR)/minimalist-pcproxy $(1)/usr/sbin/
44 $(INSTALL_DIR) $(1)/etc/uci-defaults
45 $(INSTALL_BIN) ./files/minimalist-pcproxy.defaults $(1)/etc/uci-defaults/x-minimalist-pcproxy.defaults
46 endef
47
48 define Package/minimalist-pcproxy/postinst
49 #!/bin/sh
50 [ -n "$${IPKG_INSTROOT}" ] || {
51 (. /etc/uci-defaults/x-minimalist-pcproxy.defaults) && rm -f /etc/uci-defaults/x-minimalist-pcproxy.defaults
52 }
53 exit 0
54 endef
55
56 $(eval $(call BuildPackage,minimalist-pcproxy))