wok annotate tazpkg-web/receipt @ rev 7846

Up: linuxqq v1.0.2
author Liu Peng <rocky@slitaz.org>
date Tue Dec 28 16:07:50 2010 +0000 (2010-12-28)
parents 48aebe803b83
children 84af4a5de089
rev   line source
pankso@3521 1 # SliTaz package receipt.
pankso@3521 2
pankso@3521 3 PACKAGE="tazpkg-web"
pankso@4800 4 VERSION="1.1"
pankso@3521 5 CATEGORY="network"
pankso@3521 6 SHORT_DESC="SliTaz packages Web interfaces (http://pkgs.slitaz.org/)."
pankso@3521 7 MAINTAINER="pankso@slitaz.org"
pankso@3521 8 DEPENDS="lighttpd"
pankso@3521 9 WEB_SITE="http://www.slitaz.org/"
pankso@3521 10 CONFIGS="/etc/slitaz/tazpkg-web.conf"
jozee@4973 11 TAGS="slitaz package-manager"
pankso@3521 12
pankso@3521 13 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@3521 14 genpkg_rules()
pankso@3521 15 {
pankso@3521 16 mkdir -p \
pankso@3521 17 $fs/usr/bin \
pankso@3521 18 $fs/etc/slitaz \
pankso@3521 19 $fs/var/lib/tazpkg-web
pankso@3521 20 # Page generator and config file.
pankso@3521 21 cp stuff/tazpkg-web $fs/usr/bin
pankso@3521 22 cp stuff/tazpkg-web.conf $fs/etc/slitaz
pankso@3521 23 # Var libs
pankso@3521 24 for i in html style xml search.cgi
pankso@3521 25 do
pankso@3521 26 cp -a stuff/$i $fs/var/lib/tazpkg-web
pankso@3521 27 done
pankso@3521 28 chmod 755 $fs/usr/bin/*
pankso@3521 29 chown -R root.root $fs
pankso@3521 30 }
pankso@3521 31
pankso@3521 32 post_install()
pankso@3521 33 {
pankso@3521 34 # On Tank we have pkgs.slitaz.org virtual host in: /home/slitaz/www
pankso@3521 35 if [ -d $1/home/slitaz/www/pkgs ]; then
pankso@3521 36 # Overwrite existing files.
pankso@3521 37 cp -a $1/var/lib/tazpkg-web/style/* $1/home/slitaz/www/pkgs
pankso@3521 38 cp -a $1/var/lib/tazpkg-web/search.cgi $1/home/slitaz/www/pkgs
pankso@3521 39 sed -i 's|/var/www/vhosts/pkgs|/home/slitaz/www/pkgs|' \
pankso@3521 40 $1/etc/slitaz/tazpkg-web.conf
pankso@3521 41 else
pankso@3521 42 cat << _EOT_
pankso@3521 43
paul@3528 44 To have a Tazpkg-web interface on your local system, you can add a vhost
paul@3528 45 to Lighttpd (or Apache) and the hostname to /etc/hosts. And you must also
paul@3528 46 copy files from: /var/lib/tazpkg-web. Example:
pankso@3521 47
pankso@3521 48 # mkdir -p /var/www/vhosts/pkgs && cd /var/lib/tazpkg-web
pankso@3521 49 # cp -a search.cgi style/* /var/www/vhosts/pkgs
pankso@3521 50 # tazpkg-web cooking
pankso@3521 51
pankso@3521 52 _EOT_
pankso@3521 53 fi
pankso@3521 54 }