wok-6.x view ocsinventory-agent/receipt @ rev 18246
Up slitaz-boot-scripts (405)
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Sat Aug 01 11:06:51 2015 +0200 (2015-08-01) |
parents | 600aaedb561d |
children | 9e01bc6321ea |
line source
1 # SliTaz package receipt.
3 PACKAGE="ocsinventory-agent"
4 VERSION="2.0.4"
5 CATEGORY="network"
6 SHORT_DESC="OCS Inventory NG agent for Linux."
7 MAINTAINER="erjo@slitaz.org"
8 LICENSE="GPL2"
9 SOURCE="Ocsinventory-Unix-Agent"
10 TARBALL="$SOURCE-$VERSION.tar.gz"
11 SUGGESTED="nmap perl-net-ssleay"
12 WEB_SITE="http://www.ocsinventory-ng.org/"
13 WGET_URL="https://launchpad.net/ocsinventory-unix-agent/stable-${VERSION%.*}/$VERSION/+download/$TARBALL"
15 DEPENDS="perl perl-libwww perl-uri dmidecode"
16 BUILD_DEPENDS="perl wget"
18 # Rules to configure and make the package.
19 compile_rules()
20 {
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 || return 1
32 touch done.$(basename $p)
33 done
34 perl Makefile.PL
35 rm -f run-postinst
36 make && make DESTDIR=$DESTDIR install
37 }
39 # Rules to gen a SliTaz package suitable for Tazpkg.
40 genpkg_rules()
41 {
42 mkdir -p $fs/usr \
43 $fs/etc/ocsinventory-agent \
44 $fs/var/lib/ocsinventory-agent
46 cp -a $install/usr/bin $fs/usr
47 cp -a $install/usr/lib $fs/usr
48 }
50 post_install(){
51 echo "Processing post-install commands..."
52 cat > $1/etc/ocsinventory-agent/ocsinventory-agent.cfg <<EOT
53 basevardir=/var/lib/ocsinventory-agent
54 server=http://localhost/ocsinventory
55 EOT
56 # We need fix missing status for dpkg
57 # So we can Ocs agent can run Tazpkg.pm
58 if [ ! -d $1/var/lib/dpkg ]; then
59 install -o root -g root -m 0755 -d $1/var/lib/dpkg
60 touch $1/var/lib/dpkg/status
61 fi
62 }