wok-6.x annotate phpsysinfo/receipt @ rev 21756

logsurfer, mypaint: update url
author Pascal Bellard <pascal.bellard@slitaz.org>
date Sat Jun 22 21:11:47 2019 +0200 (2019-06-22)
parents d51b2411e55e
children 4599dfc8c5d5
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@15001 8 LICENSE="GPL2"
pascal@13237 9 WEB_SITE="http://phpsysinfo.sourceforge.net/"
pascal@13237 10 TARBALL="$PACKAGE-$VERSION.tar.gz"
pascal@13237 11 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
pascal@13237 12 CONFIG_FILES="/etc/phpsysinfo.conf"
pascal@16264 13 HOST_ARCH="any"
pascal@13237 14
pascal@13237 15 DEPENDS="php pcre-dev"
pascal@13237 16 BUILD_DEPENDS=""
pascal@13237 17
pascal@13237 18 # Rules to configure and make the package.
pascal@13237 19 compile_rules()
pascal@13237 20 {
pascal@13237 21 cd $src
pascal@13237 22 # SliTazisation from http://enira.net/?p=61
pascal@13237 23 sed -i "s/'-q'/'-a | grep -i pts -c'/" includes/os/class.Linux.inc.php
pascal@13237 24 grep -i slitaz data/distros.ini || cat >> data/distros.ini <<EOT
pascal@13237 25 [Slitaz]
pascal@13237 26 Name = "Slitaz"
pascal@13237 27 Image = "slitaz.png"
pascal@13237 28 Files = "/etc/slitaz-release"
pascal@13237 29
pascal@13237 30 EOT
pascal@13237 31 }
pascal@13237 32
pascal@13237 33 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@13237 34 genpkg_rules()
pascal@13237 35 {
pascal@13237 36 mkdir -p $fs/usr/share/phpsysinfo $fs/etc
pascal@13237 37 cp -a $src/* $fs/usr/share/phpsysinfo
pascal@13237 38 chown -R www.www $fs/usr/share/phpsysinfo
pascal@13237 39 mv $fs/usr/share/phpsysinfo/config.php.new $fs/etc/phpsysinfo.conf
pascal@13237 40 chmod 600 $fs/etc/phpsysinfo.conf
pascal@13237 41 ln -s /etc/phpsysinfo.conf $fs/usr/share/phpsysinfo/config.php
pascal@13237 42 }
pascal@13237 43
pascal@13237 44 post_install()
pascal@13237 45 {
pascal@13237 46 # Configure lighttpd server
pascal@18730 47 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then
pascal@18730 48 if ! grep -q /usr/share/phpsysinfo/ "$1/etc/lighttpd/lighttpd.conf"; then
pascal@18730 49 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 50 if [ -z "$1" ]; then
pascal@13237 51 # Start Web server.
pascal@13237 52 /etc/init.d/lighttpd stop
pascal@13237 53 /etc/init.d/lighttpd start
pascal@13237 54 fi
pascal@13237 55 fi
pascal@13237 56 fi
pascal@13237 57 # Configure apache server
pascal@18730 58 if [ -f "$1/etc/apache/httpd.conf" ]; then
pascal@18730 59 if [ ! -f "$1/etc/apache/conf.d/phpsysinfo" ]; then
pascal@18730 60 cat > "$1/etc/apache/conf.d/phpsysinfo" <<EOT
pascal@13237 61 <IfModule mod_alias.c>
pascal@13237 62 Alias /phpsysinfo /usr/share/phpsysinfo
pascal@13237 63 </IfModule>
pascal@13237 64 <DirectoryMatch /usr/share/phpsysinfo/>
pascal@13237 65 DirectoryIndex index.php
pascal@13237 66 Options +FollowSymLinks
pascal@13237 67 AllowOverride None
pascal@13237 68 Order allow,deny
pascal@13237 69 Allow from all
pascal@13237 70 </DirectoryMatch>
pascal@13237 71 EOT
pascal@13237 72 if [ -z "$1" ]; then
pascal@13237 73 # Start Web server.
pascal@13237 74 /etc/init.d/apache stop
pascal@13237 75 /etc/init.d/apache start
pascal@13237 76 fi
pascal@13237 77 fi
pascal@13237 78 fi
pascal@13237 79 }