add app-metrics/glpi-agent

new file:   app-metrics/glpi-agent/Manifest
	new file:   app-metrics/glpi-agent/files/glpi-agent-1.4-dirs.patch
	new file:   app-metrics/glpi-agent/files/glpi-agent.confd
	new file:   app-metrics/glpi-agent/files/glpi-agent.initd
	new file:   app-metrics/glpi-agent/glpi-agent-1.4.ebuild
This commit is contained in:
2022-08-16 06:35:55 +02:00
parent 922d8e7447
commit f0ca9f9b6a
5 changed files with 146 additions and 0 deletions

View File

@ -0,0 +1,48 @@
--- a/lib/GLPI/Agent/Config.pm 2022-08-15 19:32:16.850000000 +0200
+++ b/lib/GLPI/Agent/Config.pm 2022-08-15 19:34:44.220000000 +0200
@@ -62,7 +62,7 @@
my ($class, %params) = @_;
my $self = {
- '_confdir' => undef, # SYSCONFDIR replaced here from Makefile
+ '_confdir' => '/etc/glpi-agent', # SYSCONFDIR replaced here from Makefile
'_options' => $params{options} // {},
};
bless $self, $class;
--- a/lib/setup.pm 2022-08-15 19:32:16.920000000 +0200
+++ b/lib/setup.pm 2022-08-15 19:35:24.060000000 +0200
@@ -11,9 +11,9 @@
our @EXPORT = ('%setup');
our %setup = (
- datadir => './share',
+ datadir => '/usr/share/glpi-agent',
libdir => './lib',
- vardir => './var',
+ vardir => '/var/lib/glpi-agent',
);
# Compute directly libdir from this setup file as it should be installed
--- a/Makefile.PL 2022-08-15 19:32:16.790000000 +0200
+++ b/Makefile.PL 2022-08-15 19:32:52.040000000 +0200
@@ -177,18 +177,15 @@
INSTALLSCRIPT => '$(PREFIX)/bin',
INSTALLSITESCRIPT => '$(PREFIX)/bin',
INSTALLVENDORSCRIPT => '$(PREFIX)/bin',
- INSTALLLIB => '$(DATADIR)/lib',
- INSTALLSITELIB => '$(DATADIR)/lib',
- INSTALLVENDORLIB => '$(DATADIR)/lib',
INSTALLMAN1DIR => '$(PREFIX)/share/man/man1',
INSTALLSITEMAN1DIR => '$(PREFIX)/share/man/man1',
INSTALLVENDORMAN1DIR => '$(PREFIX)/share/man/man1',
INSTALLMAN3DIR => '$(PREFIX)/share/man/man3',
INSTALLSITEMAN3DIR => '$(PREFIX)/share/man/man3',
INSTALLVENDORMAN3DIR => '$(PREFIX)/share/man/man3',
- SYSCONFDIR => '$(PREFIX)/etc/glpi-agent',
+ SYSCONFDIR => '/etc/glpi-agent',
DATADIR => '$(PREFIX)/share/glpi-agent',
- LOCALSTATEDIR => '$(PREFIX)/var/glpi-agent',
+ LOCALSTATEDIR => '/var/lib/glpi-agent',
SNAPDIR => '',
);

View File

@ -0,0 +1,2 @@
# additional args for glpi-agent
GLPI-AGENT_OPTIONS=""

View File

@ -0,0 +1,21 @@
#!/sbin/openrc-run
# Copyright 2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
pidfile=${RC_PREFIX%/}/run/${SVCNAME}.pid
name="glpi-agent daemon"
description="GLPI agent"
command=/usr/bin/glpi-agent
command_args="--daemon --pidfile ${pidfile} ${GLPI-AGENT_OPTIONS}"
extra_started_commands="reload"
depend() {
need net
}
reload() {
ebegin "Reloading ${SVCNAME}"
start-stop-daemon --signal HUP --pidfile "${pidfile}"
eend $?
}