wok-next annotate phpsysinfo/receipt @ rev 21727

created recipe for vbindiff
author Hans-G?nter Theisgen
date Sat Nov 21 14:32:44 2020 +0100 (2020-11-21)
parents 342b30daff76
children
rev   line source
al@20485 1 # SliTaz package receipt v2.
pascal@13237 2
pascal@13237 3 PACKAGE="phpsysinfo"
pascal@13237 4 VERSION="3.0.18"
pascal@13237 5 CATEGORY="misc"
al@20485 6 SHORT_DESC="Displays information about your system nicely"
pascal@13237 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@15001 8 LICENSE="GPL2"
al@21020 9 WEB_SITE="http://phpsysinfo.github.io/phpsysinfo/"
al@20485 10
pascal@13237 11 TARBALL="$PACKAGE-$VERSION.tar.gz"
pascal@13237 12 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL"
pascal@13237 13
al@20485 14 compile_rules() {
pascal@13237 15 # SliTazisation from http://enira.net/?p=61
pascal@13237 16 sed -i "s/'-q'/'-a | grep -i pts -c'/" includes/os/class.Linux.inc.php
pascal@13237 17 grep -i slitaz data/distros.ini || cat >> data/distros.ini <<EOT
pascal@13237 18 [Slitaz]
pascal@13237 19 Name = "Slitaz"
pascal@13237 20 Image = "slitaz.png"
pascal@13237 21 Files = "/etc/slitaz-release"
pascal@13237 22
pascal@13237 23 EOT
al@20485 24
al@20485 25 mkdir -p \
al@20485 26 $install/usr/share/phpsysinfo \
al@20485 27 $install/etc
al@20485 28 cp -a $src/* $install/usr/share/phpsysinfo
al@20485 29 chown -R www.www $install/usr/share/phpsysinfo
al@20485 30 mv $install/usr/share/phpsysinfo/config.php.new $install/etc/phpsysinfo.conf
al@20485 31 ln -s /etc/phpsysinfo.conf $install/usr/share/phpsysinfo/config.php
pascal@13237 32 }
pascal@13237 33
al@20485 34 genpkg_rules() {
al@20485 35 copy @std
pascal@13237 36 chmod 600 $fs/etc/phpsysinfo.conf
al@20749 37 DEPENDS="php pcre-dev" # ??
al@20485 38 CONFIG_FILES="/etc/phpsysinfo.conf"
pascal@13237 39 }
pascal@13237 40
al@20485 41 post_install() {
pascal@13237 42 # Configure lighttpd server
pascal@18730 43 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then
pascal@18730 44 if ! grep -q /usr/share/phpsysinfo/ "$1/etc/lighttpd/lighttpd.conf"; then
al@20485 45 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 46 if [ -z "$1" ]; then
pascal@13237 47 # Start Web server.
pascal@13237 48 /etc/init.d/lighttpd stop
pascal@13237 49 /etc/init.d/lighttpd start
pascal@13237 50 fi
pascal@13237 51 fi
pascal@13237 52 fi
pascal@13237 53 # Configure apache server
pascal@18730 54 if [ -f "$1/etc/apache/httpd.conf" ]; then
pascal@18730 55 if [ ! -f "$1/etc/apache/conf.d/phpsysinfo" ]; then
pascal@18730 56 cat > "$1/etc/apache/conf.d/phpsysinfo" <<EOT
pascal@13237 57 <IfModule mod_alias.c>
pascal@13237 58 Alias /phpsysinfo /usr/share/phpsysinfo
pascal@13237 59 </IfModule>
pascal@13237 60 <DirectoryMatch /usr/share/phpsysinfo/>
pascal@13237 61 DirectoryIndex index.php
pascal@13237 62 Options +FollowSymLinks
pascal@13237 63 AllowOverride None
pascal@13237 64 Order allow,deny
pascal@13237 65 Allow from all
pascal@13237 66 </DirectoryMatch>
pascal@13237 67 EOT
pascal@13237 68 if [ -z "$1" ]; then
pascal@13237 69 # Start Web server.
pascal@13237 70 /etc/init.d/apache stop
pascal@13237 71 /etc/init.d/apache start
pascal@13237 72 fi
pascal@13237 73 fi
pascal@13237 74 fi
pascal@13237 75 }