wok-next view ocsinventory-agent/receipt @ rev 21020
Cleaning is almost finished... I should proceed to upgrades.
author | Aleksej Bobylev <al.bobylev@gmail.com> |
---|---|
date | Fri Nov 02 14:15:08 2018 +0200 (2018-11-02) |
parents | 04db1a3c3590 |
children |
line source
1 # SliTaz package receipt v2.
3 PACKAGE="ocsinventory-agent"
4 VERSION="2.0.4"
5 CATEGORY="network"
6 SHORT_DESC="OCS Inventory NG agent for Linux"
7 MAINTAINER="devel@slitaz.org"
8 LICENSE="GPL2"
9 WEB_SITE="https://www.ocsinventory-ng.org/en/"
11 SOURCE="Ocsinventory-Unix-Agent"
12 TARBALL="$SOURCE-$VERSION.tar.gz"
13 WGET_URL="https://launchpad.net/ocsinventory-unix-agent/stable-${VERSION%.*}/$VERSION/+download/$TARBALL"
15 BUILD_DEPENDS="perl-libwww-perl perl-xml-simple"
17 compile_rules() {
18 cp $stuff/Slitaz.pm $src/lib/Ocsinventory/Agent/Backend/OS/Linux/Distro/NonLSB
19 cp $stuff/Tazpkg.pm $src/lib/Ocsinventory/Agent/Backend/OS/Generic/Packaging
21 # don't run postinstall script
22 rm -f run-postinst
23 PERL_USE_UNSAFE_INC=1 perl Makefile.PL INSTALLDIRS=vendor || return 1
24 rm -f run-postinst
25 make &&
26 make DESTDIR=$install install || return 1
28 mkdir -p \
29 $install/etc/ocsinventory-agent \
30 $install/var/lib/ocsinventory-agent
32 chmod -R u+w $install
33 }
35 genpkg_rules() {
36 copy @std
37 DEPENDS="perl perl-libwww-perl perl-uri dmidecode"
38 SUGGESTED="nmap perl-crypt-ssleay perl-net-ssleay perl-net-ip"
39 }
41 post_install() {
42 cat > "$1/etc/ocsinventory-agent/ocsinventory-agent.cfg" <<EOT
43 basevardir=/var/lib/ocsinventory-agent
44 server=http://localhost/ocsinventory
45 EOT
46 # We need fix missing status for dpkg
47 # So we can Ocs agent can run Tazpkg.pm
48 if [ ! -d "$1/var/lib/dpkg" ]; then
49 install -o root -g root -m 0755 -d "$1/var/lib/dpkg"
50 touch "$1/var/lib/dpkg/status"
51 fi
52 }