wok-6.x annotate phpsysinfo/receipt @ rev 25563
New toolchain GCC 4.9.2, Glibc 2.19, Binutils 2.37
author | Stanislas Leduc <shann@slitaz.org> |
---|---|
date | Fri May 05 18:12:18 2023 +0200 (18 months ago) |
parents | 5ea0ce1cecc0 |
children |
rev | line source |
---|---|
pascal@13237 | 1 # SliTaz package receipt. |
pascal@13237 | 2 |
pascal@13237 | 3 PACKAGE="phpsysinfo" |
Hans-G?nter@25139 | 4 VERSION="3.4.0" |
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@23881 | 9 WEB_SITE="https://phpsysinfo.github.io/phpsysinfo/" |
Hans-G?nter@23431 | 10 |
pascal@13237 | 11 TARBALL="$PACKAGE-$VERSION.tar.gz" |
Hans-G?nter@25139 | 12 WGET_URL="https://github.com/$PACKAGE/$PACKAGE/archive/refs/tags/v$VERSION.tar.gz" |
pascal@13237 | 13 |
Hans-G?nter@25139 | 14 DEPENDS="pcre-dev php" |
pascal@13237 | 15 BUILD_DEPENDS="" |
pascal@13237 | 16 |
Hans-G?nter@23431 | 17 CONFIG_FILES="/etc/phpsysinfo.conf" |
Hans-G?nter@23431 | 18 |
Hans-G?nter@23431 | 19 HOST_ARCH="any" |
Hans-G?nter@23431 | 20 |
pascal@24055 | 21 current_version() |
pascal@24055 | 22 { |
pascal@24055 | 23 wget -O - ${WGET_URL%/arch*}/releases 2>/dev/null | \ |
pascal@24055 | 24 sed '/archive.*tar/!d;s|.*/v\(.*\).tar.*|\1|;q' |
pascal@24055 | 25 } |
pascal@24055 | 26 |
pascal@13237 | 27 # Rules to configure and make the package. |
pascal@13237 | 28 compile_rules() |
pascal@13237 | 29 { |
pascal@13237 | 30 # SliTazisation from http://enira.net/?p=61 |
Hans-G?nter@23431 | 31 sed -i "s/'-q'/'-a | grep -i pts -c'/" \ |
Hans-G?nter@23431 | 32 includes/os/class.Linux.inc.php |
pascal@13237 | 33 grep -i slitaz data/distros.ini || cat >> data/distros.ini <<EOT |
pascal@13237 | 34 [Slitaz] |
pascal@13237 | 35 Name = "Slitaz" |
pascal@13237 | 36 Image = "slitaz.png" |
pascal@13237 | 37 Files = "/etc/slitaz-release" |
pascal@13237 | 38 |
pascal@13237 | 39 EOT |
pascal@13237 | 40 } |
pascal@13237 | 41 |
pascal@13237 | 42 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@13237 | 43 genpkg_rules() |
pascal@13237 | 44 { |
Hans-G?nter@23431 | 45 mkdir -p $fs/usr/share/phpsysinfo |
Hans-G?nter@23431 | 46 mkdir -p $fs/etc |
Hans-G?nter@23431 | 47 |
Hans-G?nter@23431 | 48 cp -a $src/* $fs/usr/share/phpsysinfo |
Hans-G?nter@23431 | 49 chown -R www.www $fs/usr/share/phpsysinfo |
Hans-G?nter@23431 | 50 mv $fs/usr/share/phpsysinfo/phpsysinfo.ini.new \ |
Hans-G?nter@23431 | 51 $fs/etc/phpsysinfo.conf |
Hans-G?nter@23431 | 52 chmod 600 $fs/etc/phpsysinfo.conf |
Hans-G?nter@23431 | 53 ln -s /etc/phpsysinfo.conf $fs/usr/share/phpsysinfo/config.php |
pascal@13237 | 54 } |
pascal@13237 | 55 |
pascal@13237 | 56 post_install() |
pascal@13237 | 57 { |
pascal@13237 | 58 # Configure lighttpd server |
Hans-G?nter@23431 | 59 if [ -f "$1/etc/lighttpd/lighttpd.conf" ] |
Hans-G?nter@23431 | 60 then |
Hans-G?nter@23431 | 61 if ! grep -q /usr/share/phpsysinfo/ "$1/etc/lighttpd/lighttpd.conf" |
Hans-G?nter@23431 | 62 then |
Hans-G?nter@25139 | 63 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/phpsysinfo/" => "/usr/share/phpsysinfo/",|g' \ |
Hans-G?nter@25139 | 64 -i "$1/etc/lighttpd/lighttpd.conf" |
Hans-G?nter@23431 | 65 if [ -z "$1" ] |
Hans-G?nter@23431 | 66 then |
pascal@13237 | 67 # Start Web server. |
pascal@13237 | 68 /etc/init.d/lighttpd stop |
pascal@13237 | 69 /etc/init.d/lighttpd start |
pascal@13237 | 70 fi |
pascal@13237 | 71 fi |
pascal@13237 | 72 fi |
Hans-G?nter@23431 | 73 |
pascal@13237 | 74 # Configure apache server |
Hans-G?nter@23431 | 75 if [ -f "$1/etc/apache/httpd.conf" ] |
Hans-G?nter@23431 | 76 then |
Hans-G?nter@23431 | 77 if [ ! -f "$1/etc/apache/conf.d/phpsysinfo" ] |
Hans-G?nter@23431 | 78 then |
pascal@18730 | 79 cat > "$1/etc/apache/conf.d/phpsysinfo" <<EOT |
pascal@13237 | 80 <IfModule mod_alias.c> |
pascal@13237 | 81 Alias /phpsysinfo /usr/share/phpsysinfo |
pascal@13237 | 82 </IfModule> |
pascal@13237 | 83 <DirectoryMatch /usr/share/phpsysinfo/> |
pascal@13237 | 84 DirectoryIndex index.php |
pascal@13237 | 85 Options +FollowSymLinks |
pascal@13237 | 86 AllowOverride None |
pascal@13237 | 87 Order allow,deny |
pascal@13237 | 88 Allow from all |
pascal@13237 | 89 </DirectoryMatch> |
pascal@13237 | 90 EOT |
Hans-G?nter@23431 | 91 if [ -z "$1" ] |
Hans-G?nter@23431 | 92 then |
pascal@13237 | 93 # Start Web server. |
pascal@13237 | 94 /etc/init.d/apache stop |
pascal@13237 | 95 /etc/init.d/apache start |
pascal@13237 | 96 fi |
pascal@13237 | 97 fi |
pascal@13237 | 98 fi |
pascal@13237 | 99 } |