# Contributor: Milan P. Stanić # Contributor: Jakub Jirutka # Maintainer: Milan P. Stanić pkgname=pgbackrest pkgver=2.47 pkgrel=0 pkgdesc="Reliable PostgreSQL backup & restore" url="https://www.pgbackrest.org/" arch="all" license="MIT" options="!check" # FIXME: run tests pkgusers="postgres" pkggroups="postgres" # postgresql package is not strictly required, just the "postgres" user that # is created by this package. However, pgbackrest would be quite useless # without PostgreSQL... depends="postgresql" checkdepends="perl" makedepends=" bzip2-dev libpq-dev libxml2-dev openssl-dev>3 yaml-dev zlib-dev " source="https://github.com/pgbackrest/pgbackrest/archive/release/$pkgver/$pkgname-$pkgver.tar.gz $pkgname.logrotate pgbackrest.conf.in " builddir="$srcdir/$pkgname-release-$pkgver" prepare() { default_prepare local pgver=$(pg_config --version | sed -En 's/^PostgreSQL ([0-9]+)\..*/\1/p') sed "s/@@PG_VERSION@@/${pgver:-14}/" "$srcdir"/pgbackrest.conf.in > "$srcdir"/pgbackrest.conf } build() { cd "$builddir"/src ./configure \ --build=$CBUILD \ --host=$CHOST \ --prefix=/usr \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --localstatedir=/var make } package() { make -C src DESTDIR="$pkgdir" install install -D -m644 "$srcdir"/pgbackrest.conf -t "$pkgdir"/etc/pgbackrest/ install -d -m755 "$pkgdir"/etc/pgbackrest/conf.d install -D -m644 "$srcdir"/$pkgname.logrotate "$pkgdir"/etc/logrotate.d/$pkgname install -d -m750 -o postgres -g postgres \ "$pkgdir"/var/log/pgbackrest \ "$pkgdir"/var/lib/pgbackrest install -d -m700 -o postgres -g postgres \ "$pkgdir"/var/spool/pgbackrest } sha512sums=" 9d7909d3431135ec3e57947a79b7a62648f27822f1ce56d2c091be3ba6d7c4168593a05a866bd724cc42707c09be69074b64d750004b5c55f29790a005e2e683 pgbackrest-2.47.tar.gz ded2377c531cea5709315c85007ddfed1f2eba0528eccd796bde4520d75f5cc6525918b3db8a073e892ebf04c943ab40cc7079dd306c7fdd344027748dae6570 pgbackrest.logrotate 5a1caab3f3aae94779211c4cab2bb5b7404f44f659d27cb657d2079dc0577773e3a6522b1382a1d9a843804bfcfe5aeae210a3aca9d2b585266bbb1df9a82fbb pgbackrest.conf.in "