wok-current rev 3521

Add Tazpkg-web - SliTaz Packages Web interface
author Christophe Lincoln <pankso@slitaz.org>
date Sun Jun 21 03:26:15 2009 +0200 (2009-06-21)
parents 300e77088e0f
children 9cf36f931f36
files tazpkg-web/receipt tazpkg-web/stuff/README tazpkg-web/stuff/html/catlist.html tazpkg-web/stuff/html/footer.html tazpkg-web/stuff/html/header.html tazpkg-web/stuff/html/home.html tazpkg-web/stuff/html/menu.html tazpkg-web/stuff/search.cgi tazpkg-web/stuff/style/favicon.ico tazpkg-web/stuff/style/pics/slitaz.png tazpkg-web/stuff/style/pics/website/content-bl.png tazpkg-web/stuff/style/pics/website/content-br.png tazpkg-web/stuff/style/pics/website/content-tl.png tazpkg-web/stuff/style/pics/website/content-tr.png tazpkg-web/stuff/style/pics/website/header.png tazpkg-web/stuff/style/pics/website/logo.png tazpkg-web/stuff/style/pics/website/nav-bl.png tazpkg-web/stuff/style/pics/website/nav-br.png tazpkg-web/stuff/style/pics/website/nav-tl.png tazpkg-web/stuff/style/pics/website/nav-tr.png tazpkg-web/stuff/style/pics/website/xhtml10.png tazpkg-web/stuff/style/slitaz.css tazpkg-web/stuff/tazpkg-web tazpkg-web/stuff/tazpkg-web.conf tazpkg-web/stuff/xml/rss-header.xml
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/tazpkg-web/receipt	Sun Jun 21 03:26:15 2009 +0200
     1.3 @@ -0,0 +1,53 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="tazpkg-web"
     1.7 +VERSION="1.0"
     1.8 +CATEGORY="network"
     1.9 +SHORT_DESC="SliTaz packages Web interfaces (http://pkgs.slitaz.org/)."
    1.10 +MAINTAINER="pankso@slitaz.org"
    1.11 +DEPENDS="lighttpd"
    1.12 +WEB_SITE="http://www.slitaz.org/"
    1.13 +CONFIGS="/etc/slitaz/tazpkg-web.conf"
    1.14 +
    1.15 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.16 +genpkg_rules()
    1.17 +{
    1.18 +	mkdir -p \
    1.19 +		$fs/usr/bin \
    1.20 +		$fs/etc/slitaz \
    1.21 +		$fs/var/lib/tazpkg-web
    1.22 +	# Page generator and config file.
    1.23 +	cp stuff/tazpkg-web $fs/usr/bin
    1.24 +	cp stuff/tazpkg-web.conf $fs/etc/slitaz
    1.25 +	# Var libs
    1.26 +	for i in html style xml search.cgi
    1.27 +	do
    1.28 +		cp -a stuff/$i $fs/var/lib/tazpkg-web
    1.29 +	done
    1.30 +	chmod 755 $fs/usr/bin/*
    1.31 +	chown -R root.root $fs
    1.32 +}
    1.33 +
    1.34 +post_install()
    1.35 +{
    1.36 +	# On Tank we have pkgs.slitaz.org virtual host in: /home/slitaz/www
    1.37 +	if [ -d $1/home/slitaz/www/pkgs ]; then
    1.38 +		# Overwrite existing files.
    1.39 +		cp -a $1/var/lib/tazpkg-web/style/* $1/home/slitaz/www/pkgs
    1.40 +		cp -a $1/var/lib/tazpkg-web/search.cgi $1/home/slitaz/www/pkgs
    1.41 +		sed -i 's|/var/www/vhosts/pkgs|/home/slitaz/www/pkgs|' \
    1.42 +			$1/etc/slitaz/tazpkg-web.conf
    1.43 +	else
    1.44 +		cat << _EOT_
    1.45 +
    1.46 +To have Tazpkg-web interface on your local system you can add a vhost
    1.47 +to Lighttp (or Apache) and the hostname to /etc/hosts. And must copy
    1.48 +files from: /var/lib/tazpkg-web. Example:
    1.49 +
    1.50 + # mkdir -p /var/www/vhosts/pkgs && cd /var/lib/tazpkg-web
    1.51 + # cp -a search.cgi style/* /var/www/vhosts/pkgs
    1.52 + # tazpkg-web cooking
    1.53 +
    1.54 +_EOT_
    1.55 +	fi
    1.56 +}
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/tazpkg-web/stuff/README	Sun Jun 21 03:26:15 2009 +0200
     2.3 @@ -0,0 +1,23 @@
     2.4 +Tazpkg-web - SliTaz Packages Web interface
     2.5 +===============================================================================
     2.6 +
     2.7 +
     2.8 +Tazpkg-web package provide the files, scripts and search engine used for SliTaz
     2.9 +packages web interface. It not depends on Tazpkg packages manager or Tazwok but
    2.10 +need a wok with receipt and a packages (*.tazpkg) repository to scan and build
    2.11 +the static xHTML pages. Here is a brief overview of the files provided:
    2.12 +
    2.13 +
    2.14 + * html/           : Splitted xHTML template used to generate the full pages
    2.15 + * style/          : CSS style, pics and favicon
    2.16 + * xml/            : RSS template (will be use when merge tazrss)
    2.17 + * search.cgi      : CGI search engine using awk, grep, etc (all xHTML harcoded)
    2.18 + * tazpkg-web      : Utility who generate the categories and index's pages.
    2.19 + * tazpkg-web.conf : Tazpkg-web utility configuration file.
    2.20 +
    2.21 +
    2.22 +Online : http://pkgs.slitaz.org/
    2.23 +
    2.24 +
    2.25 +===============================================================================
    2.26 +
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/tazpkg-web/stuff/html/catlist.html	Sun Jun 21 03:26:15 2009 +0200
     3.3 @@ -0,0 +1,18 @@
     3.4 +
     3.5 +<ul>
     3.6 +	<li><a href="base-system.html">Base-system</a> - Sytème de base</li>
     3.7 +	<li><a href="x-window.html">X-window</a> - Serveur d'affichage X</li>
     3.8 +	<li><a href="utilities.html">Utilities</a> - Utilitaires | Utilitários</li>
     3.9 +	<li><a href="network.html">Network</a> - Internet and server</li>
    3.10 +	<li><a href="games.html">Games</a> - Jeux | Jogos</li>
    3.11 +	<li><a href="graphics.html">Graphics</a> - Graphisme | Gráficos</li>
    3.12 +	<li><a href="multimedia.html">Multimedia</a> - Son et video</li>
    3.13 +	<li><a href="office.html">Office</a> - Bureautique | Escritório</li>
    3.14 +	<li><a href="development.html">Development</a> - Développement | Desenvolvimento</li>
    3.15 +	<li><a href="system-tools.html">System-tools</a> - Outils système | Ferramentas do Sistema</li>
    3.16 +	<li><a href="security.html">Security</a> - Sécurité | Desenvolvimento</li>
    3.17 +	<li><a href="misc.html">Misc</a> - Divers</li>
    3.18 +	<li><a href="meta.html">Meta packages</a> - Méta paquets</li>
    3.19 +	<li><a href="non-free.html">Non free</a> - Logiciels non libre</li>
    3.20 +</ul>
    3.21 +
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/tazpkg-web/stuff/html/footer.html	Sun Jun 21 03:26:15 2009 +0200
     4.3 @@ -0,0 +1,31 @@
     4.4 +<!-- End of content with round corner -->
     4.5 +</div>
     4.6 +<div id="content_bottom">
     4.7 +<div class="bottom_left"></div>
     4.8 +<div class="bottom_right"></div>
     4.9 +</div>
    4.10 +
    4.11 +<!-- Start of footer and copy notice -->
    4.12 +<div id="copy">
    4.13 +<p>
    4.14 +Last modification : _DATE_ -
    4.15 +<a href="#top">Top of the page</a>
    4.16 +</p>
    4.17 +<p>
    4.18 +Copyright &copy; 2009 <a href="http://www.slitaz.org/">SliTaz</a> -
    4.19 +<a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>
    4.20 +</p>
    4.21 +</div>
    4.22 +
    4.23 +<!-- Bottom and logo's -->
    4.24 +<div id="bottom">
    4.25 +<p>
    4.26 +<a href="http://validator.w3.org/check?uri=referer"><img
    4.27 +	src="http://pkgs.slitaz.org/pics/website/xhtml10.png" alt="Valid XHTML 1.0"
    4.28 +	title="Valid XHTML 1.0"
    4.29 +	style="width: 80px; height: 15px;" /></a>
    4.30 +</p>
    4.31 +</div>
    4.32 +
    4.33 +</body>
    4.34 +</html>
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/tazpkg-web/stuff/html/header.html	Sun Jun 21 03:26:15 2009 +0200
     5.3 @@ -0,0 +1,37 @@
     5.4 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     5.5 +	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
     5.6 +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
     5.7 +<head>
     5.8 +	<title>SliTaz _RELEASE_ Packages - _PAGE_</title>
     5.9 +	<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1" />
    5.10 +	<meta name="description" content="Au sujet de SliTaz GNU/Linux mini système d'exploitation" />
    5.11 +	<meta name="keywords" lang="fr" content="Système, libre, gnu, linux, opensource, livecd" />
    5.12 +	<meta name="robots" content="index, follow, all" />
    5.13 +	<meta name="revisit-after" content="7 days" />
    5.14 +	<meta name="expires" content="never" />
    5.15 +	<meta name="modified" content="_DATE_" />
    5.16 +	<meta name="author" content="SliTaz Contributors"/>
    5.17 +	<meta name="generator" content="ash, grep, sed and cat"/>
    5.18 +	<meta name="publisher" content="www.slitaz.org" />
    5.19 +	<link rel="shortcut icon" href="http://pkgs.slitaz.org/favicon.ico" />
    5.20 +	<link rel="stylesheet"  type="text/css" href="http://pkgs.slitaz.org/slitaz.css" />
    5.21 +	<link rel="alternate" type="application/rss+xml" title="SliTaz Stable Packages" href="rss/stable.xml" />
    5.22 +	<link rel="alternate" type="application/rss+xml" title="SliTaz Cooking Packages" href="rss/cooking.xml" />
    5.23 +</head>
    5.24 +<body bgcolor="#ffffff">
    5.25 +
    5.26 +<!-- Header -->
    5.27 +<div id="header">
    5.28 +	<a name="top"></a>
    5.29 +<!-- Access -->
    5.30 +<div id="access">
    5.31 +	<a href="http://www.slitaz.org/" title="SliTaz Web site">Website</a>
    5.32 +	<a href="http://forum.slitaz.org/" title="SliTaz Community Forum">Forum</a>
    5.33 +	<a href="http://wiki.slitaz.org/" title="SliTaz Community Wiki">Wiki</a>
    5.34 +	<a href="http://labs.slitaz.org/" title="SliTaz laboratories">Labs</a>
    5.35 +</div>
    5.36 +	<a href="http://pkgs.slitaz.org/"><img id="logo"
    5.37 +	src="http://pkgs.slitaz.org/pics/website/logo.png" title="pkgs.slitaz.org" alt="pkgs.slitaz.org"
    5.38 +	style="border: 0px solid ; width: 200px; height: 74px;" /></a>
    5.39 +	<p id="titre">#!/tazpkg/packages</p>
    5.40 +</div>
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/tazpkg-web/stuff/html/home.html	Sun Jun 21 03:26:15 2009 +0200
     6.3 @@ -0,0 +1,46 @@
     6.4 +
     6.5 +<div style="text-align: center; padding: 20px;">
     6.6 +<form method="post" action="http://pkgs.slitaz.org/search.cgi">
     6.7 +	<select name="object">
     6.8 +		<option>Package</option>
     6.9 +		<option>Desc</option>
    6.10 +		<option>Tags</option>
    6.11 +		<option>Depends</option>
    6.12 +		<option>File</option>
    6.13 +		<option>File_list</option>
    6.14 +	</select>
    6.15 +	<strong>:</strong>
    6.16 +	<input type="text" name="query" size="32" />
    6.17 +	<select name="version">
    6.18 +		<option>stable</option>
    6.19 +		<option>cooking</option>
    6.20 +		<option>1.0</option>
    6.21 +	</select>
    6.22 +	<input type="submit" name="search" value="Search" />
    6.23 +</form>
    6.24 +<p>
    6.25 +<a href="stable/">Stable packages</a> | <a href="cooking/">Cooking packages</a>
    6.26 +</p>
    6.27 +</div>
    6.28 +
    6.29 +<!-- 10 Cloud tag are available. -->
    6.30 +<div id="cloud">
    6.31 +<p>
    6.32 +	<a href="stable/" class="tag8">Stable</a>
    6.33 +	<a href="rss/cooking.xml" class="tag6">Cooking RSS</a>
    6.34 +	<a href="http://www.slitaz.org/en/doc/" class="tag5">Documentation</a>
    6.35 +	<a href="http://www.slitaz.org/en/doc/handbook/packages.html" class="tag6">Package management</a>
    6.36 +	<a href="cooking/" class="tag8">Cooking</a>
    6.37 +	<a href="http://www.slitaz.org/en/devel/" class="tag5">Development</a>
    6.38 +	<a href="http://www.slitaz.org/en/doc/manuals/tazpkg.en.html" class="tag7">Tazpkg Manual</a>
    6.39 +	<a href="http://forum.slitaz.org/" class="tag6">Support</a>
    6.40 +	<a href="http://wiki.slitaz.org/" class="tag6">Wiki</a>
    6.41 +	<a href="http://www.slitaz.org/en/doc/cookbook/" class="tag3">Cookbook</a>
    6.42 +	<a href="http://labs.slitaz.org/news" class="tag6">Labs News</a>
    6.43 +	<a href="http://www.slitaz.org/en/doc/handbook/security.html" class="tag5">Security</a>
    6.44 +	<a href="http://www.slitaz.org/en/mailing-list.html" class="tag6">Mailing list</a>
    6.45 +	<a href="http://www.slitaz.org/en/doc/manuals/tazwok.en.html" class="tag5">Tazwok Manual</a>
    6.46 +	<a href="http://www.slitaz.org/en/get/" class="tag7">Get LiveCD</a>
    6.47 +	<a href="http://boot.slitaz.org/" class="tag6">Web Boot</a>
    6.48 +</p>
    6.49 +</div>
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/tazpkg-web/stuff/html/menu.html	Sun Jun 21 03:26:15 2009 +0200
     7.3 @@ -0,0 +1,23 @@
     7.4 +<!-- Navigation menu -->
     7.5 +<div id="nav">
     7.6 +<div id="nav_top"></div>
     7.7 +<ul>
     7.8 +	<li><a href="base-system.html">Base-system</a></li>
     7.9 +	<li><a href="x-window.html">X-window</a></li>
    7.10 +	<li><a href="utilities.html">Utilities</a></li>
    7.11 +	<li><a href="network.html">Network</a></li>
    7.12 +	<li><a href="games.html">Games</a></li>
    7.13 +	<li><a href="graphics.html">Graphics</a></li>
    7.14 +	<li><a href="multimedia.html">Multimedia</a></li>
    7.15 +	<li><a href="office.html">Office</a></li>
    7.16 +	<li><a href="development.html">Development</a></li>
    7.17 +	<li><a href="system-tools.html">System-tools</a></li>
    7.18 +	<li><a href="security.html">Security</a></li>
    7.19 +	<li><a href="misc.html">Misc</a></li>
    7.20 +	<li><a href="meta.html">Meta packages</a></li>
    7.21 +	<li><a href="non-free.html">Non free</a></li>
    7.22 +</ul>
    7.23 +<div id="nav_bottom">
    7.24 +<div id="nav_bottom_img"></div>
    7.25 +</div>
    7.26 +</div>
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/tazpkg-web/stuff/search.cgi	Sun Jun 21 03:26:15 2009 +0200
     8.3 @@ -0,0 +1,527 @@
     8.4 +#!/bin/sh
     8.5 +# Tiny CGI search engine for SliTaz packages on http://pkgs.slitaz.org/
     8.6 +# Christophe Lincoln <pankso@slitaz.org>
     8.7 +#
     8.8 +
     8.9 +read QUERY_STRING
    8.10 +for i in $(echo $QUERY_STRING | sed 's/&/ /g'); do
    8.11 +	eval $i
    8.12 +done
    8.13 +LANG=$lang
    8.14 +SEARCH=$query
    8.15 +SLITAZ_VERSION=$version
    8.16 +OBJECT=$object
    8.17 +DATE=`date +%Y-%m-%d\ \%H:%M:%S`
    8.18 +VERSION=cooking
    8.19 +if [ "$REQUEST_METHOD" = "GET" ]; then
    8.20 +	SEARCH=""
    8.21 +	for i in $(echo $REQUEST_URI | sed 's/[?&]/ /g'); do
    8.22 +		SLITAZ_VERSION=cooking
    8.23 +		case "$i" in
    8.24 +		lang=*)
    8.25 +			LANG=${i#*=};;
    8.26 +		file=*)
    8.27 +			SEARCH=${i#*=}
    8.28 +			OBJECT=File;;
    8.29 +		desc=*)
    8.30 +			SEARCH=${i#*=}
    8.31 +			OBJECT=Desc;;
    8.32 +		tags=*)
    8.33 +			SEARCH=${i#*=}
    8.34 +			OBJECT=Tags;;
    8.35 +		receipt=*)
    8.36 +			SEARCH=${i#*=}
    8.37 +			OBJECT=Receipt;;
    8.38 +		filelist=*)
    8.39 +			SEARCH=${i#*=}
    8.40 +			OBJECT=File_list;;
    8.41 +		package=*)
    8.42 +			SEARCH=${i#*=}
    8.43 +			OBJECT=Package;;
    8.44 +		depends=*)
    8.45 +			SEARCH=${i#*=}
    8.46 +			OBJECT=Depends;;
    8.47 +		version=s*|version=2*)
    8.48 +			SLITAZ_VERSION=stable;;
    8.49 +		version=1*)
    8.50 +			SLITAZ_VERSION=1.0;;
    8.51 +		esac
    8.52 +	done
    8.53 +	[ -n "$SEARCH" ] && REQUEST_METHOD="POST"
    8.54 +fi
    8.55 +
    8.56 +case "$OBJECT" in
    8.57 +File)	 	selected_file="selected";;
    8.58 +Desc)	 	selected_desc="selected";;
    8.59 +Tags)	 	selected_tags="selected";;
    8.60 +Receipt) 	selected_receipt="selected";;
    8.61 +File_list) 	selected_file_list="selected";;
    8.62 +Depends)	selected_depends="selected";;
    8.63 +esac
    8.64 +
    8.65 +case "$SLITAZ_VERSION" in
    8.66 +1.0)	 	selected_1="selected";;
    8.67 +stable)		selected_stable="selected";;
    8.68 +esac
    8.69 +
    8.70 +# unescape query
    8.71 +SEARCH="$(echo $SEARCH | sed 's/%2B/+/g' | sed 's/%3A/:/g' | sed 's|%2F|/|g')"
    8.72 +
    8.73 +if [ -z "$LANG" ]; then
    8.74 +	for i in $(echo $HTTP_ACCEPT_LANGUAGE | sed 's/[,;]/ /g'); do
    8.75 +		case "$i" in
    8.76 +		fr|de|pt|cn)
    8.77 +			LANG=$i
    8.78 +			break;;
    8.79 +		esac
    8.80 +	done
    8.81 +fi
    8.82 +
    8.83 +package="Package"
    8.84 +file="File"
    8.85 +desc="Description"
    8.86 +tags="Tags"
    8.87 +receipt="Receipt"
    8.88 +file_list="File list"
    8.89 +depends="Depends"
    8.90 +search="Search"
    8.91 +cooking="cooking"
    8.92 +stable="stable"
    8.93 +result="Result for : $SEARCH"
    8.94 +noresult="No package $SEARCH"
    8.95 +deptree="Dependency tree for : $SEARCH"
    8.96 +rdeptree="Reverse dependency tree for : $SEARCH"
    8.97 +charset="ISO-8859-1"
    8.98 +
    8.99 +case "$LANG" in
   8.100 +
   8.101 +fr)	package="Paquet"
   8.102 +	receipt="Recette"
   8.103 +	depends="Dépendances"
   8.104 +	search="Recherche"
   8.105 +	result="Recherche de : $SEARCH"
   8.106 +	noresult="Paquet $SEARCH introuvable"
   8.107 +	deptree="Arbre des dépendances de $SEARCH"
   8.108 +	rdeptree="Arbre inversé des dépendances de $SEARCH"
   8.109 +	file_list="Liste des fichiers"
   8.110 +	file="Fichier";;
   8.111 +
   8.112 +de)	package="Paket"
   8.113 +	depends="Abhängigkeiten"
   8.114 +	desc="Beschreibung"
   8.115 +	search="Suche"
   8.116 +	cooking="Cooking"
   8.117 +	stable="Stable"
   8.118 +	result="Resultate für : $SEARCH"
   8.119 +	noresult="Kein Paket für $SEARCH"
   8.120 +	deptree="Abhängigkeiten von: $SEARCH"
   8.121 +	rdeptree="Abhängigkeit für: $SEARCH"
   8.122 +	file_list="Datei liste"
   8.123 +	file="Datei";;
   8.124 +
   8.125 +pt)	package="Pacote"
   8.126 +	search="Buscar"
   8.127 +	cooking="cooking"
   8.128 +	stable="stable"
   8.129 +	result="Resultado para : $SEARCH"
   8.130 +	noresult="Sem resultado: $SEARCH"
   8.131 +	deptree="Árvore de dependências para: $SEARCH"
   8.132 +	rdeptree="Árvore de dependências reversa para: $SEARCH"
   8.133 +	depends="Dependências"
   8.134 +	desc="Descrição"
   8.135 +	file_list="Arquivo lista"
   8.136 +	file="Arquivo";;
   8.137 +
   8.138 +cn)	package="软件包:"
   8.139 +	cooking="å¼€å‘版"
   8.140 +	stable="稳定版"
   8.141 +	desc="æè¿°"
   8.142 +	tags="标签"
   8.143 +	depends="ä¾èµ–"
   8.144 +	file="文件"
   8.145 +	file_list="文件列表"
   8.146 +	search="Search"
   8.147 +	result="Result for : $SEARCH"
   8.148 +	noresult="No package $SEARCH"
   8.149 +	deptree="Dependency tree for : $SEARCH"
   8.150 +	rdeptree="Reverse dependency tree for : $SEARCH"
   8.151 +	charset="UTF-8";;
   8.152 +
   8.153 +*)	LANG="en";;
   8.154 +
   8.155 +esac
   8.156 +
   8.157 +WOK=/home/slitaz/$SLITAZ_VERSION/wok
   8.158 +
   8.159 +echo Content-type: text/html
   8.160 +echo
   8.161 +
   8.162 +# Search form
   8.163 +search_form()
   8.164 +{
   8.165 +	cat << _EOT_
   8.166 +
   8.167 +<div style="text-align: center; padding: 20px;">
   8.168 +<form method="post" action="search.cgi">
   8.169 +	<input type="hidden" name="lang" value="$LANG" />
   8.170 +	<select name="object">
   8.171 +		<option value="Package">$package</option>
   8.172 +		<option $selected_desc value="Desc">$desc</option>
   8.173 +		<option $selected_tags value="Tags">$tags</option>
   8.174 +		<option $selected_receipt value="Receipt">$receipt</option>
   8.175 +		<option $selected_depends value="Depends">$depends</option>
   8.176 +		<option $selected_file value="File">$file</option>
   8.177 +		<option $selected_file_list value="File_list">$file_list</option>
   8.178 +	</select>
   8.179 +	<strong>:</strong>
   8.180 +	<input type="text" name="query" size="32" value="$SEARCH" />
   8.181 +	<select name="version">
   8.182 +		<option value="cooking">$cooking</option>
   8.183 +		<option $selected_stable value="stable">$stable</option>
   8.184 +		<option $selected_1 value="1.0">1.0</option>
   8.185 +	</select>
   8.186 +	<input type="submit" name="search" value="$search" />
   8.187 +</form>
   8.188 +</div>
   8.189 +_EOT_
   8.190 +}
   8.191 +
   8.192 +# xHTML Header.
   8.193 +xhtml_header()
   8.194 +{
   8.195 +	cat << _EOF_
   8.196 +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
   8.197 +	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
   8.198 +<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="$LANG" lang="$LANG">
   8.199 +<head>
   8.200 +	<title>SliTaz Packages - Search $SEARCH</title>
   8.201 +	<meta http-equiv="content-type" content="text/html; charset=$charset" />
   8.202 +	<meta name="description" content="Au sujet de SliTaz GNU/Linux mini système d'exploitation" />
   8.203 +	<meta name="keywords" lang="fr" content="Système, libre, gnu, linux, opensource, livecd" />
   8.204 +	<meta name="robots" content="index, follow, all" />
   8.205 +	<meta name="revisit-after" content="7 days" />
   8.206 +	<meta name="expires" content="never" />
   8.207 +	<meta name="modified" content="$DATE" />
   8.208 +	<meta name="author" content="ash, awk, grep, sed and cat"/>
   8.209 +	<meta name="publisher" content="www.slitaz.org" />
   8.210 +	<link rel="shortcut icon" href="http://pkgs.slitaz.org/favicon.ico" />
   8.211 +	<link rel="stylesheet"  type="text/css" href="http://pkgs.slitaz.org/slitaz.css" />
   8.212 +</head>
   8.213 +<body bgcolor="#ffffff">
   8.214 +
   8.215 +<!-- Header -->
   8.216 +<div id="header">
   8.217 +	<a name="top"></a>
   8.218 +<!-- Access -->
   8.219 +<div id="access">
   8.220 +	<a href="http://www.slitaz.org/" title="SliTaz Web site">Website</a> |
   8.221 +	<a href="http://wiki.slitaz.org/" title="SliTaz Community Wiki">Wiki</a> |
   8.222 +	<a href="http://labs.slitaz.org/" title="SliTaz laboratories">Labs</a>
   8.223 +</div>
   8.224 +	<a href="http://pkgs.slitaz.org/"><img id="logo"
   8.225 +	src="http://pkgs.slitaz.org/pics/website/logo.png" title="pkgs.slitaz.org" alt="pkgs.slitaz.org"
   8.226 +	style="border: 0px solid ; width: 200px; height: 74px;" /></a>
   8.227 +	<p id="titre">#!/tazpkg/packages</p>
   8.228 +</div>
   8.229 +_EOF_
   8.230 +}
   8.231 +
   8.232 +# xHTML Footer.
   8.233 +xhtml_footer()
   8.234 +{
   8.235 +	cat << _EOT_
   8.236 +<center>
   8.237 +<i>$(ls /home/slitaz/$SLITAZ_VERSION/wok | wc -l) packages and $(unlzma -c /home/slitaz/$SLITAZ_VERSION/packages/files.list.lzma | wc -l) files in $SLITAZ_VERSION database</i>
   8.238 +</center>
   8.239 +
   8.240 +<!-- End of content with round corner -->
   8.241 +</div>
   8.242 +<div id="content_bottom">
   8.243 +<div class="bottom_left"></div>
   8.244 +<div class="bottom_right"></div>
   8.245 +</div>
   8.246 +
   8.247 +<!-- Start of footer and copy notice -->
   8.248 +<div id="copy">
   8.249 +<p>
   8.250 +Dernière modification : $DATE -
   8.251 +<a href="#top">Top of the page</a>
   8.252 +</p>
   8.253 +<p>
   8.254 +Copyright &copy; 2009 <a href="http://www.slitaz.org/">SliTaz</a> -
   8.255 +<a href="http://www.gnu.org/licenses/gpl.html">GNU General Public License</a>
   8.256 +</p>
   8.257 +<!-- End of copy -->
   8.258 +</div>
   8.259 +
   8.260 +<!-- Bottom and logo's -->
   8.261 +<div id="bottom">
   8.262 +<p>
   8.263 +<a href="http://validator.w3.org/check?uri=referer"><img
   8.264 +	src="http://pkgs.slitaz.org/pics/website/xhtml10.png" alt="Valid XHTML 1.0"
   8.265 +	title="Code validé XHTML 1.0"
   8.266 +	style="width: 80px; height: 15px;" /></a>
   8.267 +</p>
   8.268 +</div>
   8.269 +
   8.270 +</body>
   8.271 +</html>
   8.272 +_EOT_
   8.273 +}
   8.274 +
   8.275 +# recursive dependencies scan                                       
   8.276 +dep_scan()                                                       
   8.277 +{                                                                    
   8.278 +for i in $1; do
   8.279 +	case " $ALL_DEPS " in
   8.280 +	*\ $i\ *) continue;;
   8.281 +	esac
   8.282 +	ALL_DEPS="$ALL_DEPS $i"
   8.283 +	if [ -n "$2" ]; then
   8.284 +		echo -n "$2"
   8.285 +		(
   8.286 +		. $WOK/$i/receipt
   8.287 +		cat << _EOT_
   8.288 +<a href="$SLITAZ_VERSION/$CATEGORY.html#$PACKAGE">$PACKAGE</a> : $SHORT_DESC
   8.289 +_EOT_
   8.290 +		)
   8.291 +	fi
   8.292 +	[ -f $WOK/$i/receipt ] || continue
   8.293 +	DEPENDS=""
   8.294 +	. $WOK/$i/receipt
   8.295 +	[ -n "$DEPENDS" ] && dep_scan "$DEPENDS" "$2    "
   8.296 +done
   8.297 +}
   8.298 +
   8.299 +# recursive reverse dependencies scan                       
   8.300 +rdep_scan()                                                           
   8.301 +{                                                                            
   8.302 +SEARCH=$1
   8.303 +case "$SEARCH" in
   8.304 +glibc-base|gcc-lib-base) cat <<EOT
   8.305 +	glibc-base and gcc-lib-base are implicit dependencies
   8.306 +	<b>every</b> packages are supposed to depend on them.
   8.307 +EOT
   8.308 +	return;;
   8.309 +esac
   8.310 +for i in $WOK/* ; do
   8.311 +	DEPENDS=""
   8.312 +	. $i/receipt
   8.313 +	echo "$(basename $i) $(echo $DEPENDS)"
   8.314 +done | awk -v search=$SEARCH '
   8.315 +function show_deps(deps, all_deps, pkg, space)
   8.316 +{
   8.317 +	if (all_deps[pkg] == 1) return
   8.318 +	all_deps[pkg] = 1
   8.319 +	if (space != "") printf "%s%s\n",space,pkg
   8.320 +	for (i = 1; i <= split(deps[pkg], mydeps, " "); i++) {
   8.321 +		show_deps(deps, all_deps, mydeps[i],"////" space)
   8.322 +	}
   8.323 +}
   8.324 +
   8.325 +{
   8.326 +	all_deps[$1] = 0
   8.327 +	for (i = 2; i <= NF; i++)
   8.328 +		deps[$i] = deps[$i] " " $1
   8.329 +}
   8.330 +
   8.331 +END {
   8.332 +	show_deps(deps, all_deps, search, "")
   8.333 +}
   8.334 +' | while read pkg; do
   8.335 +		. $WOK/${pkg##*/}/receipt
   8.336 +		cat << _EOT_
   8.337 +$(echo ${pkg%/*} | sed 's|/| |g') <a href="$SLITAZ_VERSION/$CATEGORY.html#$PACKAGE">$PACKAGE</a> : $SHORT_DESC
   8.338 +_EOT_
   8.339 +done
   8.340 +}
   8.341 +
   8.342 +# Check package exists
   8.343 +package_exist()
   8.344 +{
   8.345 +	[ -f $WOK/$1/receipt ] && return 0
   8.346 +	cat << _EOT_
   8.347 +
   8.348 +<h3>$noresult</h3>
   8.349 +<pre class="package">
   8.350 +_EOT_
   8.351 +	return 1
   8.352 +}
   8.353 +
   8.354 +# Display search form and result if requested.
   8.355 +if [ "$REQUEST_METHOD" != "POST" ]; then
   8.356 +	xhtml_header
   8.357 +	cat << _EOT_
   8.358 +
   8.359 +<!-- Content top. -->
   8.360 +<div id="content_top">
   8.361 +<div class="top_left"></div>
   8.362 +<div class="top_right"></div>
   8.363 +</div>
   8.364 +
   8.365 +<!-- Content -->
   8.366 +<div id="content">
   8.367 +<a name="content"></a>
   8.368 +
   8.369 +<h1><font color="#3E1220">$package</font></h1>
   8.370 +<h2><font color="#DF8F06">$search</font></h2>
   8.371 +_EOT_
   8.372 +	search_form
   8.373 +	xhtml_footer
   8.374 +else
   8.375 +	xhtml_header
   8.376 +	cat << _EOT_
   8.377 +
   8.378 +<!-- Content top. -->
   8.379 +<div id="content_top">
   8.380 +<div class="top_left"></div>
   8.381 +<div class="top_right"></div>
   8.382 +</div>
   8.383 +
   8.384 +<!-- Content -->
   8.385 +<div id="content">
   8.386 +<a name="content"></a>
   8.387 +
   8.388 +<h1><font color="#3E1220">$package</font></h1>
   8.389 +<h2><font color="#DF8F06">$search</font></h2>
   8.390 +_EOT_
   8.391 +	search_form
   8.392 +	if [ "$OBJECT" = "Depends" ]; then
   8.393 +		if package_exist $SEARCH ; then
   8.394 +			cat << _EOT_
   8.395 +
   8.396 +<h3>$deptree</h3>
   8.397 +<pre class="package">
   8.398 +_EOT_
   8.399 +			ALL_DEPS=""
   8.400 +			dep_scan $SEARCH ""
   8.401 +			SUGGESTED=""
   8.402 +			. $WOK/$SEARCH/receipt
   8.403 +			if [ -n "$SUGGESTED" ]; then
   8.404 +				cat << _EOT_
   8.405 +</pre>
   8.406 +
   8.407 +<h3>$deptree (SUGGESTED)</h3>
   8.408 +<pre class="package">
   8.409 +_EOT_
   8.410 +				ALL_DEPS=""
   8.411 +				dep_scan "$SUGGESTED" "    "
   8.412 +			fi
   8.413 +			cat << _EOT_
   8.414 +</pre>
   8.415 +
   8.416 +<h3>$rdeptree</h3>
   8.417 +<pre class="package">
   8.418 +_EOT_
   8.419 +			ALL_DEPS=""
   8.420 +			rdep_scan $SEARCH
   8.421 +		fi
   8.422 +	elif [ "$OBJECT" = "File" ]; then
   8.423 +		cat << _EOT_
   8.424 +
   8.425 +<h3>$result</h3>
   8.426 +<pre class="package">
   8.427 +_EOT_
   8.428 +		last=""
   8.429 +		unlzma -c /home/slitaz/$SLITAZ_VERSION/packages/files.list.lzma \
   8.430 +		| grep $SEARCH | while read pkg file; do
   8.431 +			echo "$file" | grep -q $SEARCH || continue
   8.432 +			if [ "$last" != "${pkg%:}" ]; then
   8.433 +				last=${pkg%:}
   8.434 +				(
   8.435 +				. $WOK/$last/receipt
   8.436 +				cat << _EOT_
   8.437 +
   8.438 +<i><b><a href="$SLITAZ_VERSION/$CATEGORY.html#$PACKAGE">$PACKAGE</a></b> $SHORT_DESC</i>
   8.439 +_EOT_
   8.440 +				)
   8.441 +			fi
   8.442 +			echo "    $file"
   8.443 +		done
   8.444 +	elif [ "$OBJECT" = "File_list" ]; then
   8.445 +		package_exist $SEARCH && cat << _EOT_
   8.446 +
   8.447 +<h3>$result</h3>
   8.448 +<pre class="package">
   8.449 +_EOT_
   8.450 +		last=""
   8.451 +		unlzma -c /home/slitaz/$SLITAZ_VERSION/packages/files.list.lzma \
   8.452 +		| grep ^$SEARCH: |  sed 's/.*: /    /' | sort
   8.453 +	elif [ "$OBJECT" = "Desc" ]; then
   8.454 +		cat << _EOT_
   8.455 +
   8.456 +<h3>$result</h3>
   8.457 +<pre class="package">
   8.458 +_EOT_
   8.459 +		last=""
   8.460 +		grep -i $SEARCH /home/slitaz/$SLITAZ_VERSION/packages/packages.desc | \
   8.461 +		sort | while read pkg extras ; do
   8.462 +				. $WOK/$pkg/receipt
   8.463 +				cat << _EOT_
   8.464 +<a href="$SLITAZ_VERSION/$CATEGORY.html#$PACKAGE">$PACKAGE</a> : $SHORT_DESC
   8.465 +_EOT_
   8.466 +			done
   8.467 +	elif [ "$OBJECT" = "Tags" ]; then
   8.468 +		cat << _EOT_
   8.469 +
   8.470 +<h3>$result</h3>
   8.471 +<pre class="package">
   8.472 +_EOT_
   8.473 +		last=""
   8.474 +		grep ^TAGS= $WOK/*/receipt |  grep -i $SEARCH | \
   8.475 +		sed "s|$WOK/\(.*\)/receipt:.*|\1|" | sort | while read pkg ; do
   8.476 +				. $WOK/$pkg/receipt
   8.477 +				cat << _EOT_
   8.478 +<a href="$SLITAZ_VERSION/$CATEGORY.html#$PACKAGE">$PACKAGE</a> : $SHORT_DESC
   8.479 +_EOT_
   8.480 +			done
   8.481 +	elif [ "$OBJECT" = "Receipt" ]; then
   8.482 +		package_exist $SEARCH && cat << _EOT_
   8.483 +
   8.484 +<h3>$result</h3>
   8.485 +<pre class="package">
   8.486 +<pre>
   8.487 +$(if [ -f  $WOK/$SEARCH/taz/*/receipt ]; then
   8.488 +	cat $WOK/$SEARCH/taz/*/receipt
   8.489 +  else
   8.490 +    cat $WOK/$SEARCH//receipt
   8.491 +  fi | sed -e 's/&/\&amp;/g' -e 's/</\&lt;/g' -e 's/>/\&gt;/g')
   8.492 +</pre>
   8.493 +_EOT_
   8.494 +	else
   8.495 +		cat << _EOT_
   8.496 +
   8.497 +<h3>$result</h3>
   8.498 +<pre class="package">
   8.499 +_EOT_
   8.500 +		for pkg in `ls $WOK | grep $SEARCH`
   8.501 +		do
   8.502 +			. $WOK/$pkg/receipt
   8.503 +			cat << _EOT_
   8.504 +<a href="$SLITAZ_VERSION/$CATEGORY.html#$PACKAGE">$PACKAGE</a> : $SHORT_DESC
   8.505 +_EOT_
   8.506 +		done
   8.507 +		equiv=/home/slitaz/$SLITAZ_VERSION/packages/packages.equiv
   8.508 +		vpkgs="$(cat $equiv | cut -d= -f1 | grep $SEARCH)"
   8.509 +		for vpkg in $vpkgs ; do
   8.510 +	cat << _EOT_
   8.511 +</pre>
   8.512 +
   8.513 +<h3>$result (package providing $vpkg)</h3>
   8.514 +<pre class="package">
   8.515 +_EOT_
   8.516 +			for pkg in $(grep $vpkg= $equiv | sed "s/$vpkg=//"); do
   8.517 +				. $WOK/${pkg#*:}/receipt
   8.518 +				cat << _EOT_
   8.519 +<a href="$SLITAZ_VERSION/$CATEGORY.html#$PACKAGE">$PACKAGE</a> : $SHORT_DESC
   8.520 +_EOT_
   8.521 +			done
   8.522 +		done
   8.523 +	fi
   8.524 +	cat << _EOT_
   8.525 +</pre>
   8.526 +_EOT_
   8.527 +	xhtml_footer
   8.528 +fi
   8.529 +
   8.530 +exit 0
     9.1 Binary file tazpkg-web/stuff/style/favicon.ico has changed
    10.1 Binary file tazpkg-web/stuff/style/pics/slitaz.png has changed
    11.1 Binary file tazpkg-web/stuff/style/pics/website/content-bl.png has changed
    12.1 Binary file tazpkg-web/stuff/style/pics/website/content-br.png has changed
    13.1 Binary file tazpkg-web/stuff/style/pics/website/content-tl.png has changed
    14.1 Binary file tazpkg-web/stuff/style/pics/website/content-tr.png has changed
    15.1 Binary file tazpkg-web/stuff/style/pics/website/header.png has changed
    16.1 Binary file tazpkg-web/stuff/style/pics/website/logo.png has changed
    17.1 Binary file tazpkg-web/stuff/style/pics/website/nav-bl.png has changed
    18.1 Binary file tazpkg-web/stuff/style/pics/website/nav-br.png has changed
    19.1 Binary file tazpkg-web/stuff/style/pics/website/nav-tl.png has changed
    20.1 Binary file tazpkg-web/stuff/style/pics/website/nav-tr.png has changed
    21.1 Binary file tazpkg-web/stuff/style/pics/website/xhtml10.png has changed
    22.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    22.2 +++ b/tazpkg-web/stuff/style/slitaz.css	Sun Jun 21 03:26:15 2009 +0200
    22.3 @@ -0,0 +1,356 @@
    22.4 +/*
    22.5 +	CSS style for SliTaz GNU/Linux website
    22.6 +	www.slitaz.org - (c) 2007 Pankso
    22.7 +*/
    22.8 +
    22.9 +body {
   22.10 +	background: #222222;
   22.11 +	color: black;
   22.12 +	font: 13px sans-serif, vernada, arial;
   22.13 +	margin: 0;
   22.14 +	padding-bottom: 100%;
   22.15 +}
   22.16 +
   22.17 +/* Accessibility */
   22.18 +
   22.19 +#access {
   22.20 +	position: absolute;
   22.21 +	top: 1px;
   22.22 +	right: 6px;
   22.23 +	text-align: right;
   22.24 +	width: 100%;
   22.25 +	margin: 0;
   22.26 +	font-size: 12px;
   22.27 +	font-weight: bold;
   22.28 +}
   22.29 +
   22.30 +#access a {
   22.31 +	background: inherit;
   22.32 +	color: white;
   22.33 +	text-decoration: none;
   22.34 +	padding-left: 2px;
   22.35 +}
   22.36 +
   22.37 +#access a:hover {
   22.38 +	background: inherit;
   22.39 +	color: #222222;
   22.40 +}
   22.41 +
   22.42 +/* Header and title */
   22.43 +
   22.44 +#header{
   22.45 +	background: #f0ba08 url(pics/website/header.png) repeat-x top;
   22.46 +	color: black;
   22.47 +	width: 100%;
   22.48 +	height: 50px ;
   22.49 +	border-top: 1px solid black;
   22.50 +	border-bottom: 1px solid black;
   22.51 +	margin-bottom: 30px;
   22.52 +}
   22.53 +
   22.54 +#titre{
   22.55 +	font-size: 16px;
   22.56 +	font-weight: bolder ;
   22.57 +	margin-left: 232px;
   22.58 +	margin-top: 4px;
   22.59 +	padding-top: 25px ;
   22.60 +}
   22.61 +
   22.62 +#logo {
   22.63 +	position: absolute;
   22.64 +	float: left;
   22.65 +	margin-left: 32px;
   22.66 +	margin-right: 20px;
   22.67 +	margin-top: 0px;
   22.68 +}
   22.69 +
   22.70 +/* Navigation */
   22.71 +
   22.72 +#nav {
   22.73 +	position: absolute;
   22.74 +	top: 100px;
   22.75 +	right: 6px;
   22.76 +	background: #eaeaea url(pics/website/nav-tr.png) no-repeat top right;
   22.77 +	color: black;
   22.78 +	float: right;
   22.79 +	width: 152px;
   22.80 +	line-height: 1.3em;
   22.81 +	text-align: left;
   22.82 +	font-size: 12px;
   22.83 +	font-weight: bold;
   22.84 +}
   22.85 +
   22.86 +#nav_top {
   22.87 +	background: transparent url(pics/website/nav-tl.png) no-repeat top left;
   22.88 +	height: 12px;
   22.89 +}
   22.90 +
   22.91 +#nav_bottom {
   22.92 +	background: transparent url(pics/website/nav-bl.png) no-repeat bottom left;
   22.93 +	height: 12px;
   22.94 +}
   22.95 +
   22.96 +#nav_bottom_img {
   22.97 +	background: transparent url(pics/website/nav-br.png) no-repeat bottom right;
   22.98 +	height: 12px;
   22.99 +}
  22.100 +
  22.101 +#nav ul{
  22.102 +	list-style-type: none;
  22.103 +	margin: 0px 0px 0px 6px;
  22.104 +	padding: 3px 2px 3px 2px;
  22.105 +}
  22.106 +
  22.107 +#nav li {
  22.108 +	display: inline;
  22.109 +}
  22.110 +
  22.111 +#nav a {
  22.112 +	color: #3E1220;
  22.113 +	background: inherit;
  22.114 +	display: block;
  22.115 +	padding: 0.5px;
  22.116 +	text-decoration: none;
  22.117 +}
  22.118 +
  22.119 +#nav a:hover {
  22.120 +	color: #DF8F06;
  22.121 +	text-decoration: none;
  22.122 +	display: block;
  22.123 +}
  22.124 +
  22.125 +#nav hr {
  22.126 +	margin: 2px 0px 1px 0px;
  22.127 +	border: 0px;
  22.128 +	border-top: 1px solid #BDBDBD;
  22.129 +	
  22.130 +}
  22.131 +/* Page content */
  22.132 +
  22.133 +#content, #content_bottom, #content_top {
  22.134 +	background: white;
  22.135 +	color: black;
  22.136 +	text-align: justify;
  22.137 +}
  22.138 +
  22.139 +#content_top {
  22.140 +	height: 14px;
  22.141 +	margin: 0px 100px 0px 100px;
  22.142 +}
  22.143 +
  22.144 +#content {
  22.145 +	height: auto;
  22.146 +	margin: -6px 100px 0px 100px;
  22.147 +	padding: 0px 72px 72px 72px;
  22.148 +	/*background: white;
  22.149 +	color: #333333;*/
  22.150 +}
  22.151 +
  22.152 +#content_bottom {
  22.153 +	height: 14px;
  22.154 +	margin: 0px 100px 0px 100px;
  22.155 +	/*clear: both;*/
  22.156 +}
  22.157 +
  22.158 +#content li {
  22.159 +	line-height: 1.5em;
  22.160 +	text-align: left;
  22.161 +}
  22.162 +
  22.163 +/* Legal informations */
  22.164 +
  22.165 +#copy {
  22.166 +	font-size: 11px ;
  22.167 +	text-align: center ;
  22.168 +	background: transparent;
  22.169 +	color: #a8a8a8;
  22.170 +	padding-top: 10px;
  22.171 +}
  22.172 +
  22.173 +#copy a {
  22.174 +	background: inherit;
  22.175 +	color: #a8a8a8;
  22.176 +}
  22.177 +
  22.178 +#copy a:hover {
  22.179 +	background: inherit;
  22.180 +	color: #EDEDED;
  22.181 +}
  22.182 +
  22.183 +/* Footer */
  22.184 +
  22.185 +#bottom {
  22.186 +	float: none;
  22.187 +	background: inherit;
  22.188 +	color: black;
  22.189 +	width: auto;
  22.190 +	clear: both;
  22.191 +	padding: 0;
  22.192 +	margin: 0;
  22.193 +	text-align: center;
  22.194 +	vertical-align: middle;
  22.195 +}
  22.196 +
  22.197 +#news li {
  22.198 +	list-style-type: square;
  22.199 +	border-bottom: 1px dotted #BEBEBE;
  22.200 +	margin-left: -25px;
  22.201 +	padding: 4px 0px 4px 0px;
  22.202 +}
  22.203 +
  22.204 +#gallery {
  22.205 +	text-align: center;
  22.206 +}
  22.207 +
  22.208 +#gallery table {
  22.209 +	margin: 30px 0px 30px 0px;
  22.210 +}
  22.211 +
  22.212 +/* Clouds */
  22.213 +
  22.214 +#cloud {
  22.215 +	padding: 20px 0px 20px 0px;
  22.216 +	line-height: 3em;
  22.217 +	text-align: center;
  22.218 +}
  22.219 +#cloud a { padding: 4px; color: #956411; }
  22.220 +#cloud a.tag1 { font-size: 0.7em; font-weight: 100; }
  22.221 +#cloud a.tag2 { font-size: 0.8em; font-weight: 200; }
  22.222 +#cloud a.tag3 { font-size: 0.9em; font-weight: 300; }
  22.223 +#cloud a.tag4 { font-size: 1.0em; font-weight: 400; }
  22.224 +#cloud a.tag5 { font-size: 1.2em; font-weight: 500; }
  22.225 +#cloud a.tag6 { font-size: 1.4em; font-weight: 600; }
  22.226 +#cloud a.tag7 { font-size: 1.6em; font-weight: 700; }
  22.227 +#cloud a.tag8 { font-size: 1.8em; font-weight: 800; }
  22.228 +#cloud a.tag9 { font-size: 2.2em; font-weight: 900; }
  22.229 +#cloud a.tag10 { font-size: 2.5em; font-weight: 900; }
  22.230 +
  22.231 +/* CSS class. */
  22.232 +
  22.233 +.top_left, .top_right, .bottom_left, .bottom_right {
  22.234 +	height: 14px;
  22.235 +	width: 14px;
  22.236 +	color: white;
  22.237 +	background-color: #333333;
  22.238 +	background-repeat: no-repeat;
  22.239 +}
  22.240 +
  22.241 +.top_left {
  22.242 +	background-image: url(pics/website/content-tl.png);
  22.243 +	background-position: left top;
  22.244 +	position: absolute;
  22.245 +}
  22.246 +
  22.247 +.top_right {
  22.248 +	background-image: url(pics/website/content-tr.png);
  22.249 +	float: right;
  22.250 +}
  22.251 +
  22.252 +.bottom_left {
  22.253 +	background-image: url(pics/website/content-bl.png);
  22.254 +	position: absolute;
  22.255 +}
  22.256 +
  22.257 +.bottom_right {
  22.258 +	background-image: url(pics/website/content-br.png);
  22.259 +	float: right;
  22.260 +}
  22.261 +
  22.262 +/* HTML styles */
  22.263 +
  22.264 +h1 {
  22.265 +	color: #3E1220;
  22.266 +	background: inherit;
  22.267 +	text-align: left;
  22.268 +	margin: 0px 0px 16px -58px;
  22.269 +}
  22.270 +
  22.271 +h2 {
  22.272 +    color: #DF8F06;
  22.273 +    border-left: 10px solid #F3F3F3;
  22.274 +    padding: 4px 0px 4px 4px;
  22.275 +    margin: 0;
  22.276 +}
  22.277 +
  22.278 +h3 {
  22.279 +	font-weight: bold;
  22.280 +	color: #6c0023;
  22.281 +	background: inherit;
  22.282 +}
  22.283 +
  22.284 +a {
  22.285 +	text-decoration: underline;
  22.286 +	color: #0F314E;
  22.287 +	background: inherit;
  22.288 +}
  22.289 +
  22.290 +a:hover {
  22.291 +	text-decoration: none;
  22.292 +	color: blue;
  22.293 +	background: inherit;
  22.294 +}
  22.295 +
  22.296 +code {
  22.297 +	font-size: 12px;
  22.298 +	color: #669900;
  22.299 +	background: inherit;
  22.300 +}
  22.301 +
  22.302 +tt {
  22.303 +	color: #15EE15;
  22.304 +	background: inherit;
  22.305 +}
  22.306 +
  22.307 +img {
  22.308 +	border: 0pt none;
  22.309 +}
  22.310 +
  22.311 +fieldset {
  22.312 +	background: #eeeeee;
  22.313 +	color: black;
  22.314 +	margin-top: 25px;
  22.315 +	border: 1px solid black;
  22.316 +}
  22.317 +
  22.318 +legend {
  22.319 +	border: 1px solid black;
  22.320 +	color: #6c0023;
  22.321 +	background: #eaeaea;
  22.322 +	font-weight: bold;
  22.323 +}
  22.324 +
  22.325 +pre {
  22.326 +	padding: 5px;
  22.327 +	color: black;
  22.328 +	background: #E1E0B0;
  22.329 +}
  22.330 +
  22.331 +pre.script {
  22.332 +	padding: 10px;
  22.333 +	color: black;
  22.334 +	background: #E8E8E8;
  22.335 +	border: 1px inset #606060;
  22.336 +}
  22.337 +
  22.338 +/* Packages pages */
  22.339 +
  22.340 +.pkg_nav {
  22.341 +	border-top: 1px solid black;
  22.342 +	margin-top: 10px;
  22.343 +	padding-top: 10px;
  22.344 +}
  22.345 +
  22.346 +pre.package {
  22.347 +	padding: 0px;
  22.348 +	color: black;
  22.349 +	background: white;
  22.350 +}
  22.351 +
  22.352 +p.get {
  22.353 +	text-align: center;
  22.354 +	padding: 10px;
  22.355 +	color: black;
  22.356 +	background: #F3F3F3;
  22.357 +	border: 1px solid #DEDEDE;
  22.358 +}
  22.359 +
    23.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    23.2 +++ b/tazpkg-web/stuff/tazpkg-web	Sun Jun 21 03:26:15 2009 +0200
    23.3 @@ -0,0 +1,299 @@
    23.4 +#!/bin/sh
    23.5 +# SliTaz Packages Web interface generator: http://pkgs.slitaz.org/
    23.6 +#
    23.7 +# (C) 2009 SliTaz project - GNU General Public License v3.
    23.8 +# Christophe Lincoln <pankso@slitaz.org>
    23.9 +#
   23.10 +
   23.11 +. /etc/slitaz/tazpkg-web.conf
   23.12 +
   23.13 +RELEASE="$1"
   23.14 +PAGES_DIR=$WEB_INTERFACE/$RELEASE
   23.15 +DATE=`date +%Y-%m-%d\ \%H:%M:%S`
   23.16 +
   23.17 +status()
   23.18 +{
   23.19 +	local CHECK=$?
   23.20 +	echo -en "\033[70G"
   23.21 +	if [ $CHECK = 0 ]; then
   23.22 +		echo "Done"
   23.23 +	else
   23.24 +		echo "Failed"
   23.25 +	fi
   23.26 +	return $CHECK
   23.27 +}
   23.28 +
   23.29 +# Search from option with current version in first so users dont have
   23.30 +# to select the correct one.
   23.31 +search_form_option()
   23.32 +{
   23.33 +	if [ "$RELEASE" == "stable" ]; then
   23.34 +		cat << _EOT_
   23.35 +		<option>stable</option>
   23.36 +		<option>cooking</option>
   23.37 +		<option>1.0</option>
   23.38 +_EOT_
   23.39 +	else
   23.40 +		cat << _EOT_
   23.41 +		<option>cooking</option>
   23.42 +		<option>stable</option>
   23.43 +		<option>1.0</option>
   23.44 +_EOT_
   23.45 +	fi
   23.46 +}
   23.47 +
   23.48 +content_top()
   23.49 +{
   23.50 +	cat >> $PAGES_DIR/$page.html << _EOF_
   23.51 +
   23.52 +<!-- Content top. -->
   23.53 +<div id="content_top">
   23.54 +<div class="top_left"></div>
   23.55 +<div class="top_right"></div>
   23.56 +</div>
   23.57 +
   23.58 +<!-- Content -->
   23.59 +<div id="content">
   23.60 +<a name="content"></a>
   23.61 +
   23.62 +<h1><font color="#3E1220">Packages $RELEASE</font></h1>
   23.63 +<h2><font color="#DF8F06">$h2</font></h2>
   23.64 +_EOF_
   23.65 +}
   23.66 +
   23.67 +# xHTML Header.
   23.68 +xhtml_header()
   23.69 +{
   23.70 +	cat $LIB_DIR/html/header.html > $PAGES_DIR/$page.html
   23.71 +	sed -i s/"_RELEASE_"/"$RELEASE"/ $PAGES_DIR/$page.html
   23.72 +	sed -i s/"_PAGE_"/"$page"/ $PAGES_DIR/$page.html
   23.73 +	sed -i s/"_DATE_"/"$DATE"/ $PAGES_DIR/$page.html
   23.74 +}
   23.75 +
   23.76 +# xHTML Footer.
   23.77 +xhtml_footer()
   23.78 +{
   23.79 +	cat $LIB_DIR/html/footer.html >> $PAGES_DIR/$page.html
   23.80 +	sed -i s/"_DATE_"/"$DATE"/ $PAGES_DIR/$page.html
   23.81 +}
   23.82 +
   23.83 +# Index pages with categories and search form.
   23.84 +gen_index_content()
   23.85 +{
   23.86 +	cat >> $PAGES_DIR/$page.html << _EOT_
   23.87 +
   23.88 +<div style="text-align: center; padding: 20px;">
   23.89 +<form method="post" action="http://pkgs.slitaz.org/search.cgi">
   23.90 +	<select name="object">
   23.91 +		<option>Package</option>
   23.92 +		<option>Desc</option>
   23.93 +		<option>Tags</option>
   23.94 +		<option>Receipt</option>
   23.95 +		<option>Depends</option>
   23.96 +		<option>File</option>
   23.97 +		<option>File_list</option>
   23.98 +	</select>
   23.99 +	<strong>:</strong>
  23.100 +	<input type="text" name="query" size="32" />
  23.101 +	<select name="version">
  23.102 +`search_form_option`
  23.103 +	</select>
  23.104 +	<input type="submit" name="search" value="Search" />
  23.105 +</form>
  23.106 +<p>
  23.107 +$packages packages - Database generated on: $DATE
  23.108 +</p>
  23.109 +</div>
  23.110 +_EOT_
  23.111 +	cat $LIB_DIR/html/catlist.html >> $PAGES_DIR/$page.html
  23.112 +}
  23.113 +
  23.114 +# Packages <h3> and infos in <pre>. Some packages use EXTRAVERSION in
  23.115 +# the receipt so keep the value or set it to the kernel version.
  23.116 +pkgs_pages_content()
  23.117 +{
  23.118 +	for pkg in $WOK/*
  23.119 +	do
  23.120 +		DEPENDS=""
  23.121 +		DEPENDS_LINKS=""
  23.122 +		EXTRAVERSION=""
  23.123 +		. $pkg/receipt
  23.124 +		[ -z "$EXTRAVERSION" ] && EXTRAVERSION="_$KERNEL"
  23.125 +		packages=$(($packages+1))
  23.126 +		cat >> $PAGES_DIR/$CATEGORY.html << _EOT_
  23.127 +
  23.128 +<a name="$PACKAGE"></a>
  23.129 +<h3>$PACKAGE</h3>
  23.130 +<pre class="package">
  23.131 +Version    : $VERSION
  23.132 +Short desc : $SHORT_DESC
  23.133 +Web site   : <a href="$WEB_SITE">$WEB_SITE</a>
  23.134 +_EOT_
  23.135 +		# Extraversion string or not
  23.136 +		if [ -f "$PACKAGES_REPOSITORY/$PACKAGE-${VERSION}$EXTRAVERSION.tazpkg" ]; then
  23.137 +			cat >> $PAGES_DIR/$CATEGORY.html << _EOT_
  23.138 +Download   : <a href="http://mirror.slitaz.org/packages/$RELEASE/$PACKAGE-${VERSION}$EXTRAVERSION.tazpkg">$PACKAGE-${VERSION}$EXTRAVERSION.tazpkg</a>
  23.139 +_EOT_
  23.140 +			echo '</pre>' >> $PAGES_DIR/$CATEGORY.html
  23.141 +		else
  23.142 +			# Check if package exist, could be virtual
  23.143 +			[ -f "$PACKAGES_REPOSITORY/$PACKAGE-$VERSION.tazpkg" ] &&
  23.144 +			cat >> $PAGES_DIR/$CATEGORY.html << _EOT_
  23.145 +Download   : <a href="http://mirror.slitaz.org/packages/$RELEASE/$PACKAGE-$VERSION.tazpkg">$PACKAGE-$VERSION.tazpkg</a>
  23.146 +_EOT_
  23.147 +			echo '</pre>' >> $PAGES_DIR/$CATEGORY.html
  23.148 +			# Dependencies with link to the package information using
  23.149 +			# category.html#anchor
  23.150 +			if [ -n "$DEPENDS" ]; then
  23.151 +				for dep in $DEPENDS
  23.152 +				do
  23.153 +					receipt=$WOK/$dep/receipt
  23.154 +					if [ -f "$receipt" ]; then
  23.155 +						cat=`grep CATEGORY $receipt | sed s/CATEGORY=\"// | sed s/\"//`
  23.156 +						DEPENDS_LINKS=${DEPENDS_LINKS}"<a href=\"$cat.html#$dep\">$dep</a> "
  23.157 +					fi
  23.158 +				done
  23.159 +				cat >> $PAGES_DIR/$CATEGORY.html << _EOT_
  23.160 +<p>Depends : $DEPENDS_LINKS</p>
  23.161 +_EOT_
  23.162 +			fi
  23.163 +		fi
  23.164 +	done
  23.165 +}
  23.166 +
  23.167 +# Pages footer
  23.168 +pages_footer()
  23.169 +{
  23.170 +	for page in $CATEGORIES
  23.171 +	do
  23.172 +		# Gen categories menu/links
  23.173 +		echo '' >> $PAGES_DIR/$page.html
  23.174 +		echo '<p class="pkg_nav">' >> $PAGES_DIR/$page.html
  23.175 +		echo 'Categories' >> $PAGES_DIR/$page.html
  23.176 +		for i in $CATEGORIES
  23.177 +		do
  23.178 +			cat >> $PAGES_DIR/$page.html << _EOF_
  23.179 +| <a href="$i.html">$i</a>
  23.180 +_EOF_
  23.181 +		done
  23.182 +		echo '</p>' >> $PAGES_DIR/$page.html
  23.183 +		xhtml_footer
  23.184 +	done
  23.185 +}
  23.186 +
  23.187 +# Home page with search form and tag cloud.
  23.188 +home_page()
  23.189 +{
  23.190 +	PAGES_DIR=$WEB_INTERFACE
  23.191 +	page="index"
  23.192 +	h2="Web interface"
  23.193 +	RELEASE=""
  23.194 +	xhtml_header
  23.195 +	content_top
  23.196 +	cat $LIB_DIR/html/home.html >> $PAGES_DIR/$page.html
  23.197 +	xhtml_footer
  23.198 +}
  23.199 +
  23.200 +# Generate all categories pages and release index.
  23.201 +gen_all_pages()
  23.202 +{
  23.203 +	# Clean previews files.
  23.204 +	rm -rf $PAGES_DIR
  23.205 +	mkdir -p $PAGES_DIR
  23.206 +	echo -e "\nStarting to build the $RELEASE Web interface... "
  23.207 +	echo "================================================================================"
  23.208 +	# Packages pages header, menu and content top at first.
  23.209 +	echo -n "Generating all pages header..."
  23.210 +	for page in $CATEGORIES
  23.211 +	do
  23.212 +		h2=$page
  23.213 +		xhtml_header
  23.214 +		cat $LIB_DIR/html/menu.html >> $PAGES_DIR/$page.html
  23.215 +		content_top
  23.216 +	done
  23.217 +	status
  23.218 +	# Scan the wok and classify packages by category.
  23.219 +	echo -n "Scanning the wok and generating page content..."
  23.220 +	pkgs_pages_content
  23.221 +	status
  23.222 +	# Gen all packages pages footer.
  23.223 +	echo -n "Generating all pages footer..."
  23.224 +	pages_footer
  23.225 +	status
  23.226 +	# Stable or Cooking index with categories and home page.
  23.227 +	echo -n "Generating the main index..."
  23.228 +	page="index"
  23.229 +	h2="Categories"
  23.230 +	xhtml_header
  23.231 +	cat $LIB_DIR/html/menu.html >> $PAGES_DIR/$page.html
  23.232 +	content_top
  23.233 +	gen_index_content
  23.234 +	xhtml_footer
  23.235 +	home_page
  23.236 +	status
  23.237 +	echo "================================================================================"
  23.238 +	echo -e "Pages generated: $WEB_INTERFACE\n"
  23.239 +}
  23.240 +
  23.241 +# Prefer the Hg wok in the chroot. On host running Tazbb the wok's
  23.242 +# are updated and copied automaticaly and it conflict with Tazdev
  23.243 +# designed to maintain a local chroot environment without a build bot.
  23.244 +
  23.245 +case "$1" in
  23.246 +	stats)
  23.247 +		size=`du -sh $WEB_INTERFACE | awk '{ print $1 }'`
  23.248 +		pages=`find $WEB_INTERFACE -name *.html | wc -l`
  23.249 +		stable=`find $WEB_INTERFACE/stable -name *.html | wc -l`
  23.250 +		cooking=`find $WEB_INTERFACE/cooking -name *.html | wc -l`
  23.251 +		cat << _EOT_
  23.252 +
  23.253 +Tazpkg-web statistics
  23.254 +================================================================================
  23.255 +Web interface : $WEB_INTERFACE ($size)
  23.256 +xHTML pages   : $pages (Stable $stable - Cooking $cooking)
  23.257 +Library path  : $LIB_DIR
  23.258 +Stable path   : $STABLE
  23.259 +Cooking path  : $COOKING
  23.260 +================================================================================
  23.261 +
  23.262 +_EOT_
  23.263 +		;;
  23.264 +	check)
  23.265 +		RELEASE=$2
  23.266 +		[ -z "$RELEASE" ] && RELEASE=cooking
  23.267 +		echo -e "\nChecking: $WEB_INTERFACE/$RELEASE\n"
  23.268 +		for page in `cd $WEB_INTERFACE/$RELEASE && ls *.html`
  23.269 +		do
  23.270 +			if ! echo "$CATEGORIES index" | grep -qw ${page%.html}; then
  23.271 +				echo "Wrong category: ${page%.html}"
  23.272 +			fi
  23.273 +		done && echo "" ;;
  23.274 +	stable)
  23.275 +		PACKAGES_REPOSITORY=$STABLE/packages
  23.276 +		if [ -d $STABLE/chroot/home/slitaz/hg/wok ]; then
  23.277 +			WOK=$STABLE/chroot/home/slitaz/hg/wok
  23.278 +		else
  23.279 +			WOK=$STABLE/wok
  23.280 +		fi
  23.281 +		KERNEL=`cat $WOK/linux/receipt | grep ^VERSION= | cut -d '"' -f 2`
  23.282 +		gen_all_pages ;;
  23.283 +	cooking)
  23.284 +		PACKAGES_REPOSITORY=$COOKING/packages
  23.285 +		if [ -d $COOKING/chroot/home/slitaz/hg/wok ]; then
  23.286 +			WOK=$COOKING/chroot/home/slitaz/hg/wok
  23.287 +		else
  23.288 +			WOK=$COOKING/wok
  23.289 +		fi
  23.290 +		KERNEL=`cat $WOK/linux/receipt | grep ^VERSION= | cut -d '"' -f 2`
  23.291 +		gen_all_pages ;;
  23.292 +	*|usage)
  23.293 +		cat << _EOT_
  23.294 +
  23.295 +Tazpkg-web - SliTaz Packages Web interface generator.
  23.296 +Usage: `basename $0` [slitaz-release|stats|check]
  23.297 +
  23.298 +_EOT_
  23.299 +		;;
  23.300 +esac
  23.301 +
  23.302 +exit 0
    24.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    24.2 +++ b/tazpkg-web/stuff/tazpkg-web.conf	Sun Jun 21 03:26:15 2009 +0200
    24.3 @@ -0,0 +1,29 @@
    24.4 +# tazpkg-web.conf: SliTaz packages Web interface configuration file.
    24.5 +#
    24.6 +
    24.7 +# Path to the Web interface.
    24.8 +WEB_INTERFACE="/var/www/vhosts/pkgs"
    24.9 +
   24.10 +# Path to xHTML and XML templates.
   24.11 +LIB_DIR="/var/lib/tazpkg-web"
   24.12 +
   24.13 +# Path to each version.
   24.14 +STABLE="/home/slitaz/stable"
   24.15 +COOKING="/home/slitaz/cooking"
   24.16 +
   24.17 +# Packages categoies.
   24.18 +CATEGORIES="
   24.19 +base-system
   24.20 +x-window
   24.21 +utilities
   24.22 +network
   24.23 +graphics
   24.24 +multimedia
   24.25 +office
   24.26 +development
   24.27 +system-tools
   24.28 +security
   24.29 +games
   24.30 +misc
   24.31 +meta
   24.32 +non-free"
    25.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    25.2 +++ b/tazpkg-web/stuff/xml/rss-header.xml	Sun Jun 21 03:26:15 2009 +0200
    25.3 @@ -0,0 +1,15 @@
    25.4 +<?xml version="1.0" ?>
    25.5 +<rss version="2.0">
    25.6 +<channel>
    25.7 +	<title>SliTaz _RELEASE_ packages</title>
    25.8 +	<link>http://www.slitaz.org/</link>
    25.9 +	<lastBuildDate>_DATE_</lastBuildDate>
   25.10 +	<description>Latest packages releases for SliTaz GNU/Linux</description>
   25.11 +	<language>en</language>
   25.12 +	<generator>Tazpkg-web</generator>
   25.13 +
   25.14 +	<image>
   25.15 +		<title>SliTaz GNU/Linux</title>
   25.16 +		<url>../pics/website/slitaz-spider.png</url>
   25.17 +		<link>http://pkgs.slitaz.org/</link>
   25.18 +	</image>