wok-next diff monitorix/receipt @ rev 20486

outguess: fix install path
author Pascal Bellard <pascal.bellard@slitaz.org>
date Mon Mar 12 10:46:52 2018 +0100 (2018-03-12)
parents ded7bc956f55
children a3c581bf52b8
line diff
     1.1 --- a/monitorix/receipt	Thu May 11 00:50:35 2017 +0300
     1.2 +++ b/monitorix/receipt	Mon Mar 12 10:46:52 2018 +0100
     1.3 @@ -1,46 +1,44 @@
     1.4 -# SliTaz package receipt.
     1.5 +# SliTaz package receipt v2.
     1.6  
     1.7  PACKAGE="monitorix"
     1.8  VERSION="3.2.1"
     1.9  CATEGORY="misc"
    1.10 -SHORT_DESC="A lightweight system monitoring tool."
    1.11 +SHORT_DESC="A lightweight system monitoring tool"
    1.12  MAINTAINER="pascal.bellard@slitaz.org"
    1.13  LICENSE="GPL2"
    1.14  WEB_SITE="http://www.monitorix.org/"
    1.15 +
    1.16  TARBALL="$PACKAGE-$VERSION.tar.gz"
    1.17  WGET_URL="${WEB_SITE}$TARBALL"
    1.18 -SUGGESTED="iptables logrotate"
    1.19  
    1.20 -DEPENDS="rrdtool-perl perl-libwww-perl perl-dbi perl-xml-simple perl-cgi \
    1.21 -perl-mailtools perl-mime-lite perl-config-general perl-http-server-simple"
    1.22 -BUILD_DEPENDS=""
    1.23 -
    1.24 -# Rules to configure and make the package.
    1.25 -compile_rules()
    1.26 -{
    1.27 -	cd $src
    1.28 -} 
    1.29 -
    1.30 -# Rules to gen a SliTaz package suitable for Tazpkg.
    1.31 -genpkg_rules()
    1.32 -{
    1.33 -	mkdir -p $fs/usr/lib $fs/usr/bin $fs/etc/logrotate.d 
    1.34 -	mkdir -p $fs/usr/share/monitorix/cgi
    1.35 -	cp -a $src/monitorix.conf $fs/etc
    1.36 -	sed -i 's|/var/lib/monitorix|/usr/lib/monitorix|' $fs/etc/monitorix.conf
    1.37 -	sed -i 's|group = nobody|group = nogroup|' $fs/etc/monitorix.conf
    1.38 -	cp -a $src/docs/monitorix.logrotate $fs/etc/logrotate.d/monitorix
    1.39 -	cp -a $src/monitorix $fs/usr/bin
    1.40 -	cp -a $src/lib $fs/usr/lib/monitorix
    1.41 -	cp -a $src/monitorix.cgi $src/*.png $src/reports $fs/usr/share/monitorix
    1.42 +compile_rules() {
    1.43 +	mkdir -p \
    1.44 +		$install/usr/lib \
    1.45 +		$install/usr/bin \
    1.46 +		$install/etc/logrotate.d \
    1.47 +		$install/usr/share/monitorix/cgi
    1.48 +	cp -a $src/monitorix.conf $install/etc
    1.49 +	sed -i 's|/var/lib/monitorix|/usr/lib/monitorix|' $install/etc/monitorix.conf
    1.50 +	sed -i 's|group = nobody|group = nogroup|'        $install/etc/monitorix.conf
    1.51 +	cp -a $src/docs/monitorix.logrotate $install/etc/logrotate.d/monitorix
    1.52 +	cp -a $src/monitorix $install/usr/bin
    1.53 +	cp -a $src/lib $install/usr/lib/monitorix
    1.54 +	cp -a $src/monitorix.cgi $src/*.png $src/reports \
    1.55 +		$install/usr/share/monitorix
    1.56  }
    1.57  
    1.58 -post_install()
    1.59 -{
    1.60 +genpkg_rules() {
    1.61 +	copy @std
    1.62 +	DEPENDS="rrdtool-perl perl-libwww-perl perl-dbi perl-xml-simple perl-cgi \
    1.63 +	perl-mailtools perl-mime-lite perl-config-general perl-http-server-simple"
    1.64 +	SUGGESTED="iptables logrotate"
    1.65 +}
    1.66 +
    1.67 +post_install() {
    1.68  	# Configure lighttpd server
    1.69  	if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then
    1.70  		if ! grep -q /usr/share/monitorix/ "$1/etc/lighttpd/lighttpd.conf"; then
    1.71 -	    		sed -e 's|.*"/examples/" => "/usr/share/examples/",|    "/examples/" => "/usr/share/examples/",\n    "/monitorix/" => "/usr/share/monitorix/",\n    "/monitorix-cgi/" => "/usr/share/monitorix/cgi/",|g' -i "$1/etc/lighttpd/lighttpd.conf"
    1.72 +			sed -e 's|.*"/examples/" => "/usr/share/examples/",|    "/examples/" => "/usr/share/examples/",\n    "/monitorix/" => "/usr/share/monitorix/",\n    "/monitorix-cgi/" => "/usr/share/monitorix/cgi/",|g' -i "$1/etc/lighttpd/lighttpd.conf"
    1.73  			if [ -z "$1" ]; then
    1.74  				# Start Web server.
    1.75  				/etc/init.d/lighttpd stop