aboutsummaryrefslogtreecommitdiffstats
path: root/main/perl-sys-hostname-long
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@alpinelinux.org>2019-05-27 06:34:29 +0000
committerLeonardo Arena <rnalrd@alpinelinux.org>2019-05-27 06:34:29 +0000
commit289a90443465cb9745f4be9a5decc028abbaedef (patch)
tree72fff8bc1229d45ae19d7d5eaad87d33a9b87654 /main/perl-sys-hostname-long
parent78c2cfd0705613c5e6538b7c18b4c7c568ac875d (diff)
downloadaports-289a90443465cb9745f4be9a5decc028abbaedef.tar.bz2
aports-289a90443465cb9745f4be9a5decc028abbaedef.tar.xz
main/perl-sys-hostname-long: Modernize APKBUILD
Add check(), prepare(), update license
Diffstat (limited to 'main/perl-sys-hostname-long')
-rw-r--r--main/perl-sys-hostname-long/APKBUILD32
1 files changed, 20 insertions, 12 deletions
diff --git a/main/perl-sys-hostname-long/APKBUILD b/main/perl-sys-hostname-long/APKBUILD
index 55bca47a8d..b62f1e68ec 100644
--- a/main/perl-sys-hostname-long/APKBUILD
+++ b/main/perl-sys-hostname-long/APKBUILD
@@ -1,34 +1,42 @@
# Contributor: Jeff Bilyk <jbilyk@gmail.com>
# Maintainer: Leonardo Arena <rnalrd@alpinelinux.org>
pkgname=perl-sys-hostname-long
-_realname=Sys-Hostname-Long
+_pkgname=Sys-Hostname-Long
pkgver=1.5
-pkgrel=1
+pkgrel=2
pkgdesc="Perl Module to get full hostname"
url="http://search.cpan.org/~scott/"
arch="noarch"
-license="GPL PerlArtistic"
+license="Artistic-1.0-Perl GPL-1.0-or-later"
depends="perl"
makedepends="perl-dev"
-install=
-subpackages=""
-source="http://search.cpan.org/CPAN/authors/id/S/SC/SCOTT/$_realname-$pkgver.tar.gz
+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"
-builddir="$srcdir/$_realname-$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
- PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1
- make || return 1
+ 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
- # creates file collision among perl modules
- find "$pkgdir" -name perllocal.pod -delete
-
+ find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
}
sha512sums="e34a5f17e65eb9c8d3aa213a6d930be4d0b6981dae3bf600e782b0e9863e6584061285a894f9f54daff7520bcadbb3e8cd6b1f9f973ad1c1b72c79e9f588133b Sys-Hostname-Long-1.5.tar.gz