Bump...
On 01/04/2013 03:07 PM, Karl Palsson wrote:
From: Karl Palsson <ka...@remake.is>
Adds the PageKite C implementation and it's dependency, libev.
From the package description:
PageKite is a system for running publicly visible servers (generally
web servers) on machines without a direct connection to the Internet,
such as mobile devices or computers behind restrictive firewalls.
PageKite works around NAT, firewalls and IP-address limitations by
using a combination of tunnels and reverse proxies.
This package provides an implementation of the PageKite Protocol in C,
optimized for high-performance or embedded applications.
Basic UCI support for HTTP and SSH servers is also included in this
package.
https://pagekite.net/wiki/Floss/LibPageKite/
Signed-off-by: Karl Palsson <ka...@tweak.net.au>
---
libs/libev/Makefile | 59 +++++++++++++++++++++++++++++
net/pagekitec/Makefile | 60 ++++++++++++++++++++++++++++++
net/pagekitec/files/pagekitec.config | 1 +
net/pagekitec/files/pagekitec.init | 36 ++++++++++++++++++
net/pagekitec/files/pagekitec.uci-defaults | 25 +++++++++++++
5 files changed, 181 insertions(+)
create mode 100644 libs/libev/Makefile
create mode 100644 net/pagekitec/Makefile
create mode 100644 net/pagekitec/files/pagekitec.config
create mode 100755 net/pagekitec/files/pagekitec.init
create mode 100755 net/pagekitec/files/pagekitec.uci-defaults
diff --git a/libs/libev/Makefile b/libs/libev/Makefile
new file mode 100644
index 0000000..4607d9b
--- /dev/null
+++ b/libs/libev/Makefile
@@ -0,0 +1,59 @@
+#
+# Copyright (C) 2006-2010 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:=libev
+PKG_VERSION:=4.11
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://dist.schmorp.de/libev/Attic/
+PKG_MD5SUM:=cda69b858a1849dfe6ce17c930cf10cd
+
+PKG_FIXUP:=autoreconf
+PKG_INSTALL:=1
+PKG_BUILD_PARALLEL:=1
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/libev
+ SECTION:=libs
+ CATEGORY:=Libraries
+ TITLE:=Another event notification library
+ URL:=http://software.schmorp.de/pkg/libev.html
+ MAINTAINER:=Thomas Heil <h...@terminal-consulting.de>
+endef
+
+define Package/libev/description
+A full-featured and high-performance (see benchmark) event loop that is loosely
+modelled after libevent, but without its limitations and bugs.
+It is used, among others, in the GNU Virtual Private Ethernet and rxvt-unicode
+packages, and in the Deliantra MORPG Server and Client.
+endef
+
+TARGET_CFLAGS += $(FPIC)
+
+CONFIGURE_ARGS += \
+ --enable-shared \
+ --enable-static \
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include
+ $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libev.{la,a,so} $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libev.so.4* $(1)/usr/lib
+endef
+
+define Package/libev/install
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_INSTALL_DIR)/usr/lib/libev.so.4* $(1)/usr/lib/
+endef
+
+$(eval $(call BuildPackage,libev))
+
diff --git a/net/pagekitec/Makefile b/net/pagekitec/Makefile
new file mode 100644
index 0000000..471d1f4
--- /dev/null
+++ b/net/pagekitec/Makefile
@@ -0,0 +1,60 @@
+#
+# Copyright (C) 2012 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:=pagekitec
+PKG_REV:=e79bf00c4efd4e37e4941a054e1e6d8fbce5d00a
+PKG_VERSION:=121207C-$(PKG_REV)
+PKG_RELEASE:=1
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=g...@github.com:pagekite/libpagekite.git
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_VERSION:=$(PKG_REV)
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/$(PKG_NAME)
+ SECTION:=net
+ CATEGORY:=Network
+ TITLE:=Make localhost servers publicly visible.
+ URL:=https://pagekite.net/wiki/Floss/LibPageKite/
+ DEPENDS:=+libopenssl +libpthread +libev
+endef
+
+define Package/$(PKG_NAME)/description
+PageKite is a system for running publicly visible servers (generally
+ web servers) on machines without a direct connection to the Internet,
+ such as mobile devices or computers behind restrictive firewalls.
+ PageKite works around NAT, firewalls and IP-address limitations by
+ using a combination of tunnels and reverse proxies.
+
+ This package provides an implementation of the PageKite Protocol in C,
+ optimized for high-performance or embedded applications.
+
+ Basic UCI support for HTTP and SSH servers is also included in this package.
+
+ https://pagekite.net/wiki/Floss/LibPageKite/
+endef
+
+define Package/$(PKG_NAME)/conffiles
+/etc/config/$(PKG_NAME)
+endef
+
+define Package/$(PKG_NAME)/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(PKG_NAME) $(1)/usr/bin
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) ./files/$(PKG_NAME).init $(1)/etc/init.d/$(PKG_NAME)
+ $(INSTALL_DIR) $(1)/etc/config
+ $(INSTALL_CONF) ./files/$(PKG_NAME).config $(1)/etc/config/$(PKG_NAME)
+ $(INSTALL_DIR) $(1)/etc/uci-defaults
+ $(INSTALL_BIN) ./files/$(PKG_NAME).uci-defaults
$(1)/etc/uci-defaults/$(PKG_NAME)
+endef
+
+$(eval $(call BuildPackage,$(PKG_NAME)))
diff --git a/net/pagekitec/files/pagekitec.config
b/net/pagekitec/files/pagekitec.config
new file mode 100644
index 0000000..a26f615
--- /dev/null
+++ b/net/pagekitec/files/pagekitec.config
@@ -0,0 +1 @@
+config pagekitec pagekitec
diff --git a/net/pagekitec/files/pagekitec.init
b/net/pagekitec/files/pagekitec.init
new file mode 100755
index 0000000..c302c25
--- /dev/null
+++ b/net/pagekitec/files/pagekitec.init
@@ -0,0 +1,36 @@
+#!/bin/sh /etc/rc.common
+# Oct 2012, ka...@remake.is
+START=99
+APP=pagekitec
+PID_FILE=/var/run/$APP.pid
+NAME=$(uci -q get pagekitec.pagekitec.kitename)
+KEY=$(uci -q get pagekitec.pagekitec.kitesecret)
+if [ "$NAME" = "" ] || [ "$KEY" = "" ]; then
+ echo "Both kitename and kitesecret must be specified!"
+ exit 1
+fi
+ARGS=
+QQ=$(uci -q get pagekitec.pagekitec.simple_http)
+if [ $? -eq 0 ] && [ $QQ -eq 1 ]; then
+ ARGS="$ARGS 80 http $NAME 80 $KEY"
+fi
+QQ=$(uci -q get pagekitec.pagekitec.simple_ssh)
+if [ $? -eq 0 ] && [ $QQ -eq 1 ]; then
+ ARGS="$ARGS 22 raw $NAME 443 $KEY"
+fi
+
+start() {
+ # later ;) user_exists pagekitec 201 || user_add pagekitec 201
+ start-stop-daemon -S -x $APP -p $PID_FILE -m -b -- $ARGS
+}
+
+stop() {
+ start-stop-daemon -K -n $APP -p $PID_FILE -s TERM
+ rm -rf $PID_FILE
+}
+
+restart() {
+ stop;
+ sleep 1;
+ start;
+}
diff --git a/net/pagekitec/files/pagekitec.uci-defaults
b/net/pagekitec/files/pagekitec.uci-defaults
new file mode 100755
index 0000000..2975a65
--- /dev/null
+++ b/net/pagekitec/files/pagekitec.uci-defaults
@@ -0,0 +1,25 @@
+#!/bin/sh
+# Set up any defaults for UCI, run once post installation
+# Simple version, doesn't support dependencies
+# Karl Palsson, OpenWrt.org, 2012
+THISAPP=pagekitec
+# Optional, defaults to $THISAPP
+#THISAPP_INIT=
+
+#### Should not need any changes below here........
+
+# First install our own init script links....
+BLAH=$(uci -q get ucitrack.@${THISAPP}[-1])
+if [ $? -eq 1 ]; then
+ # section doesn't exist....
+ uci add ucitrack ${THISAPP}
+fi
+INIT=$(uci -q get ucitrack.@${THISAPP}[-1].init)
+if [ $? -eq 1 ]; then
+ # section existed, but not the init entry..."
+ uci set ucitrack.@${THISAPP}[-1].init=${THISAPP_INIT:-${THISAPP}}
+else
+ echo "${THISAPP} section in ucitrack already exists, skipping"
+fi
+
+uci commit ucitrack
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel