mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-23 03:05:48 +03:00
the test suite will send an actual email to the atuthor. We don't want to do that and some of the build servers may have smtp port blocked. Create a dummy smtp server on localhost and patch test to use that.
58 lines
1.7 KiB
Text
58 lines
1.7 KiB
Text
# Automatically generated by apkbuild-cpan, template 1
|
|
# Contributor: Valery Kartel <valery.kartel@gmail.com>
|
|
# Maintainer: Valery Kartel <valery.kartel@gmail.com>
|
|
pkgname=perl-mail-sendmail
|
|
_pkgreal=Mail-Sendmail
|
|
pkgver=0.80
|
|
pkgrel=1
|
|
pkgdesc="Simple platform independent mailer"
|
|
url="http://search.cpan.org/dist/Mail-Sendmail/"
|
|
arch="noarch"
|
|
license="GPL PerlArtistic"
|
|
cpandepends=""
|
|
cpanmakedepends=" "
|
|
depends="$cpandepends"
|
|
makedepends="perl-dev $cpanmakedepends"
|
|
checkdepends="python3"
|
|
subpackages="$pkgname-doc"
|
|
source="http://search.cpan.org/CPAN/authors/id/N/NE/NEILB/$_pkgreal-$pkgver.tar.gz
|
|
test-localhost.patch
|
|
fake-smtp.py"
|
|
builddir="$srcdir/$_pkgreal-$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"
|
|
# run dummy smtp server
|
|
python3 "$srcdir"/fake-smtp.py &
|
|
local pid=$!
|
|
local rc=0
|
|
if ! make test; then
|
|
rc=1
|
|
fi
|
|
kill $pid
|
|
return $rc
|
|
}
|
|
|
|
package() {
|
|
cd "$builddir"
|
|
make DESTDIR="$pkgdir" install
|
|
find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
|
|
}
|
|
|
|
sha512sums="848ec471938d679645dfb4e032a33d35e49655a336dc6ff3a24ffa35606bff77e73162af672d1a60ad3a7bf571113e802fc42d6cb9a072cdca0d89f707f54a08 Mail-Sendmail-0.80.tar.gz
|
|
2592c4aafd9f58d9e4f8c0f78e8d87e7e6160b4a53aa73b929ad12d26d677f8a7baec540a57a8edabbba6f05bd33c9e2dc5ee707cfaaccd14837a6ddc681d742 test-localhost.patch
|
|
dbff85dc3924274c2f640e0f6ea4d782c0221e841763fb122c9942ef8e2c5d7a0c73aa2cfd1f7b59708fe27a392a000dcfbc2a04ad7e7e8885d21a27df339410 fake-smtp.py"
|