mirror of
				https://gitlab.alpinelinux.org/alpine/aports.git
				synced 2025-10-31 08:21:49 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			78 lines
		
	
	
		
			2.3 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			78 lines
		
	
	
		
			2.3 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| # Automatically generated by apkbuild-cpan, template 4
 | |
| # Contributor: Celeste <cielesti@protonmail.com>
 | |
| # Maintainer: Celeste <cielesti@protonmail.com>
 | |
| pkgname=perl-net-async-redis
 | |
| pkgver=6.000
 | |
| pkgrel=0
 | |
| #_pkgreal is used by apkbuild-cpan to find modules at MetaCpan
 | |
| _pkgreal=Net-Async-Redis
 | |
| pkgdesc="Redis support for IO::Async"
 | |
| url="https://metacpan.org/release/Net-Async-Redis/"
 | |
| arch="noarch !armhf !armv7 !x86" # perl-ryu
 | |
| license="GPL-1.0-or-later OR Artistic-1.0-Perl"
 | |
| depends="
 | |
| 	perl perl-cache-lru perl-class-method-modifiers perl-curry
 | |
| 	perl-digest-crc perl-dir-self perl-file-sharedir
 | |
| 	perl-file-sharedir-install perl-future perl-future-asyncawait
 | |
| 	perl-future-queue perl-io-async perl-list-binarysearch-xs
 | |
| 	perl-log-any perl-math-random-secure perl-metrics-any
 | |
| 	perl-object-pad perl-path-tiny perl-ryu
 | |
| 	perl-ryu-async perl-syntax-keyword-dynamically
 | |
| 	perl-syntax-keyword-match perl-syntax-keyword-try
 | |
| 	perl-uri perl-uri-redis perl-yaml-libyaml
 | |
| 	"
 | |
| checkdepends="
 | |
| 	perl-sub-identify perl-test-checkdeps perl-test-deep
 | |
| 	perl-test-fatal perl-test-hexstring perl-test-mockmodule
 | |
| 	perl-variable-disposition redis
 | |
| 	"
 | |
| subpackages="$pkgname-doc"
 | |
| source="https://cpan.metacpan.org/authors/id/T/TE/TEAM/Net-Async-Redis-$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
 | |
| }
 | |
| 
 | |
| doc() {
 | |
| 	local file; find "$pkgdir" -name "*.pod" | while read -r file; do
 | |
| 		amove "${file#"$pkgdir"}"
 | |
| 	done
 | |
| 	default_doc
 | |
| }
 | |
| 
 | |
| sha512sums="
 | |
| 691329551b0be74e5f9034fe9c9aaa5ad8c93306a9e3bf46b574c311631a337ed97242b134395b24a4e774ccf78220bd33420864ae43bde473b20e6693fadf70  Net-Async-Redis-6.000.tar.gz
 | |
| "
 |