wok-6.x annotate phpsysinfo/receipt @ rev 25104
Up klavaro (1.2.2)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Jun 22 08:45:04 2022 +0000 (2022-06-22) |
parents | a5ee74db1fee |
children | 7d834c8a352e |
rev | line source |
---|---|
pascal@13237 | 1 # SliTaz package receipt. |
pascal@13237 | 2 |
pascal@13237 | 3 PACKAGE="phpsysinfo" |
Hans-G?nter@23431 | 4 VERSION="3.3.2" |
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@23431 | 12 WGET_URL="https://github.com/rk4an/$PACKAGE/archive/v$VERSION.tar.gz" |
pascal@13237 | 13 |
pascal@13237 | 14 DEPENDS="php pcre-dev" |
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@23431 | 63 sed -e 's|.*"/examples/" => "/usr/share/examples/",| "/examples/" => "/usr/share/examples/",\n "/phpsysinfo/" => "/usr/share/phpsysinfo/",|g' -i "$1/etc/lighttpd/lighttpd.conf" |
Hans-G?nter@23431 | 64 if [ -z "$1" ] |
Hans-G?nter@23431 | 65 then |
pascal@13237 | 66 # Start Web server. |
pascal@13237 | 67 /etc/init.d/lighttpd stop |
pascal@13237 | 68 /etc/init.d/lighttpd start |
pascal@13237 | 69 fi |
pascal@13237 | 70 fi |
pascal@13237 | 71 fi |
Hans-G?nter@23431 | 72 |
pascal@13237 | 73 # Configure apache server |
Hans-G?nter@23431 | 74 if [ -f "$1/etc/apache/httpd.conf" ] |
Hans-G?nter@23431 | 75 then |
Hans-G?nter@23431 | 76 if [ ! -f "$1/etc/apache/conf.d/phpsysinfo" ] |
Hans-G?nter@23431 | 77 then |
pascal@18730 | 78 cat > "$1/etc/apache/conf.d/phpsysinfo" <<EOT |
pascal@13237 | 79 <IfModule mod_alias.c> |
pascal@13237 | 80 Alias /phpsysinfo /usr/share/phpsysinfo |
pascal@13237 | 81 </IfModule> |
pascal@13237 | 82 <DirectoryMatch /usr/share/phpsysinfo/> |
pascal@13237 | 83 DirectoryIndex index.php |
pascal@13237 | 84 Options +FollowSymLinks |
pascal@13237 | 85 AllowOverride None |
pascal@13237 | 86 Order allow,deny |
pascal@13237 | 87 Allow from all |
pascal@13237 | 88 </DirectoryMatch> |
pascal@13237 | 89 EOT |
Hans-G?nter@23431 | 90 if [ -z "$1" ] |
Hans-G?nter@23431 | 91 then |
pascal@13237 | 92 # Start Web server. |
pascal@13237 | 93 /etc/init.d/apache stop |
pascal@13237 | 94 /etc/init.d/apache start |
pascal@13237 | 95 fi |
pascal@13237 | 96 fi |
pascal@13237 | 97 fi |
pascal@13237 | 98 } |