aboutsummaryrefslogtreecommitdiffstats
path: root/main/perl-io-compress/APKBUILD
blob: b7062f8c1f5e0592e27b343345b6febe15206c44 (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
48
49
50
# Contributor: Leonardo Arena <rnalrd@alpinelinux.org>
# Maintainer:  Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=perl-io-compress
_pkgname=IO-Compress
pkgver=2.081
pkgrel=0
pkgdesc="Perl compression library"
url="http://search.cpan.org/dist/IO-Compress/"
arch="noarch"
license="GPL PerlArtistic"
depends="perl perl-compress-raw-bzip2 perl-compress-raw-zlib"
makedepends="perl-dev"
source="http://search.cpan.org/CPAN/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() {
	cd $builddir
	export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
	make
}

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

package() {
	cd $builddir
	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="233ab48b8629b162e15325ac1eee17a01748ad0937e14c43c8254f936a8c06f6fbae646ce74e0783d628b7a1a9da27c57a3ea9997577d885d27a6fa33e7b7f33  IO-Compress-2.081.tar.gz"