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

Add ocsinventory-agent
author Eric Joseph-Alexandre <erjo@slitaz.org>
date Sat Jul 11 12:17:46 2009 +0200 (2009-07-11)
parents
children db6394fb176f
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@3675 10 DEPENDS="perl perl-lwp-useragent perl-uri-url dmidecode"
erjo@3675 11 SUGGESTED="nmap perl-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
erjo@3675 20 src=$WOK/$PACKAGE/Ocsinventory-Agent-1.0.1
erjo@3675 21
erjo@3675 22 cp stuff/Slitaz.pm $src/lib/Ocsinventory/Agent/Backend/OS/Linux/Distro/NonLSB
erjo@3675 23 cd $src
erjo@3675 24
erjo@3675 25 # don't run postinstall script
erjo@3675 26 rm -f run-postinst
erjo@3675 27 patch -p1 -i ../stuff/manifest.u || exit
erjo@3675 28 perl Makefile.PL
erjo@3675 29 rm -f run-postinst
erjo@3675 30 make && \
erjo@3675 31 make DESTDIR=$PWD/_pkg install
erjo@3675 32 }
erjo@3675 33
erjo@3675 34 # Rules to gen a SliTaz package suitable for Tazpkg.
erjo@3675 35 genpkg_rules()
erjo@3675 36 {
erjo@3675 37 _pkg=$WOK/$PACKAGE/Ocsinventory-Agent-1.0.1/_pkg
erjo@3675 38
erjo@3675 39 mkdir -p $fs/usr \
erjo@3675 40 $fs/etc/ocsinventory-agent \
erjo@3675 41 $fs/var/lib/ocsinventory-agent
erjo@3675 42
erjo@3675 43 cp -a $_pkg/usr/bin $fs/usr
erjo@3675 44 cp -a $_pkg/usr/lib $fs/usr
erjo@3675 45 }
erjo@3675 46
erjo@3675 47 post_install(){
erjo@3675 48 echo "postinstall commands"
erjo@3675 49 cat > $1/etc/ocsinventory-agent/ocsinventory-agent.cfg <<EOT
erjo@3675 50 basevardir=/var/lib/ocsinventory-agent
erjo@3675 51 server=http://$(hostname)/ocsinventory
erjo@3675 52 EOT
erjo@3675 53 }
erjo@3675 54
erjo@3675 55 clean_wok()
erjo@3675 56 {
erjo@3675 57 [ -d Ocsinventory-Agent-1.0.1 ] && rm -rf Ocsinventory-Agent-1.0.1
erjo@3675 58 }
erjo@3675 59