wok-current annotate phpsysinfo/receipt @ rev 23507
joe, tig, udftools: update bdeps
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Apr 06 11:10:51 2020 +0200 (2020-04-06) |
parents | 9e01bc6321ea |
children | a5ee74db1fee |
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" |
Hans-G?nter@23431 | 9 WEB_SITE="http://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@13237 | 21 # Rules to configure and make the package. |
pascal@13237 | 22 compile_rules() |
pascal@13237 | 23 { |
pascal@13237 | 24 # SliTazisation from http://enira.net/?p=61 |
Hans-G?nter@23431 | 25 sed -i "s/'-q'/'-a | grep -i pts -c'/" \ |
Hans-G?nter@23431 | 26 includes/os/class.Linux.inc.php |
pascal@13237 | 27 grep -i slitaz data/distros.ini || cat >> data/distros.ini <<EOT |
pascal@13237 | 28 [Slitaz] |
pascal@13237 | 29 Name = "Slitaz" |
pascal@13237 | 30 Image = "slitaz.png" |
pascal@13237 | 31 Files = "/etc/slitaz-release" |
pascal@13237 | 32 |
pascal@13237 | 33 EOT |
pascal@13237 | 34 } |
pascal@13237 | 35 |
pascal@13237 | 36 # Rules to gen a SliTaz package suitable for Tazpkg. |
pascal@13237 | 37 genpkg_rules() |
pascal@13237 | 38 { |
Hans-G?nter@23431 | 39 mkdir -p $fs/usr/share/phpsysinfo |
Hans-G?nter@23431 | 40 mkdir -p $fs/etc |
Hans-G?nter@23431 | 41 |
Hans-G?nter@23431 | 42 cp -a $src/* $fs/usr/share/phpsysinfo |
Hans-G?nter@23431 | 43 chown -R www.www $fs/usr/share/phpsysinfo |
Hans-G?nter@23431 | 44 mv $fs/usr/share/phpsysinfo/phpsysinfo.ini.new \ |
Hans-G?nter@23431 | 45 $fs/etc/phpsysinfo.conf |
Hans-G?nter@23431 | 46 chmod 600 $fs/etc/phpsysinfo.conf |
Hans-G?nter@23431 | 47 ln -s /etc/phpsysinfo.conf $fs/usr/share/phpsysinfo/config.php |
pascal@13237 | 48 } |
pascal@13237 | 49 |
pascal@13237 | 50 post_install() |
pascal@13237 | 51 { |
pascal@13237 | 52 # Configure lighttpd server |
Hans-G?nter@23431 | 53 if [ -f "$1/etc/lighttpd/lighttpd.conf" ] |
Hans-G?nter@23431 | 54 then |
Hans-G?nter@23431 | 55 if ! grep -q /usr/share/phpsysinfo/ "$1/etc/lighttpd/lighttpd.conf" |
Hans-G?nter@23431 | 56 then |
Hans-G?nter@23431 | 57 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 | 58 if [ -z "$1" ] |
Hans-G?nter@23431 | 59 then |
pascal@13237 | 60 # Start Web server. |
pascal@13237 | 61 /etc/init.d/lighttpd stop |
pascal@13237 | 62 /etc/init.d/lighttpd start |
pascal@13237 | 63 fi |
pascal@13237 | 64 fi |
pascal@13237 | 65 fi |
Hans-G?nter@23431 | 66 |
pascal@13237 | 67 # Configure apache server |
Hans-G?nter@23431 | 68 if [ -f "$1/etc/apache/httpd.conf" ] |
Hans-G?nter@23431 | 69 then |
Hans-G?nter@23431 | 70 if [ ! -f "$1/etc/apache/conf.d/phpsysinfo" ] |
Hans-G?nter@23431 | 71 then |
pascal@18730 | 72 cat > "$1/etc/apache/conf.d/phpsysinfo" <<EOT |
pascal@13237 | 73 <IfModule mod_alias.c> |
pascal@13237 | 74 Alias /phpsysinfo /usr/share/phpsysinfo |
pascal@13237 | 75 </IfModule> |
pascal@13237 | 76 <DirectoryMatch /usr/share/phpsysinfo/> |
pascal@13237 | 77 DirectoryIndex index.php |
pascal@13237 | 78 Options +FollowSymLinks |
pascal@13237 | 79 AllowOverride None |
pascal@13237 | 80 Order allow,deny |
pascal@13237 | 81 Allow from all |
pascal@13237 | 82 </DirectoryMatch> |
pascal@13237 | 83 EOT |
Hans-G?nter@23431 | 84 if [ -z "$1" ] |
Hans-G?nter@23431 | 85 then |
pascal@13237 | 86 # Start Web server. |
pascal@13237 | 87 /etc/init.d/apache stop |
pascal@13237 | 88 /etc/init.d/apache start |
pascal@13237 | 89 fi |
pascal@13237 | 90 fi |
pascal@13237 | 91 fi |
pascal@13237 | 92 } |