summaryrefslogtreecommitdiffhomepage
path: root/contrib/package
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2008-03-02 21:52:58 +0000
committerJo-Philipp Wich <jow@openwrt.org>2008-03-02 21:52:58 +0000
commit3f5de3273c9e103b4909802e339db06fe0b53312 (patch)
tree793ef66c9456665f7b472e214d79b1078fccebe8 /contrib/package
* new project: ff-luci - Freifunk Lua Configuration Interface
Diffstat (limited to 'contrib/package')
-rw-r--r--contrib/package/ffluci/Makefile43
-rwxr-xr-xcontrib/package/ffluci/ipkg/ffluci.postinst4
l---------contrib/package/ffluci/src1
-rw-r--r--contrib/package/haserl-devel/Makefile39
-rw-r--r--contrib/package/luafilesystem/Makefile44
5 files changed, 131 insertions, 0 deletions
diff --git a/contrib/package/ffluci/Makefile b/contrib/package/ffluci/Makefile
new file mode 100644
index 000000000..12e811d2c
--- /dev/null
+++ b/contrib/package/ffluci/Makefile
@@ -0,0 +1,43 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=ffluci
+PKG_VERSION:=0.1
+PKG_RELEASE:=1
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
+
+MAKE_ACTION:=dist-source
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/ffluci
+ SECTION:=admin
+ CATEGORY:=Administration
+ TITLE:=FFLuCI
+ DEPENDS:=+liblua +luafilesystem +haserl
+ MAINTAINER:=Steven Barth <steven-at-midlink-dot-org>
+endef
+
+define Build/Prepare
+ mkdir -p $(PKG_BUILD_DIR)
+ $(CP) ./src/* $(PKG_BUILD_DIR)/ -R
+endef
+
+define Build/Configure
+endef
+
+define Build/Compile
+ $(MAKE) -C $(PKG_BUILD_DIR) dist-source
+endef
+
+define Package/ffluci/install
+ $(INSTALL_DIR) $(1)/usr/lib/lua
+ $(INSTALL_DIR) $(1)/www/cgi-bin
+ $(CP) $(PKG_BUILD_DIR)/dist/* $(1)/usr/lib/lua/ -R
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/contrib/ffluci $(1)/www/cgi-bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/contrib/index.cgi $(1)/www/cgi-bin
+ $(CP) -a ./ipkg/ffluci.postinst $(1)/CONTROL/postinst
+endef
+
+$(eval $(call BuildPackage,ffluci))
diff --git a/contrib/package/ffluci/ipkg/ffluci.postinst b/contrib/package/ffluci/ipkg/ffluci.postinst
new file mode 100755
index 000000000..0dbac00eb
--- /dev/null
+++ b/contrib/package/ffluci/ipkg/ffluci.postinst
@@ -0,0 +1,4 @@
+#!/bin/sh
+PATTERN='/cgi-bin/ffluci/admin:root:$p$root'
+grep $PATTERN ${IPKG_INSTROOT}/etc/httpd.conf >/dev/null 2>/dev/null || echo $PATTERN >> ${IPKG_INSTROOT}/etc/httpd.conf
+[ -z ${IPKG_INSTROOT} ] && /etc/init.d/httpd restart
diff --git a/contrib/package/ffluci/src b/contrib/package/ffluci/src
new file mode 120000
index 000000000..a8a4f8c21
--- /dev/null
+++ b/contrib/package/ffluci/src
@@ -0,0 +1 @@
+../../.. \ No newline at end of file
diff --git a/contrib/package/haserl-devel/Makefile b/contrib/package/haserl-devel/Makefile
new file mode 100644
index 000000000..3621c4691
--- /dev/null
+++ b/contrib/package/haserl-devel/Makefile
@@ -0,0 +1,39 @@
+#
+# Copyright (C) 2006 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+# $Id$
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=haserl
+PKG_VERSION:=0.9.22
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=@SF/haserl
+PKG_MD5SUM:=b791150f2e5704d03b1fb698f4edc6c0
+
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/haserl
+ SECTION:=utils
+ CATEGORY:=Utilities
+ TITLE:=A CGI wrapper to embed shell scripts in HTML documents
+ URL:=http://haserl.sourceforge.net/
+ DEPENDS:=+liblua
+endef
+
+CONFIGURE_ARGS += \
+ --with-lua
+
+define Package/haserl/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(STRIP) $(PKG_BUILD_DIR)/src/haserl
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/haserl $(1)/usr/bin/
+endef
+
+$(eval $(call BuildPackage,haserl))
diff --git a/contrib/package/luafilesystem/Makefile b/contrib/package/luafilesystem/Makefile
new file mode 100644
index 000000000..6c73cf501
--- /dev/null
+++ b/contrib/package/luafilesystem/Makefile
@@ -0,0 +1,44 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=luafilesystem
+PKG_VERSION:=1.4.0
+PKG_RELEASE:=1
+
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=http://luaforge.net/frs/download.php/3158
+PKG_MD5SUM:=6f3d247f27820b8f045431ad81bcd3ad
+
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/luafilesystem
+ SECTION:=lib
+ CATEGORY:=Libraries
+ TITLE:=Lua FS library
+ URL:=http://www.keplerproject.org/luafilesystem/
+ DEPENDS:=+liblua
+ MAINTAINER:=Steven Barth <steven-at-midlink-dot-org>
+endef
+
+define Build/Configure
+endef
+
+define Build/Compile
+ $(MAKE) -C $(PKG_BUILD_DIR) \
+ CC="$(TARGET_CROSS)gcc" \
+ LD="$(TARGET_CROSS)ld" \
+ AR="$(TARGET_CROSS)ar rcu" \
+ RANLIB="$(TARGET_CROSS)ranlib" \
+ INSTALL_ROOT=/usr \
+ LUA_INC=$(STAGING_DIR)/usr/include
+endef
+
+define Package/luafilesystem/install
+ $(INSTALL_DIR) $(1)/usr/lib/lua
+ $(STRIP) $(PKG_BUILD_DIR)/src/lfs.so
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/lfs.so $(1)/usr/lib/lua
+endef
+
+$(eval $(call BuildPackage,luafilesystem))