wok-next diff nagvis/receipt @ rev 20179
Up ocsinventory (2.2) opencc (0.4.3)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Nov 02 11:09:53 2017 +0100 (2017-11-02) |
parents | 3765f181a6d5 |
children | 4d58cc2186c2 |
line diff
1.1 --- a/nagvis/receipt Sat Nov 30 17:02:58 2013 +0000 1.2 +++ b/nagvis/receipt Thu Nov 02 11:09:53 2017 +0100 1.3 @@ -1,4 +1,4 @@ 1.4 -# SliTaz package receipt. 1.5 +# SliTaz package receipt v2. 1.6 1.7 PACKAGE="nagvis" 1.8 VERSION="1.5.7" 1.9 @@ -9,9 +9,8 @@ 1.10 TARBALL="$PACKAGE-$VERSION.tar.gz" 1.11 WEB_SITE="http://www.nagvis.org/" 1.12 WGET_URL="$SF_MIRROR/$PACKAGE/$TARBALL" 1.13 -SUGGESTED="graphviz" 1.14 1.15 -DEPENDS="nagios php-mysql php-gd ndoutils mk-livestatus" 1.16 +SPLIT="nagvis nagvis-doc nagvis-flex" 1.17 1.18 # Rules to configure and make the package. 1.19 compile_rules() 1.20 @@ -22,85 +21,111 @@ 1.21 # Rules to gen a SliTaz package suitable for Tazpkg. 1.22 genpkg_rules() 1.23 { 1.24 - mkdir -p $fs/usr/share/nagvis \ 1.25 - $fs/etc/apache/conf.d \ 1.26 - $fs/var/lib/nagvis/var/tmpl/cache \ 1.27 - $fs/var/lib/nagvis/var/tmpl/compile \ 1.28 - $fs/usr/share/doc/nagvis 1.29 + case $PACKAGE in 1.30 + nagivs) 1.31 + SUGGESTED="graphviz" 1.32 + DEPENDS="nagios php-mysql php-gd ndoutils mk-livestatus" 1.33 + mkdir -p $fs/usr/share/nagvis \ 1.34 + $fs/etc/apache/conf.d \ 1.35 + $fs/var/lib/nagvis/var/tmpl/cache \ 1.36 + $fs/var/lib/nagvis/var/tmpl/compile \ 1.37 + $fs/usr/share/doc/nagvis 1.38 1.39 - cp -a $src/share $fs/usr/share/nagvis 1.40 - cp -a $src/etc $fs/etc/nagvis 1.41 + cp -a $src/share $fs/usr/share/nagvis 1.42 + cp -a $src/etc $fs/etc/nagvis 1.43 1.44 - # copy demo maps. 1.45 - #~ cp $fs/usr/share/nagios/nagvis/nagvis/images/maps/nagvis-demo.png \ 1.46 - #~ $fs/var/lib/nagvis/automap.png 1.47 + # copy demo maps. 1.48 + #~ cp $fs/usr/share/nagios/nagvis/nagvis/images/maps/nagvis-demo.png \ 1.49 + #~ $fs/var/lib/nagvis/automap.png 1.50 1.51 - # link var direcxtory (FHS) 1.52 - ln -s /var/lib/nagvis/var $fs/usr/share/nagvis/var 1.53 + # link var direcxtory (FHS) 1.54 + ln -s /var/lib/nagvis/var $fs/usr/share/nagvis/var 1.55 1.56 - # move config files 1.57 - ln -s /etc/nagvis $fs/usr/share/nagvis/etc 1.58 + # move config files 1.59 + ln -s /etc/nagvis $fs/usr/share/nagvis/etc 1.60 1.61 - # nagvis config 1.62 - mv $fs/etc/nagvis/nagvis.ini.php-sample $fs/etc/nagvis/nagvis.ini.php 1.63 - sed -i -e 's|;language=|language=|' \ 1.64 - -e 's|;dateformat="Y-m-d H:i:s"|dateformat="d-m-Y H:i:s"|' \ 1.65 - -e 's|;base=.*|base="/usr/share/nagvis/"|' \ 1.66 - -e 's|;htmlbase=|htmlbase=|' \ 1.67 - -e 's|;htmlcgi=|htmlcgi=|' \ 1.68 - -e 's|;backendtype=|backendtype=|' \ 1.69 - -e 's|;dbhost=|dbhost=|' \ 1.70 - -e 's|;dbport=|dbport=|' \ 1.71 - -e 's|;dbname=|dbname=|' \ 1.72 - -e 's|;dbname=|dbname=|' \ 1.73 - -e 's|;dbuser=|dbuser=|' \ 1.74 - -e 's|;dbpass=""|dbpass=|' \ 1.75 - -e 's|;dbprefix=|dbprefix=|' \ 1.76 - -e 's|;dbinstancename=|dbinstancename=|' \ 1.77 - $fs/etc/nagvis/nagvis.ini.php 1.78 + # nagvis config 1.79 + mv $fs/etc/nagvis/nagvis.ini.php-sample $fs/etc/nagvis/nagvis.ini.php 1.80 + sed -i -e 's|;language=|language=|' \ 1.81 + -e 's|;dateformat="Y-m-d H:i:s"|dateformat="d-m-Y H:i:s"|' \ 1.82 + -e 's|;base=.*|base="/usr/share/nagvis/"|' \ 1.83 + -e 's|;htmlbase=|htmlbase=|' \ 1.84 + -e 's|;htmlcgi=|htmlcgi=|' \ 1.85 + -e 's|;backendtype=|backendtype=|' \ 1.86 + -e 's|;dbhost=|dbhost=|' \ 1.87 + -e 's|;dbport=|dbport=|' \ 1.88 + -e 's|;dbname=|dbname=|' \ 1.89 + -e 's|;dbname=|dbname=|' \ 1.90 + -e 's|;dbuser=|dbuser=|' \ 1.91 + -e 's|;dbpass=""|dbpass=|' \ 1.92 + -e 's|;dbprefix=|dbprefix=|' \ 1.93 + -e 's|;dbinstancename=|dbinstancename=|' \ 1.94 + $fs/etc/nagvis/nagvis.ini.php 1.95 1.96 - sed -i -e '/;logonmodule=/ { 1.97 - a\logonmodule="LogonEnv"\ 1.98 + sed -i -e '/;logonmodule=/ { 1.99 + a\logonmodule="LogonEnv"\ 1.100 logonenvvar="REMOTE_USER"\ 1.101 logonenvcreateuser="0" 1.102 - }' $fs/etc/nagvis/nagvis.ini.php 1.103 - sed -i -e '/;socket/ a\socket="unix:/var/lib/nagios/rw/live"' $fs/etc/nagvis/nagvis.ini.php 1.104 - sed -i -e 's/;showautomaps=1/showautomaps=0/' $fs/etc/nagvis/nagvis.ini.php 1.105 + }' $fs/etc/nagvis/nagvis.ini.php 1.106 + sed -i -e '/;socket/ a\socket="unix:/var/lib/nagios/rw/live"' $fs/etc/nagvis/nagvis.ini.php 1.107 + sed -i -e 's/;showautomaps=1/showautomaps=0/' $fs/etc/nagvis/nagvis.ini.php 1.108 1.109 - # Apache config 1.110 - mv $fs/etc/nagvis/apache2-nagvis.conf-sample $fs/etc/nagvis/apache2-nagvis.conf 1.111 - ln -s /etc/nagvis/apache2-nagvis.conf $fs/etc/apache/conf.d/nagvis.conf 1.112 - sed -i -e 's|@NAGVIS_WEB@|/nagvis|' \ 1.113 - -e 's|@NAGVIS_PATH@|/usr/share/nagvis|' \ 1.114 - -e 's|#AuthName|AuthName|' \ 1.115 - -e 's|#AuthType|AuthType|' \ 1.116 - -e 's|#AuthUserFile|AuthUserFile|' \ 1.117 - -e 's|@NAGIOS_PATH@.*|/etc/nagios/htpasswd.users|' \ 1.118 - -e 's| #Require|Require|' $fs/etc/nagvis/apache2-nagvis.conf 1.119 + # Apache config 1.120 + mv $fs/etc/nagvis/apache2-nagvis.conf-sample $fs/etc/nagvis/apache2-nagvis.conf 1.121 + ln -s /etc/nagvis/apache2-nagvis.conf $fs/etc/apache/conf.d/nagvis.conf 1.122 + sed -i -e 's|@NAGVIS_WEB@|/nagvis|' \ 1.123 + -e 's|@NAGVIS_PATH@|/usr/share/nagvis|' \ 1.124 + -e 's|#AuthName|AuthName|' \ 1.125 + -e 's|#AuthType|AuthType|' \ 1.126 + -e 's|#AuthUserFile|AuthUserFile|' \ 1.127 + -e 's|@NAGIOS_PATH@.*|/etc/nagios/htpasswd.users|' \ 1.128 + -e 's| #Require|Require|' $fs/etc/nagvis/apache2-nagvis.conf 1.129 1.130 - # Fix perms 1.131 - chown -R www.www $fs/usr/share/nagvis $fs/var/lib/nagvis 1.132 - chown -R root.www $fs/etc/nagvis 1.133 + # Fix perms 1.134 + chown -R www.www $fs/usr/share/nagvis $fs/var/lib/nagvis 1.135 + chown -R root.www $fs/etc/nagvis 1.136 1.137 - chmod 664 $fs/etc/nagvis/nagvis.ini.php 1.138 - chmod 775 $fs/etc/nagvis/maps 1.139 - chmod 664 $fs/etc/nagvis/maps/* 1.140 - chmod 664 $fs/etc/nagvis/geomap/* 1.141 - chmod 664 $fs/etc/nagvis/automaps/* 1.142 - chmod 775 $fs/var/lib/nagvis 1.143 + chmod 664 $fs/etc/nagvis/nagvis.ini.php 1.144 + chmod 775 $fs/etc/nagvis/maps 1.145 + chmod 664 $fs/etc/nagvis/maps/* 1.146 + chmod 664 $fs/etc/nagvis/geomap/* 1.147 + chmod 664 $fs/etc/nagvis/automaps/* 1.148 + chmod 775 $fs/var/lib/nagvis 1.149 1.150 - # Cleanup 1.151 - rm -f $fs/usr/share/nagvis/install.* 1.152 - rm -f $fs/usr/share/nagvis/share/uifx 1.153 + # Cleanup 1.154 + rm -f $fs/usr/share/nagvis/install.* 1.155 + rm -f $fs/usr/share/nagvis/share/uifx 1.156 1.157 - mv $fs/usr/share/nagvis/share/userfiles/images/maps $fs/var/lib/nagvis 1.158 - chmod 775 $fs/var/lib/nagvis/maps 1.159 - chmod 664 $fs/var/lib/nagvis/maps/* 1.160 - ln -s /var/lib/nagvis/maps $fs/usr/share/nagvis/share/userfiles/images/ 1.161 - 1.162 + mv $fs/usr/share/nagvis/share/userfiles/images/maps $fs/var/lib/nagvis 1.163 + chmod 775 $fs/var/lib/nagvis/maps 1.164 + chmod 664 $fs/var/lib/nagvis/maps/* 1.165 + ln -s /var/lib/nagvis/maps $fs/usr/share/nagvis/share/userfiles/images/ 1.166 + ;; 1.167 + nagvis-doc) 1.168 + CAT="network|Nagvis documentation and licence" 1.169 + DEPENDS="nagvis" 1.170 + mkdir -p $fs/usr/share/doc/nagvis \ 1.171 + $fs/usr/share/nagvis 1.172 + 1.173 + # Copy doc and licence 1.174 + cp -a $src/INSTALL $fs/usr/share/doc/nagvis 1.175 + cp -a $src/LICENCE $fs/usr/share/doc/nagvis 1.176 + cp -a $src/README $fs/usr/share/doc/nagvis 1.177 + cp -a $src/ChangeLog $fs/usr/share/doc/nagvis 1.178 + cp -pa $src/docs $fs/usr/share/nagvis 1.179 + ;; 1.180 + nagvis-flex) 1.181 + CAT="network|Nagvis Flex" 1.182 + DEPENDS="nagvis" 1.183 + mkdir -p $fs/usr/share/nagvis 1.184 + 1.185 + # Copy doc and licence 1.186 + cp -a $src/uifx $fs/usr/share/nagvis 1.187 + ;; 1.188 + esac 1.189 } 1.190 1.191 -post_install() 1.192 +post_install_nagvis() 1.193 { 1.194 cat <<EOT 1.195 Now visit http://localhost/nagvis