diff options
Diffstat (limited to 'testing/ocaml-calendar/APKBUILD')
-rw-r--r-- | testing/ocaml-calendar/APKBUILD | 52 |
1 files changed, 47 insertions, 5 deletions
diff --git a/testing/ocaml-calendar/APKBUILD b/testing/ocaml-calendar/APKBUILD index bdee5782acf..d58c15b9095 100644 --- a/testing/ocaml-calendar/APKBUILD +++ b/testing/ocaml-calendar/APKBUILD @@ -1,17 +1,22 @@ # Contributor: Fernando Casas Schossow <casasfernando@outlook.com> # Maintainer: Fernando Casas Schossow <casasfernando@outlook.com> pkgname=ocaml-calendar +_pkgname=calendar pkgver=2.04 -pkgrel=1 +pkgrel=4 pkgdesc="Objective Caml library for managing dates and times" url="https://forge.ocamlcore.org/projects/calendar/" -# 32-bits fails packaging because of textrels -arch="all !x86 !armv7 !armhf !mips64 !riscv64" # restricted by ocaml -license="LGPL-2.1-or-later-WITH-linking-exception" +arch="all !riscv64 !loongarch64" # ocaml +license="LGPL-2.1-or-later WITH OCaml-LGPL-linking-exception" makedepends="ocaml ocaml-findlib-dev ocaml-ocamldoc gawk" subpackages="$pkgname-dev $pkgname-doc" source="https://download.ocamlcore.org/calendar/calendar/$pkgver/calendar-$pkgver.tar.gz" -builddir="$srcdir/calendar-$pkgver" +builddir="$srcdir/$_pkgname-$pkgver" + +# 32-bit archs +case "$CARCH" in + arm*|x86) options="$options textrels" ;; +esac build() { ./configure --prefix=/usr --libdir=/usr/lib @@ -32,6 +37,43 @@ package() { install -D -m644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE" } +dev() { + default_dev + + cd "$pkgdir" + + local path; find usr/lib/ocaml \( \ + -name '*.cmt' -o \ + -name '*.cmti' -o \ + -name '*.ml' -o \ + -name '*.mli' \ + \) | while read -r path + do + amove "$path" + done +} + +prepare_py_provides() { + local datadir="${subpkgdir:-$pkgdir}" + local pkgbasedir=${pkgbasedir:-"$startdir/pkg"} + local controldir="$pkgbasedir"/.control.${subpkgname:-$pkgname} + + options_has "!tracedeps" && return 0 + + ocaml4-abuild-find provides \ + "$datadir"/usr/lib/ocaml \ + "$controldir" \ + "$pkgver-r$pkgrel" +} + +scan_python3_dependency() { + local controldir="$2" datadir="$3" + + ocaml4-abuild-find requires \ + "$datadir"/usr/lib/ocaml \ + "$controldir" +} + sha512sums=" 3941768428eda47f47912846cc2921ee82c722bda7cf6095c1c8bdcfebc19bb8f64ebb1a25475396d2a49c186b83421af63602a54a261684117b1c036a66cf3d calendar-2.04.tar.gz " |