wok-stable view ocsinventory-agent/receipt @ rev 7670
Up: xorg-xbacklight to 1.1.2.
author | Christopher Rogers <slaxemulator@gmail.com> |
---|---|
date | Thu Dec 16 16:09:22 2010 +0000 (2010-12-16) |
parents | db6394fb176f |
children | 45884a696424 |
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 dmidecode"
11 SUGGESTED="nmap perl-net-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 {
19 src=$WOK/$PACKAGE/Ocsinventory-Agent-1.0.1
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/*.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-1.0.1/_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-1.0.1 ] && rm -rf Ocsinventory-Agent-1.0.1
69 }