wok annotate monitorix/receipt @ rev 21717

updated protobuf, protobuf-dev and protobuf-python again (2.4.1 -> 3.8.0)
author Hans-G?nter Theisgen
date Wed Jun 12 13:36:14 2019 +0100 (2019-06-12)
parents a78610b2eb47
children 442b472ff67d
rev   line source
pascal@14699 1 # SliTaz package receipt.
pascal@14699 2
pascal@14699 3 PACKAGE="monitorix"
Hans-G?nter@21468 4 VERSION="3.11.0"
pascal@14699 5 CATEGORY="misc"
pascal@14699 6 SHORT_DESC="A lightweight system monitoring tool."
pascal@14699 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@14699 8 LICENSE="GPL2"
pascal@20669 9 WEB_SITE="https://www.monitorix.org/"
Hans-G?nter@21468 10
pascal@14699 11 TARBALL="$PACKAGE-$VERSION.tar.gz"
pascal@14699 12 WGET_URL="${WEB_SITE}$TARBALL"
Hans-G?nter@21468 13
pascal@14699 14 SUGGESTED="iptables logrotate"
Hans-G?nter@21468 15 DEPENDS="perl-cgi perl-config-general perl-dbi perl-http-server-simple \
Hans-G?nter@21468 16 perl-libwww perl-mailtools perl-mime-lite perl-xml-simple rrdtool-perl"
pascal@14699 17 BUILD_DEPENDS=""
pascal@14699 18
pascal@14699 19 # Rules to gen a SliTaz package suitable for Tazpkg.
pascal@14699 20 genpkg_rules()
pascal@14699 21 {
Hans-G?nter@21468 22 mkdir -p $fs/usr/lib
Hans-G?nter@21468 23 mkdir -p $fs/usr/bin
Hans-G?nter@21468 24 mkdir -p $fs/etc/logrotate.d
pascal@14700 25 mkdir -p $fs/usr/share/monitorix/cgi
Hans-G?nter@21468 26
Hans-G?nter@21468 27 cp -a $src/monitorix.conf $fs/etc
pascal@14700 28 sed -i 's|/var/lib/monitorix|/usr/lib/monitorix|' $fs/etc/monitorix.conf
pascal@14701 29 sed -i 's|group = nobody|group = nogroup|' $fs/etc/monitorix.conf
pascal@14699 30 cp -a $src/docs/monitorix.logrotate $fs/etc/logrotate.d/monitorix
Hans-G?nter@21468 31 cp -a $src/monitorix $fs/usr/bin
Hans-G?nter@21468 32 cp -a $src/lib $fs/usr/lib/monitorix
Hans-G?nter@21468 33 cp -a $src/monitorix.cgi $src/*.png \
Hans-G?nter@21468 34 $src/reports $fs/usr/share/monitorix
pascal@14699 35 }
pascal@14699 36
pascal@14699 37 post_install()
pascal@14699 38 {
pascal@14699 39 # Configure lighttpd server
pascal@18730 40 if [ -f "$1/etc/lighttpd/lighttpd.conf" ]; then
pascal@18730 41 if ! grep -q /usr/share/monitorix/ "$1/etc/lighttpd/lighttpd.conf"; then
pascal@18730 42 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"
pascal@14699 43 if [ -z "$1" ]; then
pascal@14699 44 # Start Web server.
pascal@14699 45 /etc/init.d/lighttpd stop
pascal@14699 46 /etc/init.d/lighttpd start
pascal@14699 47 fi
pascal@14699 48 fi
pascal@14699 49 fi
pascal@14699 50 # Configure apache server
pascal@18730 51 if [ -f "$1/etc/apache/httpd.conf" ]; then
pascal@18730 52 if [ ! -f "$1/etc/apache/conf.d/monitorix" ]; then
pascal@18730 53 cat > "$1/etc/apache/conf.d/monitorix" <<EOT
pascal@14699 54 Alias /monitorix /usr/share/monitorix
pascal@14699 55 ScriptAlias /monitorix-cgi /usr/share/monitorix/cgi
pascal@14699 56
pascal@14699 57 <Directory /usr/share/monitorix/cgi/>
pascal@14699 58 DirectoryIndex monitorix.cgi
pascal@14699 59 Options ExecCGI
pascal@14699 60 Order Deny,Allow
pascal@14699 61 Deny from all
pascal@14699 62 Allow from 127.0.0.1
pascal@14699 63 </Directory>
pascal@14699 64
pascal@14699 65 EOT
pascal@14699 66 if [ -z "$1" ]; then
pascal@14699 67 # Start Web server.
pascal@14699 68 /etc/init.d/apache stop
pascal@14699 69 /etc/init.d/apache start
pascal@14699 70 fi
pascal@14699 71 fi
pascal@14699 72 fi
pascal@14699 73 }