mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-04-16 18:06:50 +02:00
leaving the Maintainer comment there for better visual cues, syntax highlighting, and easy conversion to a Contributor comment since Contributor comments are not being removed, just treat my Maintainer comments like Contributor ones, as a normal comment
64 lines
1.8 KiB
Text
64 lines
1.8 KiB
Text
# Automatically generated by apkbuild-cpan, template 4
|
|
# Maintainer: Celeste <cielesti@protonmail.com>
|
|
maintainer="Celeste <cielesti@protonmail.com>"
|
|
pkgname=perl-net-async-redis-xs
|
|
pkgver=1.001
|
|
pkgrel=1
|
|
#_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
|
|
_pkgreal=Net-Async-Redis-XS
|
|
pkgdesc="Faster version of Net::Async::Redis"
|
|
url="https://metacpan.org/release/Net-Async-Redis-XS/"
|
|
arch="all"
|
|
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
|
|
depends="
|
|
perl perl-future-asyncawait perl-io-async
|
|
perl-net-async-redis perl-object-pad
|
|
"
|
|
makedepends="perl-dev"
|
|
checkdepends="
|
|
perl-sub-identify perl-test-checkdeps perl-test-deep
|
|
perl-test-fatal perl-test-hexstring perl-test-memorygrowth
|
|
perl-test-mockmodule redis
|
|
"
|
|
subpackages="$pkgname-doc"
|
|
source="https://cpan.metacpan.org/authors/id/T/TE/TEAM/Net-Async-Redis-XS-$pkgver.tar.gz"
|
|
builddir="$srcdir/$_pkgreal-$pkgver"
|
|
|
|
build() {
|
|
export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
|
|
PERL_MM_USE_DEFAULT=1 perl -I. Makefile.PL \
|
|
INSTALLDIRS=vendor \
|
|
NO_PACKLIST=1 \
|
|
NO_PERLLOCAL=1
|
|
make
|
|
}
|
|
|
|
check() {
|
|
export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
|
|
export NET_ASYNC_REDIS_HOST="127.0.0.1"
|
|
|
|
redis-server \
|
|
--dir "$builddir" \
|
|
--loglevel warning \
|
|
--unixsocket "$builddir"/redis.sock &
|
|
local _redispid=$!
|
|
|
|
# make sure socket is available before we start running tests
|
|
local _n=100 # wait up to 10 sec
|
|
while ! [ -e "$builddir"/redis.sock ] && [ $_n -gt 0 ]; do
|
|
sleep 0.1s
|
|
# shellcheck disable=SC3039
|
|
let _n="$_n - 1"
|
|
done
|
|
|
|
make test || (kill $_redispid && false)
|
|
kill $_redispid
|
|
}
|
|
|
|
package() {
|
|
make DESTDIR="$pkgdir" install
|
|
}
|
|
|
|
sha512sums="
|
|
79b0b319492564130fa5deeece90d34b305a6024fea16362e2fae1867db3cb941411459ca0e55a234c5a76be11b9d849891cbb3baef624be563f87f2995f61ff Net-Async-Redis-XS-1.001.tar.gz
|
|
"
|