wok-current view ocsinventory-agent/receipt @ rev 8385

Up: ocsinventory-agent (1.1.2.1)
author Eric Joseph-Alexandre <erjo@slitaz.org>
date Fri Feb 04 17:07:42 2011 +0100 (2011-02-04)
parents d52175c64f51
children 0b4cf0d9e1b5
line source
1 # SliTaz package receipt.
3 PACKAGE="ocsinventory-agent"
4 VERSION="1.1.2.1"
5 CATEGORY="network"
6 SHORT_DESC="OCS Inventory NG agent for Linux."
7 MAINTAINER="erjo@slitaz.org"
8 SOURCE="Ocsinventory-Agent"
9 TARBALL="$SOURCE-$VERSION.tar.gz"
10 DEPENDS="perl perl-lwp-useragent perl-uri dmidecode"
11 SUGGESTED="nmap perl-net-ssleay"
12 BUILD_DEPENDS="perl"
13 WEB_SITE="http://www.ocsinventory-ng.org/"
14 WGET_URL="http://launchpad.net/ocsinventory-unix-agent/stable-1.1.2/ocsinventory-unix-agent-1.1.2.1/+download/$TARBALL"
16 # Rules to configure and make the package.
17 compile_rules()
18 {
19 src=$WOK/$PACKAGE/Ocsinventory-Agent-${VERSION}
21 cp stuff/Slitaz.pm $src/lib/Ocsinventory/Agent/Backend/OS/Linux/Distro/NonLSB
22 cp stuff/Tazpkg.pm $src/lib/Ocsinventory/Agent/Backend/OS/Generic/Packaging
24 cd $src
26 # don't run postinstall script
27 rm -f run-postinst
28 for p in ../stuff/ocsinventory-agent-1.1.2.1.u
29 do
30 [ -f done.$(basename $p) ] && continue
31 patch -p1 -i $p || exit
32 touch done.$(basename $p)
33 done
34 perl Makefile.PL
35 rm -f run-postinst
36 make && make DESTDIR=$PWD/_pkg install
37 }
39 # Rules to gen a SliTaz package suitable for Tazpkg.
40 genpkg_rules()
41 {
42 _pkg=$WOK/$PACKAGE/Ocsinventory-Agent-${VERSION}/_pkg
44 mkdir -p $fs/usr \
45 $fs/etc/ocsinventory-agent \
46 $fs/var/lib/ocsinventory-agent
48 cp -a $_pkg/usr/bin $fs/usr
49 cp -a $_pkg/usr/lib $fs/usr
50 }
52 post_install(){
53 echo "Processing post-install commands..."
54 cat > $1/etc/ocsinventory-agent/ocsinventory-agent.cfg <<EOT
55 basevardir=/var/lib/ocsinventory-agent
56 server=http://$(hostname)/ocsinventory
57 EOT
58 # We need fix missing status for dpkg
59 # So we can Ocs agent can run Tazpkg.pm
60 if [ ! -d $1/var/lib/dpkg ]; then
61 install -o root -g root -m 0755 -d $1/var/lib/dpkg
62 touch $1/var/lib/dpkg/status
63 fi
64 }
66 clean_wok()
67 {
68 [ -d Ocsinventory-Agent-${VERSION} ] && rm -rf Ocsinventory-Agent-${VERSION}
69 }