From b539293bfbea3c14f1c81a15881aa317a2bf33f6 Mon Sep 17 00:00:00 2001 From: lars Date: Wed, 18 May 2005 03:31:27 +0000 Subject: [PATCH] package created --- web-splash/README | 31 +++++++++++++++++++++++++++++++ web-splash/ipkg/conffiles | 1 + web-splash/ipkg/control | 23 +++++++++++++++++++++++ web-splash/ipkg/rules | 36 ++++++++++++++++++++++++++++++++++++ web-splash/web-splash.conf | 6 +++--- 5 files changed, 94 insertions(+), 3 deletions(-) create mode 100644 web-splash/README create mode 100644 web-splash/ipkg/conffiles create mode 100644 web-splash/ipkg/control create mode 100755 web-splash/ipkg/rules diff --git a/web-splash/README b/web-splash/README new file mode 100644 index 0000000..528608a --- /dev/null +++ b/web-splash/README @@ -0,0 +1,31 @@ +1. creating the ipkg package + +1.1 install ipkg-utils + +- get it: ftp://ftp.handhelds.org/packages/ipkg-utils/ +- unpack it +- make +- make install + +Strangely the script ipkg-buildpackage does not get installed. You have to copy it manually +to /usr/local/bin/. + +There is a problem with the choice of the archiver: +- tar +- ar +ipkg-build (which is called by ipkg-buildpackage) uses "ar" by default, but most busybox +installations do not include this archiver. +To change the default archiver for ipkg-build you could pass the option "-c" to it. +As it is called by ipkg-buildpackage you have to change this by hand: +- look for a line that starts with "ipkg-build " near to the end of ipkg-buildpackage +- insert "-c" after "ipkg-build" + + +1.2 create control files for the package +for detailed instructions see "http://handhelds.org/moin/moin.cgi/BuildingIpkgs" +(note: the directory "CONTROL" can be "ipkg" too) + + +1.3 package the software +fakeroot SOURCE_DIR ipkg-buildpackage + diff --git a/web-splash/ipkg/conffiles b/web-splash/ipkg/conffiles new file mode 100644 index 0000000..0a9b07c --- /dev/null +++ b/web-splash/ipkg/conffiles @@ -0,0 +1 @@ +/etc/web-splash.conf diff --git a/web-splash/ipkg/control b/web-splash/ipkg/control new file mode 100644 index 0000000..e42993f --- /dev/null +++ b/web-splash/ipkg/control @@ -0,0 +1,23 @@ +Package: web-splash +Priority: optional +Version: 0.1 +Architecture: mipsel +Maintainer: Lars Kruse +Section: net +Source: https://systemausfall.org/toolforge/web-splash +Depends: grep, sed, iptables +Description: web-splash helps you administering an open access point + Users who want to access the internet with your access point will + at first retrieve a webpage that informs them about the net. + After viewing this page they are allowed to use the net for as long + as you define. + This allows you (the administrator) to inform the users about the free + service they use. + . + It is recommended to use this package with thttpd or any other webserver + that allows you to define a custom error-404-page or a webserver that + supports aliases with regular expression matching. + . + The package web-limit can be used with web-splash to define a traffic + limitation and decrease the available bandwith depending on the remaining + volume. diff --git a/web-splash/ipkg/rules b/web-splash/ipkg/rules new file mode 100755 index 0000000..ec224bd --- /dev/null +++ b/web-splash/ipkg/rules @@ -0,0 +1,36 @@ +#!/usr/bin/make -f + +# DESTDIR should be defined +DESTDIR ?= /tmp/web-splash + + +build: + @echo "done" + + +install: + @# config files + @mkdir -p $(DESTDIR)/etc + @cp web-splash.conf $(DESTDIR)/etc + + @# web site + @mkdir -p $(DESTDIR)/www/web-splash + @cp splash-site/* $(DESTDIR)/www/web-splash/ + @mkdir -p $(DESTDIR)/www/cgi-bin + @cp web-splash.cgi $(DESTDIR)/www/cgi-bin/ + @ln -s web-splash/index.html $(DESTDIR)/www/index.html + @mkdir -p $(DESTDIR)/www/errors + @ln -s ../index.html $(DESTDIR)/www/errors/err404.html + + @# install binaries + @mkdir -p $(DESTDIR)/usr/lib + @cp splash-functions.inc $(DESTDIR)/usr/lib + @mkdir -p $(DESTDIR)/usr/bin + @cp web-splash.sh $(DESTDIR)/usr/bin + + @# startup script + @mkdir -p $(DESTDIR)/etc/init.d + @echo -e "#!/bin/sh\n/usr/bin/web-splash.sh start" >$(DESTDIR)/etc/init.d/S90web-splash + +clean: + @echo "done" diff --git a/web-splash/web-splash.conf b/web-splash/web-splash.conf index 0a609e6..db8be5b 100644 --- a/web-splash/web-splash.conf +++ b/web-splash/web-splash.conf @@ -7,9 +7,9 @@ IF_SRC=eth1 INTERN_IP=192.168.1.1 # name of the local file that should be displayed by the cgi -SPLASH_DOCUMENT=/test/splash-site/splash-info.html +SPLASH_DOCUMENT=/www/web-splash/splash-info.html -# allowed and denied IPs - separete by spaces +# allowed and denied IPs - separated by spaces ALLOW_IP_LIST="" DENY_IP_LIST="" @@ -31,4 +31,4 @@ IPT=/sbin/iptables [ ! -x "$IPT" ] && IPT=/usr/sbin/iptables # path to the web-splash scripts -SPLASH_BIN=/test +SPLASH_BIN=/usr/bin