Commit d1d805be authored by Jakub Jirutka's avatar Jakub Jirutka Committed by Natanael Copa

apkbuild-cpan: rename _builddir to builddir

parent 0d1a0604
......@@ -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
}
......
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