wok view transmission-web/receipt @ rev 1855

Add: mirage (image viewer)
author Paul Issott <paul@slitaz.org>
date Sun Dec 14 12:14:12 2008 +0000 (2008-12-14)
parents f4d16010477f
children fe3b7cbf1a7f
line source
1 # SliTaz package receipt.
3 PACKAGE="transmission-web"
4 VERSION="1.40"
5 CATEGORY="network"
6 SHORT_DESC="Transmission web interface."
7 MAINTAINER="pankso@slitaz.org"
8 DEPENDS="transmission lighttpd"
9 WANTED="transmission"
10 WEB_SITE="http://www.transmissionbt.com/"
12 # Rules to gen a SliTaz package suitable for Tazpkg.
13 genpkg_rules()
14 {
15 mkdir -p $fs/usr/share
16 cp -a $_pkg/usr/share/transmission $fs/usr/share
17 rm $fs/usr/share/transmission/web/LICENSE
18 }
20 post_install()
21 {
22 # Configure lighttpd server
23 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then
24 if ! grep -q /usr/share/transmission/web/ $1/etc/lighttpd/lighttpd.conf; then
25 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/transmission/" => "/usr/share/transmission/web/",|g' -i $1/etc/lighttpd/lighttpd.conf
26 if [ -z "$1" ]; then
27 # Start Web server.
28 /etc/init.d/lighttpd stop
29 /etc/init.d/lighttpd start
30 fi
31 fi
32 fi
33 # Configure apache server
34 if [ -f $1/etc/apache/httpd.conf ]; then
35 if [ ! -f $1/etc/apache/conf.d/transmission ]; then
36 cat > $1/etc/apache/conf.d/transmission <<EOT
37 <IfModule mod_alias.c>
38 Alias /transmission /usr/share/transmission/web
39 </IfModule>
40 <DirectoryMatch /usr/share/transmission/web>
41 DirectoryIndex index.html
42 Options +FollowSymLinks
43 AllowOverride None
44 Order allow,deny
45 Allow from all
46 </DirectoryMatch>
47 EOT
48 if [ -z "$1" ]; then
49 # Start Web server.
50 /etc/init.d/apache stop
51 /etc/init.d/apache start
52 fi
53 fi
54 fi
55 }