aboutsummaryrefslogtreecommitdiffstats
path: root/main/perl-io-compress/APKBUILD
blob: 7c30ea57f2d5936f984423b5baca941b95d448e5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer:  Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=perl-io-compress
_pkgname=IO-Compress
pkgver=2.093
pkgrel=0
pkgdesc="Perl compression library"
url="https://metacpan.org/release/IO-Compress"
arch="noarch"
license="GPL-1.0-or-later OR Artistic-1.0-Perl"
depends="perl perl-compress-raw-bzip2 perl-compress-raw-zlib"
makedepends="perl-dev"
source="https://cpan.metacpan.org/authors/id/P/PM/PMQS/$_pkgname-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

prepare() {
	default_prepare
	export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
}

build() {
	export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
	make
}

check() {
	export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
	make test
}

package() {
	export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
	make DESTDIR="$pkgdir" install

	# conflicts with core perl
	rm "$pkgdir"/usr/bin/zipdetails
	rmdir "$pkgdir"/usr/bin 2>/dev/null || true

	# creates file collision among perl modules
	find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete

	# man pages are already provided by perl-doc
	rm -rf "$pkgdir"/usr/share/man
}

sha512sums="5921d6c32b48bd78acec8b2083ebefea85de7931c6091982eb80ffef877504dc709ad3435aade04f53981d47f98123f5225d7dd427c172dd6a1bb1b21cf4ae8c  IO-Compress-2.093.tar.gz"