wok-next annotate phpsysinfo/receipt @ rev 13625
Up xine-lib (1.2.2)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Nov 14 14:55:26 2012 +0100 (2012-11-14) |
parents | |
children | 408c87fa22ca |
rev | line source |
---|---|
pascal@13237 | 1 # SliTaz package receipt. |
pascal@13237 | 2 |
pascal@13237 | 3 PACKAGE="phpsysinfo" |
pascal@13237 | 4 VERSION="3.0.18" |
pascal@13237 | 5 CATEGORY="misc" |
pascal@13237 | 6 SHORT_DESC="Displays information about your system nicely." |
pascal@13237 | 7 MAINTAINER="pascal.bellard@slitaz.org" |
pascal@13237 | 8 WEB_SITE="http://phpsysinfo.sourceforge.net/" |
pascal@13237 | 9 TARBALL="$PACKAGE-$VERSION.tar.gz" |
pascal@13237 | 10 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL" |
pascal@13237 | 11 CONFIG_FILES="/etc/phpsysinfo.conf" |
pascal@13237 | 12 |
pascal@13237 | 13 DEPENDS="php pcre-dev" |
pascal@13237 | 14 BUILD_DEPENDS="" |
pascal@13237 | 15 |
pascal@13237 | 16 # Rules to configure and make the package. |
pascal@13237 | 17 compile_rules() |
pascal@13237 | 18 { |
pascal@13237 | 19 cd $src |
pascal@13237 | 20 # SliTazisation from http://enira.net/?p=61 |
pascal@13237 | 21 sed -i "s/'-q'/'-a | grep -i pts -c'/" includes/os/class.Linux.inc.php |
pascal@13237 | 22 grep -i slitaz data/distros.ini || cat >> data/distros.ini <<EOT |
pascal@13237 | 23 [Slitaz] |
pascal@13237 | 24 Name = "Slitaz" |
pascal@13237 | 25 Image = "slitaz.png" |
pascal@13237 | 26 Files = "/etc/slitaz-release" |
pascal@13237 | 27 |
pascal@13237 | 28 EOT |
pascal@13237 | 29 } |
pascal@13237 | 30 |
pascal@13237 | 31 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@13237 | 32 genpkg_rules() |
pascal@13237 | 33 { |
pascal@13237 | 34 mkdir -p $fs/usr/share/phpsysinfo $fs/etc |
pascal@13237 | 35 cp -a $src/* $fs/usr/share/phpsysinfo |
pascal@13237 | 36 chown -R www.www $fs/usr/share/phpsysinfo |
pascal@13237 | 37 mv $fs/usr/share/phpsysinfo/config.php.new $fs/etc/phpsysinfo.conf |
pascal@13237 | 38 chmod 600 $fs/etc/phpsysinfo.conf |
pascal@13237 | 39 ln -s /etc/phpsysinfo.conf $fs/usr/share/phpsysinfo/config.php |
pascal@13237 | 40 } |
pascal@13237 | 41 |
pascal@13237 | 42 post_install() |
pascal@13237 | 43 { |
pascal@13237 | 44 # Configure lighttpd server |
pascal@13237 | 45 if [ -f $1/etc/lighttpd/lighttpd.conf ]; then |
pascal@13237 | 46 if ! grep -q /usr/share/phpsysinfo/ $1/etc/lighttpd/lighttpd.conf; then |
pascal@13237 | 47 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/phpsysinfo/" => "/usr/share/phpsysinfo/",|g' -i $1/etc/lighttpd/lighttpd.conf |
pascal@13237 | 48 if [ -z "$1" ]; then |
pascal@13237 | 49 # Start Web server. |
pascal@13237 | 50 /etc/init.d/lighttpd stop |
pascal@13237 | 51 /etc/init.d/lighttpd start |
pascal@13237 | 52 fi |
pascal@13237 | 53 fi |
pascal@13237 | 54 fi |
pascal@13237 | 55 # Configure apache server |
pascal@13237 | 56 if [ -f $1/etc/apache/httpd.conf ]; then |
pascal@13237 | 57 if [ ! -f $1/etc/apache/conf.d/phpsysinfo ]; then |
pascal@13237 | 58 cat > $1/etc/apache/conf.d/phpsysinfo <<EOT |
pascal@13237 | 59 <IfModule mod_alias.c> |
pascal@13237 | 60 Alias /phpsysinfo /usr/share/phpsysinfo |
pascal@13237 | 61 </IfModule> |
pascal@13237 | 62 <DirectoryMatch /usr/share/phpsysinfo/> |
pascal@13237 | 63 DirectoryIndex index.php |
pascal@13237 | 64 Options +FollowSymLinks |
pascal@13237 | 65 AllowOverride None |
pascal@13237 | 66 Order allow,deny |
pascal@13237 | 67 Allow from all |
pascal@13237 | 68 </DirectoryMatch> |
pascal@13237 | 69 EOT |
pascal@13237 | 70 if [ -z "$1" ]; then |
pascal@13237 | 71 # Start Web server. |
pascal@13237 | 72 /etc/init.d/apache stop |
pascal@13237 | 73 /etc/init.d/apache start |
pascal@13237 | 74 fi |
pascal@13237 | 75 fi |
pascal@13237 | 76 fi |
pascal@13237 | 77 } |