wok-current annotate ocsinventory-agent/receipt @ rev 23351

Up slitaz-icons-paper (1.5.0)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Mar 31 10:49:33 2020 +0200 (2020-03-31)
parents 6fab3264ba87
children 89c8d8b6cf48
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"
pascal@23351 12 WEB_SITE="https://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
al@18741 23
erjo@3675 24 # don't run postinstall script
erjo@3675 25 rm -f run-postinst
slaxemulator@8751 26 for p in $stuff/ocsinventory-agent-1.1.2.1.u
erjo@3679 27 do
erjo@3679 28 [ -f done.$(basename $p) ] && continue
gokhlayeh@8615 29 patch -p1 -i $p || return 1
erjo@3679 30 touch done.$(basename $p)
erjo@3679 31 done
al@18741 32 perl Makefile.PL
erjo@3675 33 rm -f run-postinst
pascal@15590 34 make && make DESTDIR=$DESTDIR install
erjo@3675 35 }
erjo@3675 36
erjo@3675 37 # Rules to gen a SliTaz package suitable for Tazpkg.
erjo@3675 38 genpkg_rules()
erjo@3675 39 {
erjo@3675 40 mkdir -p $fs/usr \
erjo@3675 41 $fs/etc/ocsinventory-agent \
erjo@3675 42 $fs/var/lib/ocsinventory-agent
al@18741 43
pascal@15590 44 cp -a $install/usr/bin $fs/usr
pascal@15590 45 cp -a $install/usr/lib $fs/usr
erjo@3675 46 }
erjo@3675 47
erjo@3675 48 post_install(){
pascal@18730 49 cat > "$1/etc/ocsinventory-agent/ocsinventory-agent.cfg" <<EOT
erjo@3675 50 basevardir=/var/lib/ocsinventory-agent
erjo@12278 51 server=http://localhost/ocsinventory
erjo@3675 52 EOT
erjo@3679 53 # We need fix missing status for dpkg
erjo@3679 54 # So we can Ocs agent can run Tazpkg.pm
pascal@18730 55 if [ ! -d "$1/var/lib/dpkg" ]; then
pascal@18730 56 install -o root -g root -m 0755 -d "$1/var/lib/dpkg"
pascal@18730 57 touch "$1/var/lib/dpkg/status"
erjo@3679 58 fi
erjo@3675 59 }