diff --git a/check-version.sh b/check-version.sh new file mode 100644 index 0000000..bbe20ba --- /dev/null +++ b/check-version.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +URL="https://www.cpan.org/src/README.html" + +# Get version number from website +VERSION=$(curl -s -L "$URL" | grep -A2 'class="latest"' | tail -n1 | grep -o -E '[0-9]{1,}\.[0-9]{1,}\.[0-9]{1,}') + +echo "$VERSION" diff --git a/pkg.info b/pkg.info index dd869bf..067996d 100644 --- a/pkg.info +++ b/pkg.info @@ -1,7 +1,6 @@ name: perl description: The Practical Extraction and Report Language -version: 5.38.2 -revision: 3 +version: 5.42.0 url: https://www.perl.org/ license: GPL3-or-later architecture: any diff --git a/source.sh b/source.sh index 51c3fcc..4edf4b0 100644 --- a/source.sh +++ b/source.sh @@ -15,22 +15,26 @@ prepare() { # The build function is executed in the source directory # This function is used to compile the source code build() { + # Use system libraries export BUILD_ZLIB=False export BUILD_BZIP2=0 - sh Configure -des \ - -Dprefix=/usr \ - -Dvendorprefix=/usr \ - -Dprivlib=/usr/lib/perl5/5.38/core_perl \ - -Darchlib=/usr/lib/perl5/5.38/core_perl \ - -Dsitelib=/usr/lib/perl5/5.38/site_perl \ - -Dsitearch=/usr/lib/perl5/5.38/site_perl \ - -Dvendorlib=/usr/lib/perl5/5.38/vendor_perl \ - -Dvendorarch=/usr/lib/perl5/5.38/vendor_perl \ - -Dman1dir=/usr/share/man/man1 \ - -Dman3dir=/usr/share/man/man3 \ - -Dpager="/usr/bin/less -isR" \ - -Duseshrplib \ - -Dusethreads + + perldir=/usr/lib/perl/${BPM_PKG_VERSION%.*} + sh Configure -des \ + -Dprefix=/usr \ + -Dvendorprefix=/usr \ + -Dprivlib="$perldir"/core_perl \ + -Darchlib="$perldir"/core_perl \ + -Dsitelib="$perldir"/site_perl \ + -Dsitearch="$perldir"/site_perl \ + -Dvendorlib="$perldir"/vendor_perl \ + -Dvendorarch="$perldir"/vendor_perl \ + -Dman1dir=/usr/share/man/man1 \ + -Dman3dir=/usr/share/man/man3 \ + -Dpager="/usr/bin/less -isR" \ + -Duseshrplib \ + -Dusethreads \ + -Doptimize="${CFLAGS}" make }