Welcome to mirror list, hosted at ThFree Co, Russian Federation.

Makefile « minimalist-pcproxy - github.com/openwrt/routing.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 94dfff397bfdacc1dd1913acdd21e174664b84f9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#
# Copyright (C) 2014 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.

include $(TOPDIR)/rules.mk

PKG_NAME:=minimalist-pcproxy
PKG_SOURCE_VERSION:=9e41b6b698ff719960299711707785ffa0b250ab
PKG_VERSION:=2014-09-02-$(PKG_SOURCE_VERSION)
PKG_RELEASE:=2

PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=git://github.com/fingon/minimalist-pcproxy.git
PKG_MAINTAINER:=Markus Stenberg <fingon@iki.fi>

PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)

include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk

define Package/minimalist-pcproxy
  SECTION:=net
  CATEGORY:=Network
  TITLE:=Lightweight PCP proxy
  URL:=https://github.com/fingon/minimalist-pcproxy
  DEPENDS:=+libubox +@IPV6
endef

define Package/minimalist-pcproxy/description
This package contains a daemon which can be used to forward
PCP (Port Control Protocol - RFC6887) requests requests to PCP remote servers.

In and of itself, it is not very useful, but combined with hnetd+miniupnpd
it allows for control of NAT forwarding and firewall pinholes from multiple
hops away.
endef

define Package/minimalist-pcproxy/install
	$(INSTALL_DIR) $(1)/usr/sbin/
	$(INSTALL_BIN) $(PKG_BUILD_DIR)/minimalist-pcproxy $(1)/usr/sbin/
	$(INSTALL_DIR) $(1)/etc/uci-defaults
	$(INSTALL_BIN) ./files/minimalist-pcproxy.defaults $(1)/etc/uci-defaults/x-minimalist-pcproxy.defaults
endef

define Package/minimalist-pcproxy/postinst
#!/bin/sh
[ -n "$${IPKG_INSTROOT}" ] || {
	(. /etc/uci-defaults/x-minimalist-pcproxy.defaults) && rm -f /etc/uci-defaults/x-minimalist-pcproxy.defaults
}
exit 0
endef

$(eval $(call BuildPackage,minimalist-pcproxy))