# SliTaz package receipt. PACKAGE="ocsinventory-agent" VERSION="2.0.4" CATEGORY="network" SHORT_DESC="OCS Inventory NG agent for Linux." MAINTAINER="erjo@slitaz.org" LICENSE="GPL2" SOURCE="Ocsinventory-Unix-Agent" TARBALL="$SOURCE-$VERSION.tar.gz" SUGGESTED="nmap perl-net-ssleay" WEB_SITE="https://www.ocsinventory-ng.org/" WGET_URL="https://launchpad.net/ocsinventory-unix-agent/stable-${VERSION%.*}/$VERSION/+download/$TARBALL" DEPENDS="perl perl-libwww perl-uri dmidecode" BUILD_DEPENDS="perl wget" # What is the latest version available today? current_version() { wget -O - https://launchpad.net/ocsinventory-unix-agent/ 2>/dev/null | \ sed '/Latest version/!d;s|.*is ||' } # Rules to configure and make the package. compile_rules() { cp $stuff/Slitaz.pm $src/lib/Ocsinventory/Agent/Backend/OS/Linux/Distro/NonLSB cp $stuff/Tazpkg.pm $src/lib/Ocsinventory/Agent/Backend/OS/Generic/Packaging # don't run postinstall script rm -f run-postinst for p in $stuff/ocsinventory-agent-1.1.2.1.u do [ -f done.$(basename $p) ] && continue patch -p1 -i $p || return 1 touch done.$(basename $p) done perl Makefile.PL rm -f run-postinst make && make DESTDIR=$DESTDIR install } # Rules to gen a SliTaz package suitable for Tazpkg. genpkg_rules() { mkdir -p $fs/usr \ $fs/etc/ocsinventory-agent \ $fs/var/lib/ocsinventory-agent cp -a $install/usr/bin $fs/usr cp -a $install/usr/lib $fs/usr } post_install(){ cat > "$1/etc/ocsinventory-agent/ocsinventory-agent.cfg" <