mirror of
https://gitlab.alpinelinux.org/alpine/abuild.git
synced 2025-01-25 00:34:10 +00:00
apkbuild-cpan: modernize
This commit is contained in:
parent
cf18bf6ed9
commit
ba1d1a3d61
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user