From 0040312985ec549e977803a80b3ed221befccb3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Tornar=C3=ADa?= Date: Sun, 22 Aug 2021 18:19:24 -0300 Subject: [PATCH] pari-galpol: several improvements - fix license - change homepage and use https for downloads - rename distfiles to include version in name - compress files (installed-size: 80M -> 73M) - drop depends on pari so pari can checkdepends on this (cf #29159, #32614) - skip slow post-install hooks since pkg contains 14681 data files - split a small subset as pari-galpol-small (12M vs 73M) - add update file - change of maintainer agreed by motorto --- srcpkgs/pari-galpol-small | 1 + srcpkgs/pari-galpol/template | 40 +++++++++++++++++++++++++++--------- srcpkgs/pari-galpol/update | 3 +++ 3 files changed, 34 insertions(+), 10 deletions(-) create mode 120000 srcpkgs/pari-galpol-small create mode 100644 srcpkgs/pari-galpol/update diff --git a/srcpkgs/pari-galpol-small b/srcpkgs/pari-galpol-small new file mode 120000 index 00000000000..b4ab81425fe --- /dev/null +++ b/srcpkgs/pari-galpol-small @@ -0,0 +1 @@ +pari-galpol \ No newline at end of file diff --git a/srcpkgs/pari-galpol/template b/srcpkgs/pari-galpol/template index a3c5a088263..8cbb5d684ca 100644 --- a/srcpkgs/pari-galpol/template +++ b/srcpkgs/pari-galpol/template @@ -1,18 +1,38 @@ # Template file for 'pari-galpol' pkgname=pari-galpol version=20180625 -revision=1 +revision=2 create_wrksrc=yes -depends="pari" -short_desc="PARI package of the GALPOL database of polynomials" -maintainer="André Cerqueira " -license="GPL-3.0-or-later" -homepage="http://pari.math.u-bordeaux.fr/" -distfiles="http://pari.math.u-bordeaux.fr/pub/pari/packages/galpol.tgz" +depends="pari-galpol-small" +short_desc="PARI/GP package of the GALPOL database of polynomials" +maintainer="Gonzalo Tornaría " +license="GPL-2.0-or-later" +homepage="https://pari.math.u-bordeaux.fr/packages.html" +distfiles="https://pari.math.u-bordeaux.fr/pub/pari/packages/${pkgname#pari-}.tgz>${pkgname}-${version}.tar.gz" checksum=562af28316ee335ee38c1172c2d5ecccb79f55c368fb9f2c6f40fc0f416bb01b -nostrip=yes +# skip slow post-install hooks for 14681 files: saves ~ 3m in install +nostrip=yes # skip 06-strip-and-debug-pkgs +ignore_elf_dirs=/usr/share/pari # skip 11-pkglint-elf-in-usrshare + +do_build() { + # compressed data files work ok (install-size: 80M -> 73M) + find data -type f -size +4k -print0 | xargs -0 gzip -9 +} do_install() { - vmkdir usr/share/pari - vcopy data/galpol usr/share/pari + vmkdir usr/share/pari + vcopy "data/*" usr/share/pari +} + +pari-galpol-small_package() { + short_desc+=" - groups of order up to 64" + nostrip=yes + ignore_elf_dirs=/usr/share/pari + pkg_install() { + # a subset enough for testing (12M) + vmove "usr/share/pari/galpol/?" + vmove "usr/share/pari/galpol/[1-5]?" + vmove "usr/share/pari/galpol/6[0-4]" + vmove usr/share/pari/galpol/README + } } diff --git a/srcpkgs/pari-galpol/update b/srcpkgs/pari-galpol/update new file mode 100644 index 00000000000..bea0b3258ee --- /dev/null +++ b/srcpkgs/pari-galpol/update @@ -0,0 +1,3 @@ +site="http://pari.math.u-bordeaux.fr/pub/pari/packages/" +pattern="href=\"${pkgname#pari-}.t(ar|gz)\".*\K\d\d\d\d-\d\d-\d\d(?= \d\d:\d\d )" +version=${version:0:4}.${version:4:2}.${version:6:2}