Subject: [alpine-aports] [PATCH] main/perl-net-smtp-ssl: Recreate APKBUILD with apkbuild-cpan generator (no package rebuild needed)

From: Valery Kartel <[email-masked]>
Date: Thu, 29 Oct 2015 16:43:37 +0200

---
 main/perl-net-smtp-ssl/APKBUILD | 38 +++++++++++++++++++++++---------------
 1 file changed, 23 insertions(+), 15 deletions(-)

diff --git a/main/perl-net-smtp-ssl/APKBUILD b/main/perl-net-smtp-ssl/APKBUILD
index 055ea56..0dc16a7 100644
--- a/main/perl-net-smtp-ssl/APKBUILD
+++ b/main/perl-net-smtp-ssl/APKBUILD
@@ -1,31 +1,39 @@
-# Contributor: Natanael Copa <[email-masked]>
+# Automatically generated by apkbuild-cpan, template 1
+# Contributor: Valery Kartel <[email-masked]>
 # Maintainer: Natanael Copa <[email-masked]>
 pkgname=perl-net-smtp-ssl
-_realname=Net-SMTP-SSL
+_pkgreal=Net-SMTP-SSL
 pkgver=1.03
 pkgrel=0
 pkgdesc="SSL support for Net::SMTP"
 url="http://search.cpan.org/dist/Net-SMTP-SSL/"
 arch="noarch"
-license="GPL"
-depends="perl perl-io-socket-ssl"
-makedepends="perl-dev"
-install=
+license="GPL PerlArtistic"
+cpandepends="perl-io-socket-ssl"
+cpanmakedepends="   "
+depends="$cpandepends"
+makedepends="perl-dev $cpanmakedepends"
 subpackages="$pkgname-doc"
-source="http://search.cpan.org/CPAN/authors/id/R/RJ/RJBS/Net-SMTP-SSL-$pkgver.tar.gz"
+source="http://search.cpan.org/CPAN/authors/id/R/RJ/RJBS/$_pkgreal-$pkgver.tar.gz"
 
-build() {
-	cd "$srcdir/$_realname-$pkgver"
+_builddir="$srcdir/$_pkgreal-$pkgver"
+
+prepare() {
+	cd "$_builddir"
+	export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'`
+	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
+}
 
-	PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1
-	make || return 1
+build() {
+	cd "$_builddir"
+	export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'`
+	make && make test
 }
 
 package() {
-	cd "$srcdir/$_realname-$pkgver"
-	make DESTDIR="$pkgdir" install
-        # creates file collision among perl modules
-	find "$pkgdir" -name perllocal.pod -delete
+	cd "$_builddir"
+	make DESTDIR="$pkgdir" install || return 1
+	find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
 }
 
 md5sums="75c80e6af5583630ba074b25c0b5ee84  Net-SMTP-SSL-1.03.tar.gz"
-- 
2.6.1

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---