wok-4.x annotate ocsinventory-agent/receipt @ rev 7086

Change goocanvas TARBALL source to .tar.bz2.
author Christopher Rogers <slaxemulator@gmail.com>
date Wed Nov 03 00:43:40 2010 +0000 (2010-11-03)
parents db6394fb176f
children 45884a696424
rev   line source
erjo@3675 1 # SliTaz package receipt.
erjo@3675 2
erjo@3675 3 PACKAGE="ocsinventory-agent"
erjo@3675 4 VERSION="1.02"
erjo@3675 5 CATEGORY="network"
erjo@3675 6 SHORT_DESC="OCS Inventory NG agent for Linux."
erjo@3675 7 MAINTAINER="erjo@slitaz.org"
erjo@3675 8 SOURCE="OCSNG_UNIX_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@3675 14 WGET_URL="http://downloads.sourceforge.net/sourceforge/ocsinventory/$TARBALL"
erjo@3675 15
erjo@3675 16 # Rules to configure and make the package.
erjo@3675 17 compile_rules()
erjo@3675 18 {
erjo@3675 19 src=$WOK/$PACKAGE/Ocsinventory-Agent-1.0.1
erjo@3675 20
erjo@3675 21 cp stuff/Slitaz.pm $src/lib/Ocsinventory/Agent/Backend/OS/Linux/Distro/NonLSB
erjo@3679 22 cp stuff/Tazpkg.pm $src/lib/Ocsinventory/Agent/Backend/OS/Generic/Packaging
erjo@3679 23
erjo@3675 24 cd $src
erjo@3675 25
erjo@3675 26 # don't run postinstall script
erjo@3675 27 rm -f run-postinst
erjo@3679 28 for p in ../stuff/*.u
erjo@3679 29 do
erjo@3679 30 [ -f done.$(basename $p) ] && continue
erjo@3679 31 patch -p1 -i $p || exit
erjo@3679 32 touch done.$(basename $p)
erjo@3679 33 done
erjo@3675 34 perl Makefile.PL
erjo@3675 35 rm -f run-postinst
erjo@3679 36 make && make DESTDIR=$PWD/_pkg install
erjo@3675 37 }
erjo@3675 38
erjo@3675 39 # Rules to gen a SliTaz package suitable for Tazpkg.
erjo@3675 40 genpkg_rules()
erjo@3675 41 {
erjo@3675 42 _pkg=$WOK/$PACKAGE/Ocsinventory-Agent-1.0.1/_pkg
erjo@3675 43
erjo@3675 44 mkdir -p $fs/usr \
erjo@3675 45 $fs/etc/ocsinventory-agent \
erjo@3675 46 $fs/var/lib/ocsinventory-agent
erjo@3675 47
erjo@3675 48 cp -a $_pkg/usr/bin $fs/usr
erjo@3675 49 cp -a $_pkg/usr/lib $fs/usr
erjo@3675 50 }
erjo@3675 51
erjo@3675 52 post_install(){
erjo@3679 53 echo "Processing post-install commands..."
erjo@3675 54 cat > $1/etc/ocsinventory-agent/ocsinventory-agent.cfg <<EOT
erjo@3675 55 basevardir=/var/lib/ocsinventory-agent
erjo@3675 56 server=http://$(hostname)/ocsinventory
erjo@3675 57 EOT
erjo@3679 58 # We need fix missing status for dpkg
erjo@3679 59 # So we can Ocs agent can run Tazpkg.pm
erjo@3679 60 if [ ! -d $1/var/lib/dpkg ]; then
erjo@3679 61 install -o root -g root -m 0755 -d $1/var/lib/dpkg
erjo@3679 62 touch $1/var/lib/dpkg/status
erjo@3679 63 fi
erjo@3675 64 }
erjo@3675 65
erjo@3675 66 clean_wok()
erjo@3675 67 {
erjo@3675 68 [ -d Ocsinventory-Agent-1.0.1 ] && rm -rf Ocsinventory-Agent-1.0.1
erjo@3675 69 }
erjo@3675 70