wok-next view ocsinventory-server/receipt @ rev 8762

Up: ario to 1.5.
author Christopher Rogers <slaxemulator@gmail.com>
date Sun Feb 20 22:44:41 2011 +0000 (2011-02-20)
parents 93d0091756cf
children 129bb5b11a7e
line source
1 # SliTaz package receipt.
3 PACKAGE="ocsinventory-server"
4 VERSION="1.3.3"
5 CATEGORY="network"
6 SHORT_DESC="Iventory and package deployment system"
7 MAINTAINER="pascal.bellard@slitaz.org"
8 DEPENDS="apache php-apache mysql perl perl-xml-simple perl-compress-raw-zlib
9 perl-dbi perl-dbd-mysql perl-apache-dbi perl-net-ip perl-soap-lite
10 perl-xml-parser perl-xml-sax-writer apache-mod-perl"
11 SOURCE="OCSNG_UNIX_SERVER"
12 TARBALL="${SOURCE}_${VERSION}.tar.gz"
13 WEB_SITE="http://www.ocsinventory-ng.org/index.php?page=English"
14 WANTED="ocsinventory"
16 # Rules to gen a SliTaz package suitable for Tazpkg.
17 genpkg_rules()
18 {
19 mkdir -p $fs/usr
20 cp -a $_pkg/usr/lib $fs/usr
22 install -o www -g www -m 0775 -d $fs/var/log/ocsinventory-server
23 install -o root -g www -m 0775 -d $fs/var/lib/ocsinventory-server/ipd
24 install -o root -g www -m 0775 -d $fs/var/lib/ocsinventory-server/download
26 mkdir -p $fs/etc/logrotate.d
27 cp -f $src/etc/logrotate.d/ocsinventory-server \
28 $fs/etc/logrotate.d/ocsinventory-server
29 sed -i "s#PATH_TO_LOG_DIRECTORY#/var/log/ocsinventory-server#g" \
30 $fs/etc/logrotate.d/ocsinventory-server
32 mkdir -p $fs/etc/apache/conf.d
33 cp $src/etc/ocsinventory/ocsinventory-server.conf \
34 $fs/etc/apache/conf.d/ocsinventory-server.conf
35 sed -i -e "s#DATABASE_SERVER#localhost#g" \
36 -e "s#DATABASE_PORT#3306#g" \
37 -e "s#VERSION_MP#2#g" \
38 -e "s#PATH_TO_LOG_DIRECTORY#/var/log/ocsinventory-server#g" \
39 $fs/etc/apache/conf.d/ocsinventory-server.conf
41 if ! grep -q mod_perl.so $fs/etc/apache/conf.d/ocsinventory-server.conf;
42 then
43 cat > $fs/etc/apache/conf.d/ocsinventory-server.tmp <<EOT
44 <IfModule !mod_perl.c>
45 loadmodule perl_module share/apache/modules/mod_perl.so
46 </IfModule>
48 $(cat $fs/etc/apache/conf.d/ocsinventory-server.conf)
49 EOT
50 mv $fs/etc/apache/conf.d/ocsinventory-server.tmp \
51 $fs/etc/apache/conf.d/ocsinventory-server
52 [ -f $fs/etc/apache/conf.d/ocsinventory-server.conf ] && \
53 rm -f $fs/etc/apache/conf.d/ocsinventory-server.conf
54 fi
55 }
57 post_install()
58 {
59 if [ -z $1 ]; then
60 echo "Now you can connect to http://$(hostname)/ocsreports"
61 # Restart Apache if is running
62 [ -f /var/run/apache/httpd.pid ] && /etc/init.d/apache reload
63 fi
64 }