wok view ocsinventory-server/receipt @ rev 25538

get-java8-jre: get version 8u361 by default
author Hans-G?nter Theisgen
date Fri Mar 03 17:41:58 2023 +0100 (21 months ago)
parents 970c5ec9a60a
children
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 LICENSE="GPL2"
9 SOURCE="OCSNG_UNIX_SERVER"
10 WEB_SITE="https://www.ocsinventory-ng.org/index.php?page=English"
11 WANTED="ocsinventory"
13 DEPENDS="apache php-apache mysql perl perl-xml-simple perl-compress-raw-zlib
14 perl-dbi perl-dbd-mysql perl-apache-dbi perl-net-ip perl-soap-lite
15 perl-xml-parser perl-xml-sax-writer apache-mod-perl"
17 # Rules to gen a SliTaz package suitable for Tazpkg.
18 genpkg_rules()
19 {
20 mkdir -p $fs/usr
21 cp -a $install/usr/lib $fs/usr
23 install -o www -g www -m 0775 -d $fs/var/log/ocsinventory-server
24 install -o root -g www -m 0775 -d $fs/var/lib/ocsinventory-server/ipd
25 install -o root -g www -m 0775 -d $fs/var/lib/ocsinventory-server/download
27 mkdir -p $fs/etc/logrotate.d
28 cp -f $src/etc/logrotate.d/ocsinventory-server \
29 $fs/etc/logrotate.d/ocsinventory-server
30 sed -i "s#PATH_TO_LOG_DIRECTORY#/var/log/ocsinventory-server#g" \
31 $fs/etc/logrotate.d/ocsinventory-server
33 mkdir -p $fs/etc/apache/conf.d
34 cp $src/etc/ocsinventory/ocsinventory-server.conf \
35 $fs/etc/apache/conf.d/ocsinventory-server.conf
36 sed -i -e "s#DATABASE_SERVER#localhost#g" \
37 -e "s#DATABASE_PORT#3306#g" \
38 -e "s#VERSION_MP#2#g" \
39 -e "s#PATH_TO_LOG_DIRECTORY#/var/log/ocsinventory-server#g" \
40 $fs/etc/apache/conf.d/ocsinventory-server.conf
42 if ! grep -q mod_perl.so $fs/etc/apache/conf.d/ocsinventory-server.conf;
43 then
44 cat > $fs/etc/apache/conf.d/ocsinventory-server.tmp <<EOT
45 <IfModule !mod_perl.c>
46 loadmodule perl_module share/apache/modules/mod_perl.so
47 </IfModule>
49 $(cat $fs/etc/apache/conf.d/ocsinventory-server.conf)
50 EOT
51 mv $fs/etc/apache/conf.d/ocsinventory-server.tmp \
52 $fs/etc/apache/conf.d/ocsinventory-server
53 [ -f $fs/etc/apache/conf.d/ocsinventory-server.conf ] && \
54 rm -f $fs/etc/apache/conf.d/ocsinventory-server.conf
55 fi
56 }
58 post_install()
59 {
60 if [ -z "$1" ]; then
61 echo
62 echo "Now you can connect to http://$(hostname)/ocsreports"
63 # Restart Apache if is running
64 [ -f /var/run/apache/httpd.pid ] && /etc/init.d/apache reload
65 fi
66 }