wok-4.x annotate tazpkg-web/receipt @ rev 3647

Add: attr
author Matthew Sheets <rcx@zoominternet.net>
date Mon Jul 06 16:57:02 2009 +0000 (2009-07-06)
parents c075da96e08a
children 48aebe803b83
rev   line source
pankso@3521 1 # SliTaz package receipt.
pankso@3521 2
pankso@3521 3 PACKAGE="tazpkg-web"
pankso@3521 4 VERSION="1.0"
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"
pankso@3521 11
pankso@3521 12 # Rules to gen a SliTaz package suitable for Tazpkg.
pankso@3521 13 genpkg_rules()
pankso@3521 14 {
pankso@3521 15 mkdir -p \
pankso@3521 16 $fs/usr/bin \
pankso@3521 17 $fs/etc/slitaz \
pankso@3521 18 $fs/var/lib/tazpkg-web
pankso@3521 19 # Page generator and config file.
pankso@3521 20 cp stuff/tazpkg-web $fs/usr/bin
pankso@3521 21 cp stuff/tazpkg-web.conf $fs/etc/slitaz
pankso@3521 22 # Var libs
pankso@3521 23 for i in html style xml search.cgi
pankso@3521 24 do
pankso@3521 25 cp -a stuff/$i $fs/var/lib/tazpkg-web
pankso@3521 26 done
pankso@3521 27 chmod 755 $fs/usr/bin/*
pankso@3521 28 chown -R root.root $fs
pankso@3521 29 }
pankso@3521 30
pankso@3521 31 post_install()
pankso@3521 32 {
pankso@3521 33 # On Tank we have pkgs.slitaz.org virtual host in: /home/slitaz/www
pankso@3521 34 if [ -d $1/home/slitaz/www/pkgs ]; then
pankso@3521 35 # Overwrite existing files.
pankso@3521 36 cp -a $1/var/lib/tazpkg-web/style/* $1/home/slitaz/www/pkgs
pankso@3521 37 cp -a $1/var/lib/tazpkg-web/search.cgi $1/home/slitaz/www/pkgs
pankso@3521 38 sed -i 's|/var/www/vhosts/pkgs|/home/slitaz/www/pkgs|' \
pankso@3521 39 $1/etc/slitaz/tazpkg-web.conf
pankso@3521 40 else
pankso@3521 41 cat << _EOT_
pankso@3521 42
paul@3528 43 To have a Tazpkg-web interface on your local system, you can add a vhost
paul@3528 44 to Lighttpd (or Apache) and the hostname to /etc/hosts. And you must also
paul@3528 45 copy files from: /var/lib/tazpkg-web. Example:
pankso@3521 46
pankso@3521 47 # mkdir -p /var/www/vhosts/pkgs && cd /var/lib/tazpkg-web
pankso@3521 48 # cp -a search.cgi style/* /var/www/vhosts/pkgs
pankso@3521 49 # tazpkg-web cooking
pankso@3521 50
pankso@3521 51 _EOT_
pankso@3521 52 fi
pankso@3521 53 }