wok view 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
line source
1 # SliTaz package receipt.
3 PACKAGE="ocsinventory-agent"
4 VERSION="1.02"
5 CATEGORY="network"
6 SHORT_DESC="OCS Inventory NG agent for Linux."
7 MAINTAINER="erjo@slitaz.org"
8 SOURCE="OCSNG_UNIX_AGENT"
9 TARBALL="$SOURCE-$VERSION.tar.gz"
10 DEPENDS="perl perl-lwp-useragent perl-uri-url dmidecode"
11 SUGGESTED="nmap perl-ssleay"
12 BUILD_DEPENDS="perl"
13 WEB_SITE="http://www.ocsinventory-ng.org/"
14 WGET_URL="http://downloads.sourceforge.net/sourceforge/ocsinventory/$TARBALL"
16 # Rules to configure and make the package.
17 compile_rules()
18 {
20 src=$WOK/$PACKAGE/Ocsinventory-Agent-1.0.1
22 cp stuff/Slitaz.pm $src/lib/Ocsinventory/Agent/Backend/OS/Linux/Distro/NonLSB
23 cd $src
25 # don't run postinstall script
26 rm -f run-postinst
27 patch -p1 -i ../stuff/manifest.u || exit
28 perl Makefile.PL
29 rm -f run-postinst
30 make && \
31 make DESTDIR=$PWD/_pkg install
32 }
34 # Rules to gen a SliTaz package suitable for Tazpkg.
35 genpkg_rules()
36 {
37 _pkg=$WOK/$PACKAGE/Ocsinventory-Agent-1.0.1/_pkg
39 mkdir -p $fs/usr \
40 $fs/etc/ocsinventory-agent \
41 $fs/var/lib/ocsinventory-agent
43 cp -a $_pkg/usr/bin $fs/usr
44 cp -a $_pkg/usr/lib $fs/usr
45 }
47 post_install(){
48 echo "postinstall commands"
49 cat > $1/etc/ocsinventory-agent/ocsinventory-agent.cfg <<EOT
50 basevardir=/var/lib/ocsinventory-agent
51 server=http://$(hostname)/ocsinventory
52 EOT
53 }
55 clean_wok()
56 {
57 [ -d Ocsinventory-Agent-1.0.1 ] && rm -rf Ocsinventory-Agent-1.0.1
58 }