wok annotate ocsinventory-server/receipt @ rev 8674
Up: cmake to 2.8.4.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Wed Feb 16 18:45:12 2011 +0000 (2011-02-16) |
parents | fb7e577211da |
children | be13f25e790b |
rev | line source |
---|---|
erjo@3674 | 1 # SliTaz package receipt. |
erjo@3674 | 2 |
erjo@3674 | 3 PACKAGE="ocsinventory-server" |
erjo@8384 | 4 VERSION="1.3.3" |
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 TARBALL="${SOURCE}_${VERSION}.tar.gz" |
erjo@3674 | 13 WEB_SITE="http://www.ocsinventory-ng.org/index.php?page=English" |
erjo@3674 | 14 WANTED="ocsinventory" |
erjo@3674 | 15 |
erjo@3674 | 16 # Rules to gen a SliTaz package suitable for Tazpkg. |
erjo@3674 | 17 genpkg_rules() |
erjo@3674 | 18 { |
erjo@3674 | 19 src=$WOK/$WANTED/$SOURCE-$VERSION |
erjo@3674 | 20 _pkg=$WOK/$WANTED/$SOURCE-$VERSION/_pkg |
erjo@3674 | 21 |
erjo@3674 | 22 mkdir -p $fs/usr |
erjo@3674 | 23 cp -a $_pkg/usr/lib $fs/usr |
erjo@3674 | 24 |
erjo@3674 | 25 install -o www -g www -m 0775 -d $fs/var/log/ocsinventory-server |
erjo@3674 | 26 install -o root -g www -m 0775 -d $fs/var/lib/ocsinventory-server/ipd |
erjo@3674 | 27 install -o root -g www -m 0775 -d $fs/var/lib/ocsinventory-server/download |
erjo@3674 | 28 |
erjo@3674 | 29 mkdir -p $fs/etc/logrotate.d |
erjo@8384 | 30 cp -f $src/etc/logrotate.d/ocsinventory-server \ |
erjo@3674 | 31 $fs/etc/logrotate.d/ocsinventory-server |
erjo@3674 | 32 sed -i "s#PATH_TO_LOG_DIRECTORY#/var/log/ocsinventory-server#g" \ |
erjo@3674 | 33 $fs/etc/logrotate.d/ocsinventory-server |
erjo@3674 | 34 |
erjo@3674 | 35 mkdir -p $fs/etc/apache/conf.d |
erjo@8384 | 36 cp $src/etc/ocsinventory/ocsinventory-server.conf \ |
erjo@3674 | 37 $fs/etc/apache/conf.d/ocsinventory-server.conf |
erjo@3674 | 38 sed -i -e "s#DATABASE_SERVER#localhost#g" \ |
erjo@3674 | 39 -e "s#DATABASE_PORT#3306#g" \ |
erjo@3674 | 40 -e "s#VERSION_MP#2#g" \ |
erjo@3674 | 41 -e "s#PATH_TO_LOG_DIRECTORY#/var/log/ocsinventory-server#g" \ |
erjo@3674 | 42 $fs/etc/apache/conf.d/ocsinventory-server.conf |
erjo@3674 | 43 |
erjo@3674 | 44 if ! grep -q mod_perl.so $fs/etc/apache/conf.d/ocsinventory-server.conf; |
erjo@3674 | 45 then |
erjo@3674 | 46 cat > $fs/etc/apache/conf.d/ocsinventory-server.tmp <<EOT |
erjo@3674 | 47 <IfModule !mod_perl.c> |
erjo@3674 | 48 loadmodule perl_module share/apache/modules/mod_perl.so |
erjo@3674 | 49 </IfModule> |
erjo@3674 | 50 |
erjo@3674 | 51 $(cat $fs/etc/apache/conf.d/ocsinventory-server.conf) |
erjo@3674 | 52 EOT |
erjo@3674 | 53 mv $fs/etc/apache/conf.d/ocsinventory-server.tmp \ |
erjo@3674 | 54 $fs/etc/apache/conf.d/ocsinventory-server |
erjo@3674 | 55 [ -f $fs/etc/apache/conf.d/ocsinventory-server.conf ] && \ |
erjo@3674 | 56 rm -f $fs/etc/apache/conf.d/ocsinventory-server.conf |
erjo@3674 | 57 fi |
erjo@3674 | 58 } |
erjo@3674 | 59 |
erjo@3674 | 60 post_install() |
erjo@3674 | 61 { |
erjo@3674 | 62 if [ -z $1 ]; then |
erjo@3674 | 63 echo "Now you can connect to http://$(hostname)/ocsreports" |
erjo@3674 | 64 # Restart Apache if is running |
erjo@3674 | 65 [ -f /var/run/apache/httpd.pid ] && /etc/init.d/apache reload |
erjo@3674 | 66 fi |
erjo@3674 | 67 } |
erjo@3674 | 68 |
erjo@3674 | 69 |