summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaphaël Doursenaud2015-07-05 17:58:42 +0200
committerRaphaël Doursenaud2015-07-05 17:58:42 +0200
commit3e3a77ab612b448768d86ab2089dd4bcde22ca1a (patch)
tree333c6cd99458e4d02f107f6e6faaa4e6585640b5
downloadaur-3e3a77ab612b448768d86ab2089dd4bcde22ca1a.tar.gz
Initial import
-rw-r--r--.SRCINFO60
-rw-r--r--PKGBUILD136
-rw-r--r--fusioninventory-agent.config2
-rw-r--r--fusioninventory-agent.service10
4 files changed, 208 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..f5fa08c678a
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,60 @@
+pkgbase = fusioninventory-agent
+ pkgdesc = FusionInventory Agent is an application for keeping track of the hardware and software
+ pkgver = 2.3.16
+ pkgrel = 1
+ url = http://fusioninventory.org
+ arch = any
+ license = GPL
+ makedepends = perl-http-proxy
+ makedepends = perl-http-server-simple
+ makedepends = perl-io-socket-ssl
+ makedepends = perl-io-captureoutput
+ makedepends = perl-ipc-run
+ makedepends = perl-test-compile
+ makedepends = perl-test-deep
+ makedepends = perl-test-exception
+ makedepends = perl-test-mockmodule
+ makedepends = perl-test-nowarnings
+ makedepends = perl-lwp-protocol-https
+ makedepends = perl-test-mockobject
+ makedepends = perl-json
+ makedepends = perl-net-snmp
+ makedepends = perl-poe-component-client-ping
+ depends = perl>=5.8
+ depends = perl-file-which
+ depends = perl-libwww>=5.8
+ depends = perl-net-ip
+ depends = perl-text-template
+ depends = perl-universal-require
+ depends = perl-xml-treepp>=0.26
+ optdepends = perl-compress-zlib: message compression
+ optdepends = perl-http-daemon: web interface
+ optdepends = perl-io-socket-ssl>=1.14: HTTPS support
+ optdepends = perl-lwp-protocol-https: HTTPS support
+ optdepends = perl-proc-daemon: daemon mode
+ optdepends = perl-proc-pid-file: daemon mode
+ optdepends = perl-parse-edid: Inventory EDID data parsing
+ optdepends = perl-net-cups-cups16>=0.60: Inventory printers detection
+ optdepends = dmidecode: Inventory DMI data retrieval
+ optdepends = pciutils: Inventory PCI bus scanning (lspci)
+ optdepends = hdparm: Inventory additional disk drive info retrieval
+ optdepends = read-edid: Inventory EDID data access
+ optdepends = openssh: Inventory host SSH public key retrieval (ssh-keyscan)
+ optdepends = perl-archive-extract: Deploy
+ optdepends = perl-file-copy-recursive: Deploy
+ optdepends = perl-json: Deploy
+ optdepends = perl-uri: Deploy
+ optdepends = perl-poe-component-client-ping: Deploy
+ optdepends = perl-net-snmp: Network inventory
+ optdepends = perl-crypt-des: Network inventory SNMPv3 support
+ optdepends = nmap: Network discovery
+ optdepends = perl-net-write: Wake on Lan ethernet method support
+ source = http://forge.fusioninventory.org/attachments/download/1771/FusionInventory-Agent-2.3.16.tar.gz
+ source = fusioninventory-agent.service
+ source = fusioninventory-agent.config
+ md5sums = 89467ae101a89544a6fbade2e7a879fe
+ md5sums = cd0d59b266a41977f51d9e99ecca8cd5
+ md5sums = 7cce12647a737aadcdd79dee4575aff3
+
+pkgname = fusioninventory-agent
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..c09d8e76760
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,136 @@
+# Maintainer : Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
+# Previous Maintainer : kuri <sysegv at gmail dot com>
+# Contributor : Kevin C <kiven at kiven dot fr>
+# Contributor: Alex 'AdUser' Z
+pkgname=fusioninventory-agent
+_pkgname="FusionInventory-Agent"
+pkgver=2.3.16
+_pkgdir=1771
+pkgrel=1
+pkgdesc="FusionInventory Agent is an application for keeping track of the hardware and software"
+arch=(any)
+url="http://fusioninventory.org"
+_watch="https://github.com/fusinv/fusioninventory-agent/releases"
+license=('GPL')
+depends=(
+ 'perl>=5.8'
+ 'perl-file-which'
+ # Provides LWP::UserAgent
+ 'perl-libwww>=5.8'
+ 'perl-net-ip'
+ 'perl-text-template'
+ 'perl-universal-require'
+ 'perl-xml-treepp>=0.26'
+)
+makedepends=(
+ 'perl-http-proxy'
+ 'perl-http-server-simple'
+ # FIXME: not in AUR
+ # 'perl-http-server-simple-authen'
+ 'perl-io-socket-ssl'
+ # Provides IO::Capture::Stderr
+ 'perl-io-captureoutput'
+ 'perl-ipc-run'
+ 'perl-test-compile'
+ 'perl-test-deep'
+ 'perl-test-exception'
+ 'perl-test-mockmodule'
+ # FIXME: not in AUR
+ # 'perl-test-more>=0.93'
+ 'perl-test-nowarnings'
+ 'perl-lwp-protocol-https'
+ 'perl-test-mockobject'
+ 'perl-json'
+ 'perl-net-snmp'
+# Deploy
+ # FIXME: not in AUR
+ # 'perl-test-http-server-simple'
+ 'perl-poe-component-client-ping'
+)
+
+optdepends=(
+# Global
+ 'perl-compress-zlib: message compression'
+ 'perl-http-daemon: web interface'
+ 'perl-io-socket-ssl>=1.14: HTTPS support'
+ 'perl-lwp-protocol-https: HTTPS support'
+ 'perl-proc-daemon: daemon mode'
+ 'perl-proc-pid-file: daemon mode'
+
+# Inventory
+ 'perl-parse-edid: Inventory EDID data parsing'
+ # Doesn't build ATM
+ # 'perl-net-cups>=0.60: Inventory printers detection'
+ # let's use patched version
+ 'perl-net-cups-cups16>=0.60: Inventory printers detection'
+ 'dmidecode: Inventory DMI data retrieval'
+ # Provides lspci
+ 'pciutils: Inventory PCI bus scanning (lspci)'
+ 'hdparm: Inventory additional disk drive info retrieval'
+ 'read-edid: Inventory EDID data access'
+ # Provides ssh-keyscan
+ 'openssh: Inventory host SSH public key retrieval (ssh-keyscan)'
+
+# Deploy
+ 'perl-archive-extract: Deploy'
+ # Provided by Perl
+ # 'perl-digest-sha: Deploy'
+ 'perl-file-copy-recursive: Deploy'
+ 'perl-json: Deploy'
+ # Provided by perl-uri
+ # 'perl-uri-escape: Deploy'
+ 'perl-uri: Deploy'
+ 'perl-poe-component-client-ping: Deploy'
+
+# Network
+ 'perl-net-snmp: Network inventory'
+ # FIXME: not in AUR
+ # 'perl-net-nbname:Network'
+ # provided by perl
+ # 'perl-thread-queue>=2.0.1'
+ 'perl-crypt-des: Network inventory SNMPv3 support'
+ 'nmap: Network discovery'
+
+# Wake-On-Lan
+ # provided by perl-net-write
+ # 'perl-net-write-layer2: Wake on Lan'
+ 'perl-net-write: Wake on Lan ethernet method support'
+)
+source=("http://forge.fusioninventory.org/attachments/download/$_pkgdir/$_pkgname-$pkgver.tar.gz"
+ 'fusioninventory-agent.service'
+ 'fusioninventory-agent.config')
+md5sums=('89467ae101a89544a6fbade2e7a879fe'
+ 'cd0d59b266a41977f51d9e99ecca8cd5'
+ '7cce12647a737aadcdd79dee4575aff3')
+
+build() {
+ cd "$srcdir/$_pkgname-$pkgver"
+
+ perl Makefile.PL \
+ PREFIX="/usr" \
+ SYSCONFDIR="/etc/fusioninventory" \
+ LOCALSTATEDIR="/var/lib/fusioninventory-agent"
+
+ make
+}
+
+# FIXME :
+# needs at least HTTP::Server::Simple:Authen
+# and certainly Test::More and Test::HTTP::Server::Simple
+#check() {
+# cd "$srcdir/$_pkgname-$pkgver"
+#
+# make test
+#}
+
+package() {
+ cd "$srcdir/$_pkgname-$pkgver"
+ make install DESTDIR="$pkgdir/"
+ install -D -m644 ${srcdir}/fusioninventory-agent.service \
+ ${pkgdir}/usr/lib/systemd/system/fusioninventory-agent.service
+ mv ${pkgdir}/etc/fusioninventory/agent.cfg \
+ ${pkgdir}/etc/fusioninventory/agent.cfg.default
+ install -D -m644 ${srcdir}/fusioninventory-agent.config \
+ ${pkgdir}/etc/conf.d/fusioninventory-agent
+ mkdir -p "$pkgdir/var/lib/fusioninventory-agent"
+}
diff --git a/fusioninventory-agent.config b/fusioninventory-agent.config
new file mode 100644
index 00000000000..c5eaa8fe2aa
--- /dev/null
+++ b/fusioninventory-agent.config
@@ -0,0 +1,2 @@
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+FUSINVOPT="--daemon -no-fork"
diff --git a/fusioninventory-agent.service b/fusioninventory-agent.service
new file mode 100644
index 00000000000..20e54c27ae7
--- /dev/null
+++ b/fusioninventory-agent.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=FusionInventory Agent
+After=network.service
+
+[Service]
+EnvironmentFile=/etc/conf.d/fusioninventory-agent
+ExecStart=/usr/bin/fusioninventory-agent $FUSINVOPT
+
+[Install]
+WantedBy=multi-user.target