Merge pull request #11353 from kvuorine/fwknop-fixes
[feed/packages.git] / net / pagekitec / Makefile
1 #
2 # Copyright (C) 2012-2018 Karl Palsson <karlp@tweak.net.au>
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 include $(TOPDIR)/rules.mk
9
10 PKG_NAME:=pagekitec
11 PKG_REV:=0.91.200718
12 PKG_VERSION:=$(PKG_REV)C
13 PKG_RELEASE:=1
14 PKG_LICENSE:=Apache-2.0
15 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
16 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
17 PKG_MIRROR_HASH:=62b0150caa93cacbac920b683e863ff10f351050b0124724cab653396cb494b9
18 PKG_SOURCE_URL:=https://github.com/pagekite/libpagekite.git
19 PKG_SOURCE_PROTO:=git
20 PKG_SOURCE_VERSION:=v$(PKG_REV)
21
22 include $(INCLUDE_DIR)/package.mk
23
24 PKG_FIXUP:=autoreconf
25 PKG_INSTALL:=1
26
27 CONFIGURE_ARGS += --without-java
28
29 define Package/pagekitec/default
30 SECTION:=net
31 CATEGORY:=Network
32 TITLE:=Make localhost servers publicly visible.
33 URL:=https://pagekite.net/wiki/Floss/LibPageKite/
34 MAINTAINER:= Karl Palsson <karlp@tweak.net.au>
35 DEPENDS:=+libopenssl +libpthread +libev
36 endef
37
38 define Package/libpagekite
39 $(call Package/pagekitec/default)
40 SECTION:=libs
41 CATEGORY:=Libraries
42 TITLE+= (library)
43 endef
44
45 define Package/pagekitec
46 $(call Package/pagekitec/default)
47 DEPENDS:=+libpagekite
48 endef
49
50 define Package/pagekitec/default/description
51 PageKite is a system for running publicly visible servers (generally
52 web servers) on machines without a direct connection to the Internet,
53 such as mobile devices or computers behind restrictive firewalls.
54 PageKite works around NAT, firewalls and IP-address limitations by
55 using a combination of tunnels and reverse proxies.
56
57 This package provides an implementation of the PageKite Protocol in C,
58 optimized for high-performance or embedded applications.
59
60 endef
61
62 define Package/libpagekite/description
63 $(call Package/pagekitec/default/description)
64
65 This package contains the core library
66 endef
67
68 define Package/pagekitec/description
69 $(call Package/pagekitec/default/description)
70
71 This package contains a basic backend useful for exposing http/ssh servers.
72
73 Basic UCI support for configuring this backend is also included.
74 endef
75
76 define Package/pagekitec/conffiles
77 /etc/config/pagekitec
78 endef
79
80 define Build/Configure
81 (cd $(PKG_BUILD_DIR); ./autogen.sh );
82 $(call Build/Configure/Default)
83 endef
84
85 #this installs files into ./staging_dir/. so that you can cross compile from the host
86 define Build/InstallDev
87 $(INSTALL_DIR) $(1)/usr/{include,lib/pkgconfig}
88 $(CP) $(PKG_INSTALL_DIR)/usr/include/libpagekite/pagekite.h $(1)/usr/include
89 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpagekite.{a,so*} $(1)/usr/lib/
90 $(CP) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/* $(1)/usr/lib/pkgconfig
91 endef
92
93 define Package/libpagekite/install
94 $(INSTALL_DIR) $(1)/usr/lib
95 $(CP) $(PKG_INSTALL_DIR)/usr/lib/libpagekite.so* $(1)/usr/lib
96 endef
97
98 define Package/pagekitec/install
99 $(CP) ./files/* $(1)/
100 $(INSTALL_DIR) $(1)/usr/bin
101 $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pagekitec $(1)/usr/bin
102 endef
103
104 $(eval $(call BuildPackage,pagekitec))
105 $(eval $(call BuildPackage,libpagekite))