wok-6.x annotate ocsinventory-agent/receipt @ rev 8751

Removed all/most _pkg= lines in wok. The new tazwok-experimental can SOURCE paths and source are are all extracted to WOK/PACKAGE/PACKAGE-VERSION now with tazwok-experimental.
author Christopher Rogers <slaxemulator@gmail.com>
date Sun Feb 20 06:53:59 2011 +0000 (2011-02-20)
parents 0b4cf0d9e1b5
children fe7e875f7d99
rev   line source
erjo@3675 1 # SliTaz package receipt.
erjo@3675 2
erjo@3675 3 PACKAGE="ocsinventory-agent"
erjo@8385 4 VERSION="1.1.2.1"
erjo@3675 5 CATEGORY="network"
erjo@3675 6 SHORT_DESC="OCS Inventory NG agent for Linux."
erjo@3675 7 MAINTAINER="erjo@slitaz.org"
erjo@8385 8 SOURCE="Ocsinventory-Agent"
erjo@3675 9 TARBALL="$SOURCE-$VERSION.tar.gz"
erjo@4842 10 DEPENDS="perl perl-lwp-useragent perl-uri dmidecode"
erjo@3679 11 SUGGESTED="nmap perl-net-ssleay"
erjo@3675 12 BUILD_DEPENDS="perl"
erjo@3675 13 WEB_SITE="http://www.ocsinventory-ng.org/"
erjo@8385 14 WGET_URL="http://launchpad.net/ocsinventory-unix-agent/stable-1.1.2/ocsinventory-unix-agent-1.1.2.1/+download/$TARBALL"
erjo@3675 15
erjo@3675 16 # Rules to configure and make the package.
erjo@3675 17 compile_rules()
erjo@3675 18 {
slaxemulator@8751 19 cp $stuff/Slitaz.pm $src/lib/Ocsinventory/Agent/Backend/OS/Linux/Distro/NonLSB
slaxemulator@8751 20 cp $stuff/Tazpkg.pm $src/lib/Ocsinventory/Agent/Backend/OS/Generic/Packaging
erjo@3679 21
erjo@3675 22 cd $src
erjo@3675 23
erjo@3675 24 # don't run postinstall script
erjo@3675 25 rm -f run-postinst
slaxemulator@8751 26 for p in $stuff/ocsinventory-agent-1.1.2.1.u
erjo@3679 27 do
erjo@3679 28 [ -f done.$(basename $p) ] && continue
gokhlayeh@8615 29 patch -p1 -i $p || return 1
erjo@3679 30 touch done.$(basename $p)
erjo@3679 31 done
erjo@3675 32 perl Makefile.PL
erjo@3675 33 rm -f run-postinst
erjo@3679 34 make && make DESTDIR=$PWD/_pkg install
erjo@3675 35 }
erjo@3675 36
erjo@3675 37 # Rules to gen a SliTaz package suitable for Tazpkg.
erjo@3675 38 genpkg_rules()
erjo@3675 39 {
erjo@3675 40 mkdir -p $fs/usr \
erjo@3675 41 $fs/etc/ocsinventory-agent \
erjo@3675 42 $fs/var/lib/ocsinventory-agent
erjo@3675 43
erjo@3675 44 cp -a $_pkg/usr/bin $fs/usr
erjo@3675 45 cp -a $_pkg/usr/lib $fs/usr
erjo@3675 46 }
erjo@3675 47
erjo@3675 48 post_install(){
erjo@3679 49 echo "Processing post-install commands..."
erjo@3675 50 cat > $1/etc/ocsinventory-agent/ocsinventory-agent.cfg <<EOT
erjo@3675 51 basevardir=/var/lib/ocsinventory-agent
erjo@3675 52 server=http://$(hostname)/ocsinventory
erjo@3675 53 EOT
erjo@3679 54 # We need fix missing status for dpkg
erjo@3679 55 # So we can Ocs agent can run Tazpkg.pm
erjo@3679 56 if [ ! -d $1/var/lib/dpkg ]; then
erjo@3679 57 install -o root -g root -m 0755 -d $1/var/lib/dpkg
erjo@3679 58 touch $1/var/lib/dpkg/status
erjo@3679 59 fi
erjo@3675 60 }
erjo@3675 61