Commit ba1d1a3d authored by tmpfile's avatar tmpfile Committed by Timo Teräs

apkbuild-cpan: modernize

parent cf18bf6e
......@@ -45,13 +45,13 @@ source="[% source %]"
builddir="$srcdir/$_pkgreal-$pkgver"
prepare() {
default_prepare || return 1
default_prepare
cd "$builddir"
if [ -e Build.PL ]; then
perl Build.PL installdirs=vendor || return 1
perl Build.PL installdirs=vendor
else
PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor || return 1
PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
fi
}
......@@ -183,11 +183,11 @@ sub update_functions {
if (-e "$metaprefix/Build.PL" ) {
$prepare_func = <<'EOF';
prepare() {
default_prepare || return 1
default_prepare
cd "$builddir"
export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
perl Build.PL installdirs=vendor || return 1
perl Build.PL installdirs=vendor
}
EOF
$build_func = <<'EOF';
......@@ -200,14 +200,14 @@ EOF
$package_func = <<'EOF';
package() {
cd "$builddir"
./Build install destdir="$pkgdir" || return 1
./Build install destdir="$pkgdir"
find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
}
EOF
} else {
$prepare_func = <<'EOF';
prepare() {
default_prepare || return 1
default_prepare
cd "$builddir"
export CFLAGS=$(perl -MConfig -E 'say $Config{ccflags}')
......@@ -224,7 +224,7 @@ EOF
$package_func = <<'EOF';
package() {
cd "$builddir"
make DESTDIR="$pkgdir" install || return 1
make DESTDIR="$pkgdir" install
find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
}
EOF
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment