wok-6.x view ocsinventory-server/receipt @ rev 14329
Up: connman (1.12)
author | Dominique Corbex <domcox@slitaz.org> |
---|---|
date | Fri Apr 12 19:56:50 2013 +0200 (2013-04-12) |
parents | 129bb5b11a7e |
children | 600aaedb561d |
line source
1 # SliTaz package receipt.
3 PACKAGE="ocsinventory-server"
4 VERSION="2.0.4"
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 WEB_SITE="http://www.ocsinventory-ng.org/index.php?page=English"
13 WANTED="ocsinventory"
15 # Rules to gen a SliTaz package suitable for Tazpkg.
16 genpkg_rules()
17 {
18 mkdir -p $fs/usr
19 cp -a $_pkg/usr/lib $fs/usr
21 install -o www -g www -m 0775 -d $fs/var/log/ocsinventory-server
22 install -o root -g www -m 0775 -d $fs/var/lib/ocsinventory-server/ipd
23 install -o root -g www -m 0775 -d $fs/var/lib/ocsinventory-server/download
25 mkdir -p $fs/etc/logrotate.d
26 cp -f $src/etc/logrotate.d/ocsinventory-server \
27 $fs/etc/logrotate.d/ocsinventory-server
28 sed -i "s#PATH_TO_LOG_DIRECTORY#/var/log/ocsinventory-server#g" \
29 $fs/etc/logrotate.d/ocsinventory-server
31 mkdir -p $fs/etc/apache/conf.d
32 cp $src/etc/ocsinventory/ocsinventory-server.conf \
33 $fs/etc/apache/conf.d/ocsinventory-server.conf
34 sed -i -e "s#DATABASE_SERVER#localhost#g" \
35 -e "s#DATABASE_PORT#3306#g" \
36 -e "s#VERSION_MP#2#g" \
37 -e "s#PATH_TO_LOG_DIRECTORY#/var/log/ocsinventory-server#g" \
38 $fs/etc/apache/conf.d/ocsinventory-server.conf
40 if ! grep -q mod_perl.so $fs/etc/apache/conf.d/ocsinventory-server.conf;
41 then
42 cat > $fs/etc/apache/conf.d/ocsinventory-server.tmp <<EOT
43 <IfModule !mod_perl.c>
44 loadmodule perl_module share/apache/modules/mod_perl.so
45 </IfModule>
47 $(cat $fs/etc/apache/conf.d/ocsinventory-server.conf)
48 EOT
49 mv $fs/etc/apache/conf.d/ocsinventory-server.tmp \
50 $fs/etc/apache/conf.d/ocsinventory-server
51 [ -f $fs/etc/apache/conf.d/ocsinventory-server.conf ] && \
52 rm -f $fs/etc/apache/conf.d/ocsinventory-server.conf
53 fi
54 }
56 post_install()
57 {
58 if [ -z $1 ]; then
59 echo "Now you can connect to http://$(hostname)/ocsreports"
60 # Restart Apache if is running
61 [ -f /var/run/apache/httpd.pid ] && /etc/init.d/apache reload
62 fi
63 }