Date: Tuesday, March 8, 2022 @ 14:59:50
  Author: kgizdov
Revision: 1145484

archrelease: copy trunk to community-x86_64

Added:
  ocaml-cairo/repos/community-x86_64/PKGBUILD
    (from rev 1145483, ocaml-cairo/trunk/PKGBUILD)
Deleted:
  ocaml-cairo/repos/community-x86_64/PKGBUILD

----------+
 PKGBUILD |   72 +++++++++++++++++++++++++++++++++++++------------------------
 1 file changed, 44 insertions(+), 28 deletions(-)

Deleted: PKGBUILD
===================================================================
--- PKGBUILD    2022-03-08 14:59:43 UTC (rev 1145483)
+++ PKGBUILD    2022-03-08 14:59:50 UTC (rev 1145484)
@@ -1,28 +0,0 @@
-# Maintainer: Konstantin Gizdov <arch at kge dot pw>
-# Contributor: Baptiste Jonglez <baptiste--aur at jonglez dot org>
-
-pkgname=ocaml-cairo
-pkgver=0.6.2
-pkgrel=3
-pkgdesc="OCaml binding to Cairo, a 2D Vector Graphics Library"
-arch=('x86_64')
-url="https://github.com/Chris00/ocaml-cairo";
-license=('LGPL3')
-depends=('ocaml>=4.13.1' 'cairo' 'lablgtk2')
-makedepends=('ocaml-findlib' 'dune')
-source=("https://github.com/Chris00/ocaml-cairo/releases/download/${pkgver}/cairo2-${pkgver}.tbz";)
-sha256sums=('6bb3f59225662304fa161b70c6cdbd7df80ee227b1b2e97152873d72726610ae')
-
-build() {
-  cd "${srcdir}/cairo2-${pkgver}"
-  dune build -p cairo2,cairo2-gtk,cairo2-pango
-}
-
-
-package() {
-  cd "${srcdir}/cairo2-${pkgver}"
-  DESTDIR="${pkgdir}" dune install --prefix "/usr" --libdir "lib/ocaml"
-
-  install -dm755 "${pkgdir}/usr/share/"
-  mv "${pkgdir}/usr/doc" "${pkgdir}/usr/share/"
-}

Copied: ocaml-cairo/repos/community-x86_64/PKGBUILD (from rev 1145483, 
ocaml-cairo/trunk/PKGBUILD)
===================================================================
--- PKGBUILD                            (rev 0)
+++ PKGBUILD    2022-03-08 14:59:50 UTC (rev 1145484)
@@ -0,0 +1,44 @@
+# Maintainer: Konstantin Gizdov <arch at kge dot pw>
+# Contributor: Baptiste Jonglez <baptiste--aur at jonglez dot org>
+
+pkgname=ocaml-cairo
+pkgver=0.6.2
+pkgrel=4
+pkgdesc="OCaml binding to Cairo, a 2D Vector Graphics Library"
+arch=('x86_64')
+url="https://github.com/Chris00/ocaml-cairo";
+license=('LGPL3')
+depends=('ocaml>=4.13.1' 'cairo' 'lablgtk2')
+makedepends=('ocaml-findlib' 'dune')
+source=("https://github.com/Chris00/ocaml-cairo/releases/download/${pkgver}/cairo2-${pkgver}.tbz";)
+sha256sums=('6bb3f59225662304fa161b70c6cdbd7df80ee227b1b2e97152873d72726610ae')
+
+_dune_release_pkgs=('cairo2' 'cairo2-gtk' 'cairo2-pango')
+
+dune_release_pkgs_comma() {
+  # dune build needs a comma separated list of packages
+  local dune_release_pkgs='dummy'
+  for _pkg in "${_dune_release_pkgs[@]}"; do
+    dune_release_pkgs+=",${_pkg}"
+  done
+  dune_release_pkgs="${dune_release_pkgs#dummy,}"
+  echo "${dune_release_pkgs}"
+}
+
+build() {
+  cd "${srcdir}/cairo2-${pkgver}"
+  export OCAMLPATH="$(ocamlfind printconf destdir)"
+  dune build -p "$(dune_release_pkgs_comma)"
+}
+
+
+package() {
+  cd "${srcdir}/cairo2-${pkgver}"
+  # we need to install packages one by one
+  for _pkg in "${_dune_release_pkgs[@]}"; do
+    dune install "${_pkg}" --destdir="${pkgdir}" --prefix="/usr" 
--libdir="$(ocamlfind printconf destdir)"
+  done
+
+  install -dm755 "${pkgdir}/usr/share/"
+  mv "${pkgdir}/usr/doc" "${pkgdir}/usr/share/"
+}

Reply via email to