wok diff ocsinventory-server/receipt @ rev 3970

Update: firefox-dev reporting wrong version in pkg-config firefox-xpcom
author Matthew Sheets <rcx@zoominternet.net>
date Wed Aug 26 14:28:35 2009 +0000 (2009-08-26)
parents
children 93d0091756cf
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/ocsinventory-server/receipt	Wed Aug 26 14:28:35 2009 +0000
     1.3 @@ -0,0 +1,69 @@
     1.4 +# SliTaz package receipt.
     1.5 +
     1.6 +PACKAGE="ocsinventory-server"
     1.7 +VERSION="1.02.1"
     1.8 +CATEGORY="network"
     1.9 +SHORT_DESC="Iventory and package deployment system"
    1.10 +MAINTAINER="pascal.bellard@slitaz.org"
    1.11 +DEPENDS="apache php-apache mysql perl perl-xml-simple perl-compress-raw-zlib
    1.12 + perl-dbi perl-dbd-mysql perl-apache-dbi perl-net-ip perl-soap-lite
    1.13 + perl-xml-parser perl-xml-sax-writer apache-mod-perl"
    1.14 +SOURCE="OCSNG_UNIX_SERVER"
    1.15 +TARBALL="${SOURCE}_${VERSION}.tar.gz"
    1.16 +WEB_SITE="http://www.ocsinventory-ng.org/index.php?page=English"
    1.17 +WANTED="ocsinventory"
    1.18 +
    1.19 +# Rules to gen a SliTaz package suitable for Tazpkg.
    1.20 +genpkg_rules()
    1.21 +{
    1.22 +	src=$WOK/$WANTED/$SOURCE-$VERSION
    1.23 +	_pkg=$WOK/$WANTED/$SOURCE-$VERSION/_pkg
    1.24 +	
    1.25 +	mkdir -p $fs/usr
    1.26 +	cp -a $_pkg/usr/lib $fs/usr
    1.27 +	
    1.28 +	install -o www -g www -m 0775  -d $fs/var/log/ocsinventory-server
    1.29 +	install -o root -g www -m 0775 -d $fs/var/lib/ocsinventory-server/ipd
    1.30 +	install -o root -g www -m 0775 -d $fs/var/lib/ocsinventory-server/download
    1.31 +	
    1.32 +	mkdir -p $fs/etc/logrotate.d
    1.33 +	cp -f $src/Apache/etc/logrotate.d/ocsinventory-server \
    1.34 +		$fs/etc/logrotate.d/ocsinventory-server
    1.35 +	sed -i "s#PATH_TO_LOG_DIRECTORY#/var/log/ocsinventory-server#g" \
    1.36 +		$fs/etc/logrotate.d/ocsinventory-server 
    1.37 +	
    1.38 +	mkdir -p $fs/etc/apache/conf.d
    1.39 +	cp $src/Apache/etc/ocsinventory/ocsinventory-server.conf \
    1.40 +		$fs/etc/apache/conf.d/ocsinventory-server.conf
    1.41 +	sed -i  -e "s#DATABASE_SERVER#localhost#g" \
    1.42 +		-e "s#DATABASE_PORT#3306#g" \
    1.43 +		-e "s#VERSION_MP#2#g" \
    1.44 +		-e "s#PATH_TO_LOG_DIRECTORY#/var/log/ocsinventory-server#g" \
    1.45 +		$fs/etc/apache/conf.d/ocsinventory-server.conf
    1.46 +
    1.47 +	if ! grep -q mod_perl.so $fs/etc/apache/conf.d/ocsinventory-server.conf;
    1.48 +	then
    1.49 +		cat > $fs/etc/apache/conf.d/ocsinventory-server.tmp <<EOT
    1.50 +<IfModule !mod_perl.c>
    1.51 +   loadmodule perl_module share/apache/modules/mod_perl.so
    1.52 +</IfModule>
    1.53 +
    1.54 +$(cat $fs/etc/apache/conf.d/ocsinventory-server.conf)
    1.55 +EOT
    1.56 +		mv $fs/etc/apache/conf.d/ocsinventory-server.tmp \
    1.57 +			$fs/etc/apache/conf.d/ocsinventory-server
    1.58 +		[ -f $fs/etc/apache/conf.d/ocsinventory-server.conf ] && \
    1.59 +			rm -f $fs/etc/apache/conf.d/ocsinventory-server.conf
    1.60 +	fi
    1.61 +}
    1.62 +
    1.63 +post_install()
    1.64 +{
    1.65 +	if [ -z $1 ]; then
    1.66 +		echo "Now you can connect to http://$(hostname)/ocsreports"
    1.67 +		# Restart Apache if is running
    1.68 +		[ -f /var/run/apache/httpd.pid ] && /etc/init.d/apache reload
    1.69 +	fi
    1.70 +}
    1.71 +
    1.72 +