aboutsummaryrefslogtreecommitdiffstats
path: root/main/perl-sys-hostname-long/APKBUILD
blob: b62f1e68ec9ecab21e1d4ddb0314a7faac502506 (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
# Contributor:  Jeff Bilyk <jbilyk@gmail.com>
# Maintainer:  Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=perl-sys-hostname-long
_pkgname=Sys-Hostname-Long
pkgver=1.5
pkgrel=2
pkgdesc="Perl Module to get full hostname"
url="http://search.cpan.org/~scott/"
arch="noarch"
license="Artistic-1.0-Perl GPL-1.0-or-later"
depends="perl"
makedepends="perl-dev"
subpackages="$pkgname-doc"
source="http://search.cpan.org/CPAN/authors/id/S/SC/SCOTT/$_pkgname-$pkgver.tar.gz
	hostname-f.patch"
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
	make DESTDIR="$pkgdir" install
	find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
}

sha512sums="e34a5f17e65eb9c8d3aa213a6d930be4d0b6981dae3bf600e782b0e9863e6584061285a894f9f54daff7520bcadbb3e8cd6b1f9f973ad1c1b72c79e9f588133b  Sys-Hostname-Long-1.5.tar.gz
47ea5f1a35ac286f9f858fb42e8f4b59801cf99d8c61238238095abb8aee6ff706a8763e5d564dd4582bd7d80c3b966632833958cee1b007b71b5ca10b2f0c90  hostname-f.patch"