wok-current annotate ocsinventory-server/receipt @ rev 24032

modified get-teamviewer to be able to fetch versions < 13
author Hans-G?nter Theisgen
date Tue Apr 06 14:38:05 2021 +0100 (2021-04-06)
parents 970c5ec9a60a
children
rev   line source
erjo@3674 1 # SliTaz package receipt.
erjo@3674 2
erjo@3674 3 PACKAGE="ocsinventory-server"
erjo@12232 4 VERSION="2.0.4"
erjo@3674 5 CATEGORY="network"
erjo@3674 6 SHORT_DESC="Iventory and package deployment system"
erjo@3674 7 MAINTAINER="pascal.bellard@slitaz.org"
pascal@15590 8 LICENSE="GPL2"
pascal@15590 9 SOURCE="OCSNG_UNIX_SERVER"
pascal@23762 10 WEB_SITE="https://www.ocsinventory-ng.org/index.php?page=English"
pascal@15590 11 WANTED="ocsinventory"
pascal@15590 12
erjo@3674 13 DEPENDS="apache php-apache mysql perl perl-xml-simple perl-compress-raw-zlib
erjo@3674 14 perl-dbi perl-dbd-mysql perl-apache-dbi perl-net-ip perl-soap-lite
erjo@3674 15 perl-xml-parser perl-xml-sax-writer apache-mod-perl"
erjo@3674 16
erjo@3674 17 # Rules to gen a SliTaz package suitable for Tazpkg.
erjo@3674 18 genpkg_rules()
erjo@3674 19 {
erjo@3674 20 mkdir -p $fs/usr
pascal@15590 21 cp -a $install/usr/lib $fs/usr
erjo@3674 22
erjo@3674 23 install -o www -g www -m 0775 -d $fs/var/log/ocsinventory-server
erjo@3674 24 install -o root -g www -m 0775 -d $fs/var/lib/ocsinventory-server/ipd
erjo@3674 25 install -o root -g www -m 0775 -d $fs/var/lib/ocsinventory-server/download
erjo@3674 26
erjo@3674 27 mkdir -p $fs/etc/logrotate.d
erjo@8384 28 cp -f $src/etc/logrotate.d/ocsinventory-server \
erjo@3674 29 $fs/etc/logrotate.d/ocsinventory-server
erjo@3674 30 sed -i "s#PATH_TO_LOG_DIRECTORY#/var/log/ocsinventory-server#g" \
erjo@3674 31 $fs/etc/logrotate.d/ocsinventory-server
erjo@3674 32
erjo@3674 33 mkdir -p $fs/etc/apache/conf.d
erjo@8384 34 cp $src/etc/ocsinventory/ocsinventory-server.conf \
erjo@3674 35 $fs/etc/apache/conf.d/ocsinventory-server.conf
erjo@3674 36 sed -i -e "s#DATABASE_SERVER#localhost#g" \
erjo@3674 37 -e "s#DATABASE_PORT#3306#g" \
erjo@3674 38 -e "s#VERSION_MP#2#g" \
erjo@3674 39 -e "s#PATH_TO_LOG_DIRECTORY#/var/log/ocsinventory-server#g" \
erjo@3674 40 $fs/etc/apache/conf.d/ocsinventory-server.conf
erjo@3674 41
erjo@3674 42 if ! grep -q mod_perl.so $fs/etc/apache/conf.d/ocsinventory-server.conf;
erjo@3674 43 then
erjo@3674 44 cat > $fs/etc/apache/conf.d/ocsinventory-server.tmp <<EOT
erjo@3674 45 <IfModule !mod_perl.c>
erjo@3674 46 loadmodule perl_module share/apache/modules/mod_perl.so
erjo@3674 47 </IfModule>
erjo@3674 48
erjo@3674 49 $(cat $fs/etc/apache/conf.d/ocsinventory-server.conf)
erjo@3674 50 EOT
erjo@3674 51 mv $fs/etc/apache/conf.d/ocsinventory-server.tmp \
erjo@3674 52 $fs/etc/apache/conf.d/ocsinventory-server
erjo@3674 53 [ -f $fs/etc/apache/conf.d/ocsinventory-server.conf ] && \
erjo@3674 54 rm -f $fs/etc/apache/conf.d/ocsinventory-server.conf
erjo@3674 55 fi
erjo@3674 56 }
erjo@3674 57
erjo@3674 58 post_install()
erjo@3674 59 {
pascal@18730 60 if [ -z "$1" ]; then
pascal@20319 61 echo
erjo@3674 62 echo "Now you can connect to http://$(hostname)/ocsreports"
erjo@3674 63 # Restart Apache if is running
erjo@3674 64 [ -f /var/run/apache/httpd.pid ] && /etc/init.d/apache reload
erjo@3674 65 fi
erjo@3674 66 }
erjo@3674 67
erjo@3674 68