mirror of
https://gitlab.alpinelinux.org/alpine/abuild.git
synced 2025-01-25 00:34:10 +00:00
apkbuild-cpan: rename _builddir to builddir
This commit is contained in:
parent
0d1a06045b
commit
d1d805be40
@ -38,11 +38,10 @@ depends="$cpandepends"
|
||||
makedepends="perl-dev $cpanmakedepends"
|
||||
subpackages="$pkgname-doc"
|
||||
source="[% source %]"
|
||||
|
||||
_builddir="$srcdir/$_pkgreal-$pkgver"
|
||||
builddir="$srcdir/$_pkgreal-$pkgver"
|
||||
|
||||
prepare() {
|
||||
cd "$_builddir"
|
||||
cd "$builddir"
|
||||
if [ -e Build.PL ]; then
|
||||
perl Build.PL installdirs=vendor || return 1
|
||||
else
|
||||
@ -159,7 +158,7 @@ sub prepare_tree {
|
||||
sub update_functions {
|
||||
my $apkbuild = read_apkbuild;
|
||||
my $metaprefix = "src/" . $apkbuild->{'_pkgreal'} . "-" . $apkbuild->{'pkgver'} . "/";
|
||||
my $prepare_func;
|
||||
my $prepare_func;
|
||||
my $build_func;
|
||||
my $package_func;
|
||||
|
||||
@ -167,21 +166,21 @@ sub update_functions {
|
||||
if (-e "$metaprefix/Build.PL" ) {
|
||||
$prepare_func = <<'EOF';
|
||||
prepare() {
|
||||
cd "$_builddir"
|
||||
cd "$builddir"
|
||||
export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'`
|
||||
perl Build.PL installdirs=vendor || return 1
|
||||
}
|
||||
EOF
|
||||
$build_func = <<'EOF';
|
||||
build() {
|
||||
cd "$_builddir"
|
||||
cd "$builddir"
|
||||
export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'`
|
||||
./Build && ./Build test
|
||||
}
|
||||
EOF
|
||||
$package_func = <<'EOF';
|
||||
package() {
|
||||
cd "$_builddir"
|
||||
cd "$builddir"
|
||||
./Build install destdir="$pkgdir" || return 1
|
||||
find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
|
||||
}
|
||||
@ -189,21 +188,21 @@ EOF
|
||||
} else {
|
||||
$prepare_func = <<'EOF';
|
||||
prepare() {
|
||||
cd "$_builddir"
|
||||
cd "$builddir"
|
||||
export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'`
|
||||
PERL_MM_USE_DEFAULT=1 perl Makefile.PL INSTALLDIRS=vendor
|
||||
}
|
||||
EOF
|
||||
$build_func = <<'EOF';
|
||||
build() {
|
||||
cd "$_builddir"
|
||||
cd "$builddir"
|
||||
export CFLAGS=`perl -MConfig -E 'say $Config{ccflags}'`
|
||||
make && make test
|
||||
}
|
||||
EOF
|
||||
$package_func = <<'EOF';
|
||||
package() {
|
||||
cd "$_builddir"
|
||||
cd "$builddir"
|
||||
make DESTDIR="$pkgdir" install || return 1
|
||||
find "$pkgdir" \( -name perllocal.pod -o -name .packlist \) -delete
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user