wok annotate ocsinventory-agent/receipt @ rev 17912
Add python-unidecode & python-unicodecsv
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Wed Apr 08 15:29:10 2015 +0200 (2015-04-08) |
parents | 600aaedb561d |
children | 9e01bc6321ea |
rev | line source |
---|---|
erjo@3675 | 1 # SliTaz package receipt. |
erjo@3675 | 2 |
erjo@3675 | 3 PACKAGE="ocsinventory-agent" |
erjo@12233 | 4 VERSION="2.0.4" |
erjo@3675 | 5 CATEGORY="network" |
erjo@3675 | 6 SHORT_DESC="OCS Inventory NG agent for Linux." |
erjo@3675 | 7 MAINTAINER="erjo@slitaz.org" |
pascal@15590 | 8 LICENSE="GPL2" |
erjo@12233 | 9 SOURCE="Ocsinventory-Unix-Agent" |
erjo@3675 | 10 TARBALL="$SOURCE-$VERSION.tar.gz" |
erjo@3679 | 11 SUGGESTED="nmap perl-net-ssleay" |
erjo@3675 | 12 WEB_SITE="http://www.ocsinventory-ng.org/" |
pascal@17869 | 13 WGET_URL="https://launchpad.net/ocsinventory-unix-agent/stable-${VERSION%.*}/$VERSION/+download/$TARBALL" |
erjo@3675 | 14 |
pascal@15590 | 15 DEPENDS="perl perl-libwww perl-uri dmidecode" |
pascal@15590 | 16 BUILD_DEPENDS="perl wget" |
pascal@15590 | 17 |
erjo@3675 | 18 # Rules to configure and make the package. |
erjo@3675 | 19 compile_rules() |
erjo@3675 | 20 { |
slaxemulator@8751 | 21 cp $stuff/Slitaz.pm $src/lib/Ocsinventory/Agent/Backend/OS/Linux/Distro/NonLSB |
slaxemulator@8751 | 22 cp $stuff/Tazpkg.pm $src/lib/Ocsinventory/Agent/Backend/OS/Generic/Packaging |
erjo@3679 | 23 |
erjo@3675 | 24 cd $src |
erjo@3675 | 25 |
erjo@3675 | 26 # don't run postinstall script |
erjo@3675 | 27 rm -f run-postinst |
slaxemulator@8751 | 28 for p in $stuff/ocsinventory-agent-1.1.2.1.u |
erjo@3679 | 29 do |
erjo@3679 | 30 [ -f done.$(basename $p) ] && continue |
gokhlayeh@8615 | 31 patch -p1 -i $p || return 1 |
erjo@3679 | 32 touch done.$(basename $p) |
erjo@3679 | 33 done |
erjo@3675 | 34 perl Makefile.PL |
erjo@3675 | 35 rm -f run-postinst |
pascal@15590 | 36 make && make DESTDIR=$DESTDIR install |
erjo@3675 | 37 } |
erjo@3675 | 38 |
erjo@3675 | 39 # Rules to gen a SliTaz package suitable for Tazpkg. |
erjo@3675 | 40 genpkg_rules() |
erjo@3675 | 41 { |
erjo@3675 | 42 mkdir -p $fs/usr \ |
erjo@3675 | 43 $fs/etc/ocsinventory-agent \ |
erjo@3675 | 44 $fs/var/lib/ocsinventory-agent |
erjo@3675 | 45 |
pascal@15590 | 46 cp -a $install/usr/bin $fs/usr |
pascal@15590 | 47 cp -a $install/usr/lib $fs/usr |
erjo@3675 | 48 } |
erjo@3675 | 49 |
erjo@3675 | 50 post_install(){ |
erjo@3679 | 51 echo "Processing post-install commands..." |
erjo@3675 | 52 cat > $1/etc/ocsinventory-agent/ocsinventory-agent.cfg <<EOT |
erjo@3675 | 53 basevardir=/var/lib/ocsinventory-agent |
erjo@12278 | 54 server=http://localhost/ocsinventory |
erjo@3675 | 55 EOT |
erjo@3679 | 56 # We need fix missing status for dpkg |
erjo@3679 | 57 # So we can Ocs agent can run Tazpkg.pm |
erjo@3679 | 58 if [ ! -d $1/var/lib/dpkg ]; then |
erjo@3679 | 59 install -o root -g root -m 0755 -d $1/var/lib/dpkg |
erjo@3679 | 60 touch $1/var/lib/dpkg/status |
erjo@3679 | 61 fi |
erjo@3675 | 62 } |
erjo@3675 | 63 |