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