aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@alpinelinux.org>2017-04-06 06:14:15 +0000
committerLeonardo Arena <rnalrd@alpinelinux.org>2017-04-06 06:14:24 +0000
commit1a6f0e47a845b1fa209f13c290567c61f6544f47 (patch)
tree9e7b13ccc462cd52098b854b00c031502d86d713
parent2b985a1313e460649713a4754e5ef4483f398ff5 (diff)
downloadaports-1a6f0e47a845b1fa209f13c290567c61f6544f47.tar.gz
aports-1a6f0e47a845b1fa209f13c290567c61f6544f47.tar.bz2
aports-1a6f0e47a845b1fa209f13c290567c61f6544f47.tar.xz
main/perl-mime-tools: add check(), modernize APKBUILD
-rw-r--r--main/perl-mime-tools/APKBUILD28
1 files changed, 19 insertions, 9 deletions
diff --git a/main/perl-mime-tools/APKBUILD b/main/perl-mime-tools/APKBUILD
index ea085aa67f..983b5ad875 100644
--- a/main/perl-mime-tools/APKBUILD
+++ b/main/perl-mime-tools/APKBUILD
@@ -3,29 +3,39 @@
pkgname=perl-mime-tools
_realname=MIME-tools
pkgver=5.509
-pkgrel=0
+pkgrel=1
pkgdesc="Perl modules for parsing (and creating!) MIME entities"
-url="http://search.cpan.org/~doneill/MIME-tools-5.427/"
+url="http://search.cpan.org/~doneill/MIME-tools-$pkgver/"
arch="noarch"
license="PerlArtistic GPL"
depends="perl perl-io-stringy perl-mailtools perl-convert-binhex"
makedepends="perl-dev"
-install=
+checkdepends="perl-test-deep perl-test-pod"
subpackages="$pkgname-doc"
source="http://search.cpan.org/CPAN/authors/id/D/DS/DSKOLL/$_realname-$pkgver.tar.gz"
+builddir="$srcdir/$_realname-$pkgver"
-build() {
- cd "$srcdir/$_realname-$pkgver"
-
+prepare() {
+ cd "$builddir"
+ export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'`
PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1
+}
+
+build() {
+ cd "$builddir"
+ export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'`
make || return 1
}
package() {
- cd "$srcdir/$_realname-$pkgver"
+ 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
+}
+
+check() {
+ cd "$builddir"
+ make test
}
sha512sums="0407b09916144eafbee0c75758306e0f44c27db0e8aabf033267f9903f676f0415de99927dcfdb69f9e9d4123d63c280f526dff92e0d97744761c888df90667a MIME-tools-5.509.tar.gz"