From 365d80765d3f08c457b0a373c395c8e1940e44be Mon Sep 17 00:00:00 2001 From: Steven Barth Date: Sun, 25 May 2008 17:00:30 +0000 Subject: Renamed FFLuCI to LuCI, ffluci to luci and Freifunk Lua Configuration Interface to Lua Configuration Interface --- contrib/package/ffluci/Makefile | 230 --------------------- .../ffluci/ipkg/ffluci-ff-hannover.postinst | 4 - .../package/ffluci/ipkg/ffluci-ff-leipzig.postinst | 4 - .../package/ffluci/ipkg/ffluci-sgi-haserl.postinst | 9 - contrib/package/haserl-lua/Makefile | 2 +- contrib/package/luci-addons/Makefile | 4 +- contrib/package/luci-addons/dist/sbin/ffluci-flash | 88 -------- contrib/package/luci-addons/dist/sbin/luci-flash | 88 ++++++++ contrib/package/luci/Makefile | 230 +++++++++++++++++++++ .../package/luci/ipkg/luci-ff-hannover.postinst | 4 + contrib/package/luci/ipkg/luci-ff-leipzig.postinst | 4 + contrib/package/luci/ipkg/luci-sgi-haserl.postinst | 9 + 12 files changed, 338 insertions(+), 338 deletions(-) delete mode 100644 contrib/package/ffluci/Makefile delete mode 100644 contrib/package/ffluci/ipkg/ffluci-ff-hannover.postinst delete mode 100755 contrib/package/ffluci/ipkg/ffluci-ff-leipzig.postinst delete mode 100755 contrib/package/ffluci/ipkg/ffluci-sgi-haserl.postinst delete mode 100644 contrib/package/luci-addons/dist/sbin/ffluci-flash create mode 100644 contrib/package/luci-addons/dist/sbin/luci-flash create mode 100644 contrib/package/luci/Makefile create mode 100644 contrib/package/luci/ipkg/luci-ff-hannover.postinst create mode 100755 contrib/package/luci/ipkg/luci-ff-leipzig.postinst create mode 100755 contrib/package/luci/ipkg/luci-sgi-haserl.postinst (limited to 'contrib/package') diff --git a/contrib/package/ffluci/Makefile b/contrib/package/ffluci/Makefile deleted file mode 100644 index 71d8df2e3..000000000 --- a/contrib/package/ffluci/Makefile +++ /dev/null @@ -1,230 +0,0 @@ -include $(TOPDIR)/rules.mk - -PKG_BRANCH:=trunk -PKG_SOURCE_URL:=https://dev.leipzig.freifunk.net/svn/ff-luci/$(PKG_BRANCH) -PKG_REV:=$(shell LC_ALL=C svn info ${PKG_SOURCE_URL} | sed -ne's/^Last Changed Rev: //p') - -PKG_NAME:=ffluci -PKG_VERSION:=0.5+svn$(PKG_REV) -PKG_RELEASE:=1 - -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz -PKG_SOURCE_PROTO:=svn -PKG_SOURCE_VERSION:=$(PKG_REV) - -PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) -PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install - -# LUA_TARGET:=compile LUAC=$(BUILD_DIR_HOST)/lua/luac -LUA_TARGET:=source - - -include $(INCLUDE_DIR)/package.mk - -define Build/Configure -endef - -define Build/Compile - $(MAKE) -C$(PKG_BUILD_DIR) build LUA_TARGET=$(LUA_TARGET) -endef - - -define Package/ffluci/template - SECTION:=admin - CATEGORY:=Administration - TITLE:=FFLuCI - Freifunk Lua Configuration Interface - URL:=http://luci.freifunk-halle.net/ - MAINTAINER:=Steven Barth -endef - -define Package/ffluci/install/template - $(CP) $(PKG_BUILD_DIR)/$(2)/dist/* $(1)/ -R -endef - - -define Package/ffluci - $(call Package/ffluci/template) - MENU:=1 - DEPENDS:=+lua +luaposix +luci-addons -endef - -define Package/ffluci/conffiles -/etc/config/luci -endef - -define Package/ffluci/install - $(call Package/ffluci/install/template,$(1),core) - $(call Package/ffluci/install/template,$(1),themes/fledermaus) -endef - - -### Community Packages ### - -define Package/ffluci-ff-halle - $(call Package/ffluci/template) - DEPENDS:=ffluci \ - +ffluci-sgi-haserl +ffluci-mod-freifunk +ffluci-app-splash \ - +ffluci-app-ffwizard-leipzig \ - +olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice \ - +kmod-tun +ip - TITLE:=Freifunk Halle Community Meta-Package -endef - -define Package/ffluci-ff-halle/install -endef - - -define Package/ffluci-ff-leipzig - $(call Package/ffluci/template) - DEPENDS:=ffluci \ - +ffluci-sgi-haserl +ffluci-mod-freifunk +ffluci-app-splash \ - +ffluci-app-ffwizard-leipzig \ - +olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice \ - +kmod-tun +ip - TITLE:=Freifunk Leipzig Community Meta-Package -endef - -define Package/ffluci-ff-leipzig/install - $(call Package/ffluci/install/template,$(1),applications/community-leipzig) - $(CP) -a ./ipkg/ffluci-ff-leipzig.postinst $(1)/CONTROL/postinst -endef - - -define Package/ffluci-ff-hannover - $(call Package/ffluci/template) - DEPENDS:=ffluci \ - +ffluci-sgi-haserl +ffluci-mod-freifunk +ffluci-app-splash \ - +olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice - TITLE:=Freifunk Hannover Community Meta-Package - URL:=http://www.freifunk-hannover.de/ - MAINTAINER:=Mickey Knox -endef - -define Package/ffluci-ff-hannover/install - $(call Package/ffluci/install/template,$(1),applications/community-hannover) - $(CP) -a ./ipkg/ffluci-ff-hannover.postinst $(1)/CONTROL/postinst -endef - - -### Modules ### - -define Package/ffluci-mod-admin-core - $(call Package/ffluci/template) - DEPENDS:=ffluci - TITLE:=Core administrative pages -endef - -define Package/ffluci-mod-admin-core/install - $(call Package/ffluci/install/template,$(1),modules/admin-core) -endef - - -define Package/ffluci-mod-freifunk - $(call Package/ffluci/template) - DEPENDS:=ffluci +ffluci-mod-admin-core +ffluci-app-firewall - TITLE:=Freifunk public and administrative pages -endef - -define Package/ffluci-mod-freifunk/conffiles -/etc/config/freifunk -endef - -define Package/ffluci-mod-freifunk/install - $(call Package/ffluci/install/template,$(1),modules/freifunk) -endef - - - -### Applications ### - -define Package/ffluci-app-ffwizard-leipzig - $(call Package/ffluci/template) - DEPENDS:=ffluci +ffluci-mod-freifunk - TITLE:=Freifunk Leipzig configuration wizard -endef - -define Package/ffluci-app-ffwizard-leipzig/install - $(call Package/ffluci/install/template,$(1),applications/luci-ffwizard-leipzig) -endef - - -define Package/ffluci-app-firewall - $(call Package/ffluci/template) - DEPENDS:=ffluci +ffluci-mod-admin-core - TITLE:=Firewall and Portforwarding application -endef - -define Package/ffluci-app-firewall/conffiles -/etc/config/luci_fw -endef - -define Package/ffluci-app-firewall/install - $(call Package/ffluci/install/template,$(1),applications/luci-fw) - $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-fw/dist/etc/init.d/luci_fw $(1)/etc/init.d -endef - - -define Package/ffluci-app-splash - $(call Package/ffluci/template) - DEPENDS:=ffluci +ffluci-mod-freifunk +ffluci-sgi-haserl +iptables-mod-nat +iptables-mod-ipopt - TITLE:=Freifunk DHCP-Splash application -endef - -define Package/ffluci-app-splash/conffiles -/etc/config/luci_splash -endef - -define Package/ffluci-app-splash/install - $(call Package/ffluci/install/template,$(1),applications/luci-splash) - $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-splash/dist/usr/sbin/luci-splash $(1)/usr/sbin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-splash/dist/etc/init.d/luci_splash $(1)/etc/init.d - $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-splash/dist/etc/cron.minutely/luci_splash $(1)/etc/cron.minutely - $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-splash/dist/usr/lib/luci-splash/htdocs/cgi-bin/index.cgi $(1)/usr/lib/luci-splash/htdocs/cgi-bin - $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-splash/dist/www/cgi-bin/luci-splash $(1)/www/cgi-bin/luci-splash -endef - - - -### Server Gateway Interfaces ### - -define Package/ffluci-sgi-haserl - $(call Package/ffluci/template) - DEPENDS:=ffluci +haserl-lua - TITLE:=SGI for Haserl -endef - -define Package/ffluci-sgi-haserl/install - $(call Package/ffluci/install/template,$(1),applications/sgi-haserl) - $(CP) -a ./ipkg/ffluci-sgi-haserl.postinst $(1)/CONTROL/postinst -endef - - -define Package/ffluci-sgi-webuci - $(call Package/ffluci/template) - DEPENDS:=ffluci - TITLE:=SGI for Webuci -endef - -define Package/ffluci-sgi-webuci/install - $(call Package/ffluci/install/template,$(1),applications/sgi-webuci) -endef - - - - -$(eval $(call BuildPackage,ffluci)) - -$(eval $(call BuildPackage,ffluci-ff-halle)) -$(eval $(call BuildPackage,ffluci-ff-leipzig)) -$(eval $(call BuildPackage,ffluci-ff-hannover)) - -$(eval $(call BuildPackage,ffluci-mod-admin-core)) -$(eval $(call BuildPackage,ffluci-mod-freifunk)) - -$(eval $(call BuildPackage,ffluci-app-ffwizard-leipzig)) -$(eval $(call BuildPackage,ffluci-app-firewall)) -$(eval $(call BuildPackage,ffluci-app-splash)) - -$(eval $(call BuildPackage,ffluci-sgi-haserl)) -$(eval $(call BuildPackage,ffluci-sgi-webuci)) diff --git a/contrib/package/ffluci/ipkg/ffluci-ff-hannover.postinst b/contrib/package/ffluci/ipkg/ffluci-ff-hannover.postinst deleted file mode 100644 index 5c213adc4..000000000 --- a/contrib/package/ffluci/ipkg/ffluci-ff-hannover.postinst +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -[ -n "${IPKG_INSTROOT}" ] || { - ( . /etc/uci-defaults/ffluci-community-hannover ) && rm -f /etc/uci-defaults/ffluci-community-hannover -} diff --git a/contrib/package/ffluci/ipkg/ffluci-ff-leipzig.postinst b/contrib/package/ffluci/ipkg/ffluci-ff-leipzig.postinst deleted file mode 100755 index 26eace97d..000000000 --- a/contrib/package/ffluci/ipkg/ffluci-ff-leipzig.postinst +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/sh -[ -n "${IPKG_INSTROOT}" ] || { - ( . /etc/uci-defaults/ffluci-community-leipzig ) && rm -f /etc/uci-defaults/ffluci-community-leipzig -} diff --git a/contrib/package/ffluci/ipkg/ffluci-sgi-haserl.postinst b/contrib/package/ffluci/ipkg/ffluci-sgi-haserl.postinst deleted file mode 100755 index b6703dc06..000000000 --- a/contrib/package/ffluci/ipkg/ffluci-sgi-haserl.postinst +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -PATTERNS='/cgi-bin/ffluci/admin:root:$p$root /cgi-bin/ffluci-upload:root:$p$root' - -for i in $PATTERNS -do - grep "$i" ${IPKG_INSTROOT}/etc/httpd.conf >/dev/null 2>/dev/null || echo "$i" >> ${IPKG_INSTROOT}/etc/httpd.conf -done - -[ -n ${IPKG_INSTROOT} ] || /etc/init.d/httpd restart diff --git a/contrib/package/haserl-lua/Makefile b/contrib/package/haserl-lua/Makefile index bc8cb44eb..31158215a 100644 --- a/contrib/package/haserl-lua/Makefile +++ b/contrib/package/haserl-lua/Makefile @@ -12,7 +12,7 @@ PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=http://dev.leipzig.freifunk.net/svn/ff-luci/trunk/contrib/package-source/ \ - http://firmware.freifunk-halle.net/ffluci/package-source/ + http://firmware.freifunk-halle.net/luci/package-source/ PKG_MD5SUM:=b004005594b84e35839b1d5c330f8e03 diff --git a/contrib/package/luci-addons/Makefile b/contrib/package/luci-addons/Makefile index 04562257c..3428eb068 100644 --- a/contrib/package/luci-addons/Makefile +++ b/contrib/package/luci-addons/Makefile @@ -17,7 +17,7 @@ endef define Package/luci-addons SECTION:=utils CATEGORY:=Utilities - TITLE:=FFLuCI System Addons for Kamikaze + TITLE:=LuCI System Addons for Kamikaze URL:=http://luci.freifunk-halle.net endef @@ -28,7 +28,7 @@ define Package/luci-addons/install $(INSTALL_DIR) $(1)/etc/hotplug.d/iface $(INSTALL_BIN) ./dist/usr/bin/run-parts $(1)/usr/bin - $(INSTALL_BIN) ./dist/sbin/ffluci-flash $(1)/sbin + $(INSTALL_BIN) ./dist/sbin/luci-flash $(1)/sbin $(CP) ./dist/etc/crontabs/root $(1)/etc/crontabs/root $(CP) ./dist/etc/hotplug.d/iface/20-aliases $(1)/etc/hotplug.d/iface/20-aliases diff --git a/contrib/package/luci-addons/dist/sbin/ffluci-flash b/contrib/package/luci-addons/dist/sbin/ffluci-flash deleted file mode 100644 index 3ff478f0f..000000000 --- a/contrib/package/luci-addons/dist/sbin/ffluci-flash +++ /dev/null @@ -1,88 +0,0 @@ -#!/bin/sh -. /etc/functions.sh - -# initialize defaults -RAMFS_COPY_BIN="" # extra programs for temporary ramfs root -RAMFS_COPY_DATA="" # extra data files -export KEEP_PATTERN="" -export VERBOSE=1 - -# parse options -while [ -n "$1" ]; do - case "$1" in - -k) - shift - export KEEP_PATTERN="$1" - ;; - -*) - echo "Invalid option: $1" - exit 1 - ;; - *) break;; - esac - shift; -done - -export CONFFILES=/tmp/sysupgrade.conffiles -export CONF_TAR=/tmp/sysupgrade.tgz - -[ -f $CONFFILES ] && rm $CONFFILES -[ -f $CONF_TAR ] && rm $CONF_TAR - -export ARGV="$*" -export ARGC="$#" - -[ -z "$ARGV" ] && { - cat < - -Options: - -k <"file 1, file 2, ..."> Files to be kept -EOF - exit 1 -} - -add_pattern_conffiles() { - local file="$1" - find $KEEP_PATTERN >> "$file" 2>/dev/null - return 0 -} - -# hooks -sysupgrade_image_check="platform_check_image" -sysupgrade_init_conffiles="" - -[ -n "$KEEP_PATTERN" ] && append sysupgrade_init_conffiles "add_pattern_conffiles" - -include /lib/upgrade - -do_save_conffiles() { - [ -z "$(rootfs_type)" ] && { - echo "Cannot save config while running from ramdisk." - exit 3 - return 0 - } - run_hooks "$CONFFILES" $sysupgrade_init_conffiles - - v "Saving config files..." - [ "$VERBOSE" -gt 1 ] && TAR_V="v" || TAR_V="" - tar c${TAR_V}zf "$CONF_TAR" -T "$CONFFILES" 2>/dev/null -} - -type platform_check_image >/dev/null 2>/dev/null || { - echo "Firmware upgrade is not implemented for this platform." - exit 1 -} - -for check in $sysupgrade_image_check; do - ( eval "$check \"\$ARGV\"" ) || { - echo "Image check '$check' failed." - exit 2 - } -done - -[ -n "$sysupgrade_init_conffiles" ] && do_save_conffiles -run_hooks "" $sysupgrade_pre_upgrade - -v "Switching to ramdisk..." -run_ramfs '. /etc/functions.sh; include /lib/upgrade; do_upgrade' \ No newline at end of file diff --git a/contrib/package/luci-addons/dist/sbin/luci-flash b/contrib/package/luci-addons/dist/sbin/luci-flash new file mode 100644 index 000000000..3ff478f0f --- /dev/null +++ b/contrib/package/luci-addons/dist/sbin/luci-flash @@ -0,0 +1,88 @@ +#!/bin/sh +. /etc/functions.sh + +# initialize defaults +RAMFS_COPY_BIN="" # extra programs for temporary ramfs root +RAMFS_COPY_DATA="" # extra data files +export KEEP_PATTERN="" +export VERBOSE=1 + +# parse options +while [ -n "$1" ]; do + case "$1" in + -k) + shift + export KEEP_PATTERN="$1" + ;; + -*) + echo "Invalid option: $1" + exit 1 + ;; + *) break;; + esac + shift; +done + +export CONFFILES=/tmp/sysupgrade.conffiles +export CONF_TAR=/tmp/sysupgrade.tgz + +[ -f $CONFFILES ] && rm $CONFFILES +[ -f $CONF_TAR ] && rm $CONF_TAR + +export ARGV="$*" +export ARGC="$#" + +[ -z "$ARGV" ] && { + cat < + +Options: + -k <"file 1, file 2, ..."> Files to be kept +EOF + exit 1 +} + +add_pattern_conffiles() { + local file="$1" + find $KEEP_PATTERN >> "$file" 2>/dev/null + return 0 +} + +# hooks +sysupgrade_image_check="platform_check_image" +sysupgrade_init_conffiles="" + +[ -n "$KEEP_PATTERN" ] && append sysupgrade_init_conffiles "add_pattern_conffiles" + +include /lib/upgrade + +do_save_conffiles() { + [ -z "$(rootfs_type)" ] && { + echo "Cannot save config while running from ramdisk." + exit 3 + return 0 + } + run_hooks "$CONFFILES" $sysupgrade_init_conffiles + + v "Saving config files..." + [ "$VERBOSE" -gt 1 ] && TAR_V="v" || TAR_V="" + tar c${TAR_V}zf "$CONF_TAR" -T "$CONFFILES" 2>/dev/null +} + +type platform_check_image >/dev/null 2>/dev/null || { + echo "Firmware upgrade is not implemented for this platform." + exit 1 +} + +for check in $sysupgrade_image_check; do + ( eval "$check \"\$ARGV\"" ) || { + echo "Image check '$check' failed." + exit 2 + } +done + +[ -n "$sysupgrade_init_conffiles" ] && do_save_conffiles +run_hooks "" $sysupgrade_pre_upgrade + +v "Switching to ramdisk..." +run_ramfs '. /etc/functions.sh; include /lib/upgrade; do_upgrade' \ No newline at end of file diff --git a/contrib/package/luci/Makefile b/contrib/package/luci/Makefile new file mode 100644 index 000000000..e7d3e9093 --- /dev/null +++ b/contrib/package/luci/Makefile @@ -0,0 +1,230 @@ +include $(TOPDIR)/rules.mk + +PKG_BRANCH:=trunk +PKG_SOURCE_URL:=https://dev.leipzig.freifunk.net/svn/ff-luci/$(PKG_BRANCH) +PKG_REV:=$(shell LC_ALL=C svn info ${PKG_SOURCE_URL} | sed -ne's/^Last Changed Rev: //p') + +PKG_NAME:=luci +PKG_VERSION:=0.5+svn$(PKG_REV) +PKG_RELEASE:=1 + +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE:=$(PKG_SOURCE_SUBDIR).tar.gz +PKG_SOURCE_PROTO:=svn +PKG_SOURCE_VERSION:=$(PKG_REV) + +PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) +PKG_INSTALL_DIR:=$(PKG_BUILD_DIR)/ipkg-install + +# LUA_TARGET:=compile LUAC=$(BUILD_DIR_HOST)/lua/luac +LUA_TARGET:=source + + +include $(INCLUDE_DIR)/package.mk + +define Build/Configure +endef + +define Build/Compile + $(MAKE) -C$(PKG_BUILD_DIR) build LUA_TARGET=$(LUA_TARGET) +endef + + +define Package/luci/template + SECTION:=admin + CATEGORY:=Administration + TITLE:=LuCI - Lua Configuration Interface + URL:=http://luci.freifunk-halle.net/ + MAINTAINER:=Steven Barth +endef + +define Package/luci/install/template + $(CP) $(PKG_BUILD_DIR)/$(2)/dist/* $(1)/ -R +endef + + +define Package/luci + $(call Package/luci/template) + MENU:=1 + DEPENDS:=+lua +luaposix +luci-addons +endef + +define Package/luci/conffiles +/etc/config/luci +endef + +define Package/luci/install + $(call Package/luci/install/template,$(1),core) + $(call Package/luci/install/template,$(1),themes/fledermaus) +endef + + +### Community Packages ### + +define Package/luci-ff-halle + $(call Package/luci/template) + DEPENDS:=luci \ + +luci-sgi-haserl +luci-mod-freifunk +luci-app-splash \ + +luci-app-ffwizard-leipzig \ + +olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice \ + +kmod-tun +ip + TITLE:=Freifunk Halle Community Meta-Package +endef + +define Package/luci-ff-halle/install +endef + + +define Package/luci-ff-leipzig + $(call Package/luci/template) + DEPENDS:=luci \ + +luci-sgi-haserl +luci-mod-freifunk +luci-app-splash \ + +luci-app-ffwizard-leipzig \ + +olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice \ + +kmod-tun +ip + TITLE:=Freifunk Leipzig Community Meta-Package +endef + +define Package/luci-ff-leipzig/install + $(call Package/luci/install/template,$(1),applications/community-leipzig) + $(CP) -a ./ipkg/luci-ff-leipzig.postinst $(1)/CONTROL/postinst +endef + + +define Package/luci-ff-hannover + $(call Package/luci/template) + DEPENDS:=luci \ + +luci-sgi-haserl +luci-mod-freifunk +luci-app-splash \ + +olsrd +olsrd-mod-dyn-gw +olsrd-mod-txtinfo +olsrd-mod-nameservice + TITLE:=Freifunk Hannover Community Meta-Package + URL:=http://www.freifunk-hannover.de/ + MAINTAINER:=Mickey Knox +endef + +define Package/luci-ff-hannover/install + $(call Package/luci/install/template,$(1),applications/community-hannover) + $(CP) -a ./ipkg/luci-ff-hannover.postinst $(1)/CONTROL/postinst +endef + + +### Modules ### + +define Package/luci-mod-admin-core + $(call Package/luci/template) + DEPENDS:=luci + TITLE:=Core administrative pages +endef + +define Package/luci-mod-admin-core/install + $(call Package/luci/install/template,$(1),modules/admin-core) +endef + + +define Package/luci-mod-freifunk + $(call Package/luci/template) + DEPENDS:=luci +luci-mod-admin-core +luci-app-firewall + TITLE:=Freifunk public and administrative pages +endef + +define Package/luci-mod-freifunk/conffiles +/etc/config/freifunk +endef + +define Package/luci-mod-freifunk/install + $(call Package/luci/install/template,$(1),modules/freifunk) +endef + + + +### Applications ### + +define Package/luci-app-ffwizard-leipzig + $(call Package/luci/template) + DEPENDS:=luci +luci-mod-freifunk + TITLE:=Freifunk Leipzig configuration wizard +endef + +define Package/luci-app-ffwizard-leipzig/install + $(call Package/luci/install/template,$(1),applications/luci-ffwizard-leipzig) +endef + + +define Package/luci-app-firewall + $(call Package/luci/template) + DEPENDS:=luci +luci-mod-admin-core + TITLE:=Firewall and Portforwarding application +endef + +define Package/luci-app-firewall/conffiles +/etc/config/luci_fw +endef + +define Package/luci-app-firewall/install + $(call Package/luci/install/template,$(1),applications/luci-fw) + $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-fw/dist/etc/init.d/luci_fw $(1)/etc/init.d +endef + + +define Package/luci-app-splash + $(call Package/luci/template) + DEPENDS:=luci +luci-mod-freifunk +luci-sgi-haserl +iptables-mod-nat +iptables-mod-ipopt + TITLE:=Freifunk DHCP-Splash application +endef + +define Package/luci-app-splash/conffiles +/etc/config/luci_splash +endef + +define Package/luci-app-splash/install + $(call Package/luci/install/template,$(1),applications/luci-splash) + $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-splash/dist/usr/sbin/luci-splash $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-splash/dist/etc/init.d/luci_splash $(1)/etc/init.d + $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-splash/dist/etc/cron.minutely/luci_splash $(1)/etc/cron.minutely + $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-splash/dist/usr/lib/luci-splash/htdocs/cgi-bin/index.cgi $(1)/usr/lib/luci-splash/htdocs/cgi-bin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/applications/luci-splash/dist/www/cgi-bin/luci-splash $(1)/www/cgi-bin/luci-splash +endef + + + +### Server Gateway Interfaces ### + +define Package/luci-sgi-haserl + $(call Package/luci/template) + DEPENDS:=luci +haserl-lua + TITLE:=SGI for Haserl +endef + +define Package/luci-sgi-haserl/install + $(call Package/luci/install/template,$(1),applications/sgi-haserl) + $(CP) -a ./ipkg/luci-sgi-haserl.postinst $(1)/CONTROL/postinst +endef + + +define Package/luci-sgi-webuci + $(call Package/luci/template) + DEPENDS:=luci + TITLE:=SGI for Webuci +endef + +define Package/luci-sgi-webuci/install + $(call Package/luci/install/template,$(1),applications/sgi-webuci) +endef + + + + +$(eval $(call BuildPackage,luci)) + +$(eval $(call BuildPackage,luci-ff-halle)) +$(eval $(call BuildPackage,luci-ff-leipzig)) +$(eval $(call BuildPackage,luci-ff-hannover)) + +$(eval $(call BuildPackage,luci-mod-admin-core)) +$(eval $(call BuildPackage,luci-mod-freifunk)) + +$(eval $(call BuildPackage,luci-app-ffwizard-leipzig)) +$(eval $(call BuildPackage,luci-app-firewall)) +$(eval $(call BuildPackage,luci-app-splash)) + +$(eval $(call BuildPackage,luci-sgi-haserl)) +$(eval $(call BuildPackage,luci-sgi-webuci)) diff --git a/contrib/package/luci/ipkg/luci-ff-hannover.postinst b/contrib/package/luci/ipkg/luci-ff-hannover.postinst new file mode 100644 index 000000000..b41179f72 --- /dev/null +++ b/contrib/package/luci/ipkg/luci-ff-hannover.postinst @@ -0,0 +1,4 @@ +#!/bin/sh +[ -n "${IPKG_INSTROOT}" ] || { + ( . /etc/uci-defaults/luci-community-hannover ) && rm -f /etc/uci-defaults/luci-community-hannover +} diff --git a/contrib/package/luci/ipkg/luci-ff-leipzig.postinst b/contrib/package/luci/ipkg/luci-ff-leipzig.postinst new file mode 100755 index 000000000..5aff5db95 --- /dev/null +++ b/contrib/package/luci/ipkg/luci-ff-leipzig.postinst @@ -0,0 +1,4 @@ +#!/bin/sh +[ -n "${IPKG_INSTROOT}" ] || { + ( . /etc/uci-defaults/luci-community-leipzig ) && rm -f /etc/uci-defaults/luci-community-leipzig +} diff --git a/contrib/package/luci/ipkg/luci-sgi-haserl.postinst b/contrib/package/luci/ipkg/luci-sgi-haserl.postinst new file mode 100755 index 000000000..483a0867a --- /dev/null +++ b/contrib/package/luci/ipkg/luci-sgi-haserl.postinst @@ -0,0 +1,9 @@ +#!/bin/sh +PATTERNS='/cgi-bin/luci/admin:root:$p$root /cgi-bin/luci-upload:root:$p$root' + +for i in $PATTERNS +do + grep "$i" ${IPKG_INSTROOT}/etc/httpd.conf >/dev/null 2>/dev/null || echo "$i" >> ${IPKG_INSTROOT}/etc/httpd.conf +done + +[ -n ${IPKG_INSTROOT} ] || /etc/init.d/httpd restart -- cgit v1.2.3