wok-next annotate ocsinventory-agent/receipt @ rev 20678

Up clisp (2.50)
author Aleksej Bobylev <al.bobylev@gmail.com>
date Tue May 15 02:59:03 2018 +0300 (2018-05-15)
parents ded7bc956f55
children 04db1a3c3590
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
al@19708 15 DEPENDS="perl perl-libwww-perl 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
al@18741 23
erjo@3675 24 # don't run postinstall script
erjo@3675 25 rm -f run-postinst
al@18741 26 perl Makefile.PL
erjo@3675 27 rm -f run-postinst
pascal@15590 28 make && make DESTDIR=$DESTDIR install
erjo@3675 29 }
erjo@3675 30
erjo@3675 31 # Rules to gen a SliTaz package suitable for Tazpkg.
erjo@3675 32 genpkg_rules()
erjo@3675 33 {
erjo@3675 34 mkdir -p $fs/usr \
erjo@3675 35 $fs/etc/ocsinventory-agent \
erjo@3675 36 $fs/var/lib/ocsinventory-agent
al@18741 37
pascal@15590 38 cp -a $install/usr/bin $fs/usr
pascal@15590 39 cp -a $install/usr/lib $fs/usr
erjo@3675 40 }
erjo@3675 41
erjo@3675 42 post_install(){
pascal@18730 43 cat > "$1/etc/ocsinventory-agent/ocsinventory-agent.cfg" <<EOT
erjo@3675 44 basevardir=/var/lib/ocsinventory-agent
erjo@12278 45 server=http://localhost/ocsinventory
erjo@3675 46 EOT
erjo@3679 47 # We need fix missing status for dpkg
erjo@3679 48 # So we can Ocs agent can run Tazpkg.pm
pascal@18730 49 if [ ! -d "$1/var/lib/dpkg" ]; then
pascal@18730 50 install -o root -g root -m 0755 -d "$1/var/lib/dpkg"
pascal@18730 51 touch "$1/var/lib/dpkg/status"
erjo@3679 52 fi
erjo@3675 53 }