wok annotate ocsinventory-server/receipt @ rev 15153

otf-gfs: typos
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Aug 15 16:19:38 2013 +0000 (2013-08-15)
parents 129bb5b11a7e
children 600aaedb561d
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"
erjo@3674 8 DEPENDS="apache php-apache mysql perl perl-xml-simple perl-compress-raw-zlib
erjo@3674 9 perl-dbi perl-dbd-mysql perl-apache-dbi perl-net-ip perl-soap-lite
erjo@3674 10 perl-xml-parser perl-xml-sax-writer apache-mod-perl"
erjo@3674 11 SOURCE="OCSNG_UNIX_SERVER"
erjo@3674 12 WEB_SITE="http://www.ocsinventory-ng.org/index.php?page=English"
erjo@3674 13 WANTED="ocsinventory"
erjo@3674 14
erjo@3674 15 # Rules to gen a SliTaz package suitable for Tazpkg.
erjo@3674 16 genpkg_rules()
erjo@3674 17 {
erjo@3674 18 mkdir -p $fs/usr
erjo@3674 19 cp -a $_pkg/usr/lib $fs/usr
erjo@3674 20
erjo@3674 21 install -o www -g www -m 0775 -d $fs/var/log/ocsinventory-server
erjo@3674 22 install -o root -g www -m 0775 -d $fs/var/lib/ocsinventory-server/ipd
erjo@3674 23 install -o root -g www -m 0775 -d $fs/var/lib/ocsinventory-server/download
erjo@3674 24
erjo@3674 25 mkdir -p $fs/etc/logrotate.d
erjo@8384 26 cp -f $src/etc/logrotate.d/ocsinventory-server \
erjo@3674 27 $fs/etc/logrotate.d/ocsinventory-server
erjo@3674 28 sed -i "s#PATH_TO_LOG_DIRECTORY#/var/log/ocsinventory-server#g" \
erjo@3674 29 $fs/etc/logrotate.d/ocsinventory-server
erjo@3674 30
erjo@3674 31 mkdir -p $fs/etc/apache/conf.d
erjo@8384 32 cp $src/etc/ocsinventory/ocsinventory-server.conf \
erjo@3674 33 $fs/etc/apache/conf.d/ocsinventory-server.conf
erjo@3674 34 sed -i -e "s#DATABASE_SERVER#localhost#g" \
erjo@3674 35 -e "s#DATABASE_PORT#3306#g" \
erjo@3674 36 -e "s#VERSION_MP#2#g" \
erjo@3674 37 -e "s#PATH_TO_LOG_DIRECTORY#/var/log/ocsinventory-server#g" \
erjo@3674 38 $fs/etc/apache/conf.d/ocsinventory-server.conf
erjo@3674 39
erjo@3674 40 if ! grep -q mod_perl.so $fs/etc/apache/conf.d/ocsinventory-server.conf;
erjo@3674 41 then
erjo@3674 42 cat > $fs/etc/apache/conf.d/ocsinventory-server.tmp <<EOT
erjo@3674 43 <IfModule !mod_perl.c>
erjo@3674 44 loadmodule perl_module share/apache/modules/mod_perl.so
erjo@3674 45 </IfModule>
erjo@3674 46
erjo@3674 47 $(cat $fs/etc/apache/conf.d/ocsinventory-server.conf)
erjo@3674 48 EOT
erjo@3674 49 mv $fs/etc/apache/conf.d/ocsinventory-server.tmp \
erjo@3674 50 $fs/etc/apache/conf.d/ocsinventory-server
erjo@3674 51 [ -f $fs/etc/apache/conf.d/ocsinventory-server.conf ] && \
erjo@3674 52 rm -f $fs/etc/apache/conf.d/ocsinventory-server.conf
erjo@3674 53 fi
erjo@3674 54 }
erjo@3674 55
erjo@3674 56 post_install()
erjo@3674 57 {
erjo@3674 58 if [ -z $1 ]; then
erjo@3674 59 echo "Now you can connect to http://$(hostname)/ocsreports"
erjo@3674 60 # Restart Apache if is running
erjo@3674 61 [ -f /var/run/apache/httpd.pid ] && /etc/init.d/apache reload
erjo@3674 62 fi
erjo@3674 63 }
erjo@3674 64
erjo@3674 65