aboutsummaryrefslogtreecommitdiffstats
path: root/main/perl-lwp-mediatypes/APKBUILD
blob: dc4ec7be0cd461d2daa4e1bbf9bd8d66458159f3 (plain) (blame)
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-lwp-mediatypes
_pkgname=LWP-MediaTypes
pkgver=6.04
pkgrel=1
pkgdesc="Perl module - guess media type for a file or a URL"
url="http://search.cpan.org/~gaas"
arch="noarch"
license="GPL PerlArtistic"
depends="perl"
makedepends="perl-dev"
checkdepends="perl-test-fatal"
install=
replaces="perl-libwww"
subpackages="$pkgname-doc"
source="https://cpan.metacpan.org/authors/id/O/OA/OALDERS/LWP-MediaTypes-$pkgver.tar.gz"
builddir="$srcdir/$_pkgname-$pkgver"

prepare() {
	default_prepare

	cd "$builddir"
	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
	make DESTDIR="$pkgdir" install
	find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
}

sha512sums="0610627ef3efdfde3c89bad273931c9cbde5c6da0bd782d59ce26dc4445cd538be9041d722f08206d96d69d5e3643b15150ef29b9e92e3968833f2ae1b6dc53f  LWP-MediaTypes-6.04.tar.gz"