mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-02-09 01:41:38 +01:00
testing/pgqd: new aport
This commit is contained in:
parent
5c09cb51aa
commit
5e99489ea3
73
testing/pgqd/APKBUILD
Normal file
73
testing/pgqd/APKBUILD
Normal file
@ -0,0 +1,73 @@
|
||||
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
|
||||
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
|
||||
pkgname=pgqd
|
||||
pkgver=3.5
|
||||
pkgrel=0
|
||||
pkgdesc="PgQ maintenance daemon"
|
||||
url="https://github.com/pgq/pgqd"
|
||||
arch="all"
|
||||
license="ISC"
|
||||
makedepends="
|
||||
autoconf
|
||||
automake
|
||||
cmd:rst2man
|
||||
libevent-dev
|
||||
libpq-dev
|
||||
libtool
|
||||
"
|
||||
subpackages="
|
||||
$pkgname-doc
|
||||
$pkgname-openrc
|
||||
"
|
||||
_libusual_gitrev=46a78d2616ba2e8b5855a3914d5e9375935cf61b
|
||||
source="https://github.com/pgq/pgqd/archive/v$pkgver/pgqd-$pkgver.tar.gz
|
||||
https://github.com/libusual/libusual/archive/$_libusual_gitrev/pgqd-$_libusual_gitrev.tar.gz
|
||||
pgqd.ini.dist.patch
|
||||
$pkgname.initd
|
||||
$pkgname.confd
|
||||
"
|
||||
options="!check" # requires running postgresql
|
||||
|
||||
prepare() {
|
||||
rm -r lib
|
||||
ln -s ../libusual-$_libusual_gitrev lib
|
||||
|
||||
# pgqd.ini is embedded into the binary, so we copy it and customize
|
||||
# the copy which we install to /etc.
|
||||
cp pgqd.ini pgqd.ini.dist
|
||||
|
||||
default_prepare
|
||||
|
||||
./autogen.sh
|
||||
}
|
||||
|
||||
build() {
|
||||
./configure \
|
||||
--build=$CBUILD \
|
||||
--host=$CHOST \
|
||||
--prefix=/usr \
|
||||
--sysconfdir=/etc \
|
||||
--mandir=/usr/share/man \
|
||||
--localstatedir=/var
|
||||
make
|
||||
}
|
||||
|
||||
check() {
|
||||
make check
|
||||
}
|
||||
|
||||
package() {
|
||||
make DESTDIR="$pkgdir" install
|
||||
|
||||
install -D -m644 pgqd.ini.dist "$pkgdir"/etc/pgqd.ini
|
||||
install -D -m755 "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
|
||||
install -D -m644 "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
7620f2f5ee698e48e935ff1bca7dc46bc73dc6a0dba8c1dc6990d43ff5ead9abd84de547dd3eb452c529c4b909ad7e575ae9d2734fffe6c051e7e76d477e7866 pgqd-3.5.tar.gz
|
||||
09ecefd3bf51b2cd435d69b2ba194b86bdce7c755bb44cef4e53f6c8ac47fea355a40955c6668fc01f762bc03fdf9f92ed74d683b1b922c9aa3cda36a258c097 pgqd-46a78d2616ba2e8b5855a3914d5e9375935cf61b.tar.gz
|
||||
54cab746edf28114afedc48f85c728cc8d0c1231effc1af77c50c771a011fe9e6fdd9d648131175d0549b1ad072a88501d2664e21cfb5e5258fd1c7744c5e772 pgqd.ini.dist.patch
|
||||
5a60f5742659dda2edf993b25f07981277198d173ad8988674346ee34ea6acc805f9b299f6ccba34f11f179dc41301a2147f06d4212b173066b4a7e5bea5dc3c pgqd.initd
|
||||
57ea6868e589a84a675cdcc38cb639862205d819cfe2900b1c1bfd77b3a0143673bdf53878d13c35ebdfce55c30291adb6384c859fe84dab5ff7a9b4f46764c1 pgqd.confd
|
||||
"
|
||||
13
testing/pgqd/pgqd.confd
Normal file
13
testing/pgqd/pgqd.confd
Normal file
@ -0,0 +1,13 @@
|
||||
# Configuration for /etc/init.d/pgqd
|
||||
|
||||
# Path to the configuration file.
|
||||
#cfgfile="/etc/pgqd.ini"
|
||||
|
||||
# The user (and group) to run pgqd as.
|
||||
#command_user="postgres"
|
||||
|
||||
# Additional options to pass to pgqd.
|
||||
#command_args=
|
||||
|
||||
# Comment out if you want to run pgqd without process supervisor.
|
||||
supervisor="supervise-daemon"
|
||||
18
testing/pgqd/pgqd.ini.dist.patch
Normal file
18
testing/pgqd/pgqd.ini.dist.patch
Normal file
@ -0,0 +1,18 @@
|
||||
pgqd logs to syslog by default, so logfile is unnecessary.
|
||||
We don't want pgqd daemonize itself, so pidfile is unnecessary.
|
||||
|
||||
--- a/pgqd.ini.dist
|
||||
+++ b/pgqd.ini.dist
|
||||
@@ -1,10 +1,7 @@
|
||||
[pgqd]
|
||||
|
||||
-# where to log
|
||||
-logfile = ~/log/pgqd.log
|
||||
-
|
||||
-# pidfile
|
||||
-pidfile = ~/pid/pgqd.pid
|
||||
+# file path where to write logs
|
||||
+#logfile =
|
||||
|
||||
## optional parameters ##
|
||||
|
||||
31
testing/pgqd/pgqd.initd
Normal file
31
testing/pgqd/pgqd.initd
Normal file
@ -0,0 +1,31 @@
|
||||
#!/sbin/openrc-run
|
||||
|
||||
extra_started_commands="reload"
|
||||
|
||||
description="PgQ maintenance daemon"
|
||||
description_reload="Reload the configuration"
|
||||
|
||||
: ${command_user:="postgres"}
|
||||
: ${cfgfile:="/etc/pgqd.ini"}
|
||||
|
||||
command="/usr/bin/pgqd"
|
||||
command_args="$command_args $cfgfile"
|
||||
command_background="yes"
|
||||
pidfile="/run/$RC_SVCNAME.pid"
|
||||
|
||||
depend() {
|
||||
use logger
|
||||
after postgresql
|
||||
}
|
||||
|
||||
reload() {
|
||||
ebegin "Reloading $RC_SVCNAME configuration"
|
||||
|
||||
if [ "$supervisor" ]; then
|
||||
$supervisor "$RC_SVCNAME" --signal HUP
|
||||
else
|
||||
start-stop-daemon --pidfile "$pidfile" --signal HUP
|
||||
fi
|
||||
|
||||
eend $?
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user