wok diff ocsinventory-agent/receipt @ rev 3973

merge
author Christophe Lincoln <pankso@slitaz.org>
date Thu Aug 27 11:36:57 2009 +0200 (2009-08-27)
parents 76e84daf36d7
children d52175c64f51
line diff
     1.1 --- a/ocsinventory-agent/receipt	Sat Jul 11 12:17:46 2009 +0200
     1.2 +++ b/ocsinventory-agent/receipt	Thu Aug 27 11:36:57 2009 +0200
     1.3 @@ -8,7 +8,7 @@
     1.4  SOURCE="OCSNG_UNIX_AGENT"
     1.5  TARBALL="$SOURCE-$VERSION.tar.gz"
     1.6  DEPENDS="perl perl-lwp-useragent perl-uri-url dmidecode"
     1.7 -SUGGESTED="nmap perl-ssleay"
     1.8 +SUGGESTED="nmap perl-net-ssleay"
     1.9  BUILD_DEPENDS="perl"
    1.10  WEB_SITE="http://www.ocsinventory-ng.org/"
    1.11  WGET_URL="http://downloads.sourceforge.net/sourceforge/ocsinventory/$TARBALL"
    1.12 @@ -16,19 +16,24 @@
    1.13  # Rules to configure and make the package.
    1.14  compile_rules()
    1.15  {
    1.16 -	  
    1.17  	src=$WOK/$PACKAGE/Ocsinventory-Agent-1.0.1
    1.18  
    1.19  	cp stuff/Slitaz.pm $src/lib/Ocsinventory/Agent/Backend/OS/Linux/Distro/NonLSB
    1.20 +	cp stuff/Tazpkg.pm $src/lib/Ocsinventory/Agent/Backend/OS/Generic/Packaging
    1.21 +	
    1.22  	cd $src
    1.23  	
    1.24  	# don't run postinstall script
    1.25  	rm -f run-postinst
    1.26 -	patch -p1 -i ../stuff/manifest.u || exit
    1.27 +	for p in ../stuff/*.u
    1.28 +	do
    1.29 +		[ -f done.$(basename $p) ] && continue
    1.30 +		patch -p1 -i $p || exit
    1.31 +		touch done.$(basename $p)
    1.32 +	done
    1.33  	perl Makefile.PL 
    1.34  	rm -f run-postinst
    1.35 -	 make && \
    1.36 -	 make DESTDIR=$PWD/_pkg install
    1.37 +	make && make DESTDIR=$PWD/_pkg install
    1.38  }
    1.39  
    1.40  # Rules to gen a SliTaz package suitable for Tazpkg.
    1.41 @@ -45,11 +50,17 @@
    1.42  }
    1.43  
    1.44  post_install(){
    1.45 -	echo "postinstall commands"
    1.46 +	echo "Processing post-install commands..."
    1.47  	cat > $1/etc/ocsinventory-agent/ocsinventory-agent.cfg <<EOT
    1.48  basevardir=/var/lib/ocsinventory-agent
    1.49  server=http://$(hostname)/ocsinventory
    1.50  EOT
    1.51 +	# We need fix missing status for dpkg
    1.52 +	# So we can Ocs agent can run Tazpkg.pm
    1.53 +	if [ ! -d $1/var/lib/dpkg ]; then
    1.54 +		install -o root -g root -m 0755 -d $1/var/lib/dpkg
    1.55 +		touch $1/var/lib/dpkg/status
    1.56 +	fi
    1.57  }	
    1.58  
    1.59  clean_wok()