wok annotate ocsinventory-agent/receipt @ rev 25609
Update some current_version
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Thu Jul 20 14:03:05 2023 +0000 (16 months ago) |
parents | c265f9cf4b14 |
children |
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 |
pascal@24476 | 18 # What is the latest version available today? |
pascal@24476 | 19 current_version() |
pascal@24476 | 20 { |
pascal@24476 | 21 wget -O - https://launchpad.net/ocsinventory-unix-agent/ 2>/dev/null | \ |
pascal@24476 | 22 sed '/Latest version/!d;s|.*is ||' |
pascal@24476 | 23 } |
pascal@24476 | 24 |
erjo@3675 | 25 # Rules to configure and make the package. |
erjo@3675 | 26 compile_rules() |
erjo@3675 | 27 { |
slaxemulator@8751 | 28 cp $stuff/Slitaz.pm $src/lib/Ocsinventory/Agent/Backend/OS/Linux/Distro/NonLSB |
slaxemulator@8751 | 29 cp $stuff/Tazpkg.pm $src/lib/Ocsinventory/Agent/Backend/OS/Generic/Packaging |
al@18741 | 30 |
erjo@3675 | 31 # don't run postinstall script |
erjo@3675 | 32 rm -f run-postinst |
slaxemulator@8751 | 33 for p in $stuff/ocsinventory-agent-1.1.2.1.u |
erjo@3679 | 34 do |
erjo@3679 | 35 [ -f done.$(basename $p) ] && continue |
gokhlayeh@8615 | 36 patch -p1 -i $p || return 1 |
erjo@3679 | 37 touch done.$(basename $p) |
erjo@3679 | 38 done |
al@18741 | 39 perl Makefile.PL |
erjo@3675 | 40 rm -f run-postinst |
pascal@15590 | 41 make && make DESTDIR=$DESTDIR install |
erjo@3675 | 42 } |
erjo@3675 | 43 |
erjo@3675 | 44 # Rules to gen a SliTaz package suitable for Tazpkg. |
erjo@3675 | 45 genpkg_rules() |
erjo@3675 | 46 { |
erjo@3675 | 47 mkdir -p $fs/usr \ |
erjo@3675 | 48 $fs/etc/ocsinventory-agent \ |
erjo@3675 | 49 $fs/var/lib/ocsinventory-agent |
al@18741 | 50 |
pascal@15590 | 51 cp -a $install/usr/bin $fs/usr |
pascal@15590 | 52 cp -a $install/usr/lib $fs/usr |
erjo@3675 | 53 } |
erjo@3675 | 54 |
erjo@3675 | 55 post_install(){ |
pascal@18730 | 56 cat > "$1/etc/ocsinventory-agent/ocsinventory-agent.cfg" <<EOT |
erjo@3675 | 57 basevardir=/var/lib/ocsinventory-agent |
erjo@12278 | 58 server=http://localhost/ocsinventory |
erjo@3675 | 59 EOT |
erjo@3679 | 60 # We need fix missing status for dpkg |
erjo@3679 | 61 # So we can Ocs agent can run Tazpkg.pm |
pascal@18730 | 62 if [ ! -d "$1/var/lib/dpkg" ]; then |
pascal@18730 | 63 install -o root -g root -m 0755 -d "$1/var/lib/dpkg" |
pascal@18730 | 64 touch "$1/var/lib/dpkg/status" |
erjo@3679 | 65 fi |
erjo@3675 | 66 } |