summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristopher Price2022-10-15 21:25:07 -0700
committerChristopher Price2022-10-15 21:36:11 -0700
commitce524e9999076a62ade1bd8b48585718ce195293 (patch)
treea198c72be95f9ea904cb4b8745a97a8c1eade4c8
parentd6fdef0390abacaabd23dc39dc8e1c9a93d6e90f (diff)
downloadaur-ce524e9999076a62ade1bd8b48585718ce195293.tar.gz
follow ocaml package guidelines
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD39
2 files changed, 24 insertions, 21 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 829a8988ddbf..be7f3587d2b6 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -4,17 +4,15 @@ pkgbase = gapi-ocaml
pkgrel = 1
url = https://astrada.github.io/gapi-ocaml/
arch = x86_64
- arch = i686
- arch = armv7h
license = MIT
- makedepends = dune
- makedepends = ocaml-ounit
depends = ocaml>=4.02.3
depends = ocaml-findlib>=1.2.7
depends = ocamlnet>=4.1.4
depends = ocaml-curl>=0.5.3
depends = ocaml-cryptokit>=1.3.14
depends = ocaml-yojson>=1.6.0
+ makedepends = dune
+ makedepends = ocaml-ounit
options = !strip
options = staticlibs
source = gapi-ocaml-0.4.2.tar.gz::https://github.com/astrada/gapi-ocaml/archive/v0.4.2.tar.gz
diff --git a/PKGBUILD b/PKGBUILD
index 44c12abcc0b5..28fbfea8ac09 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,17 +1,12 @@
-# Christopher Price <pricechrispy at gmail dot com>
+# Maintainer: Christopher Price <pricechrispy at gmail dot com>
# Contributor: nerflad (nerflad@gmail.com)
-
pkgname=gapi-ocaml
pkgver=0.4.2
pkgrel=1
-pkgdesc="A simple OCaml client for Google Services."
-arch=("x86_64" "i686" "armv7h")
-url="https://astrada.github.io/gapi-ocaml/"
+pkgdesc='A simple OCaml client for Google Services.'
+arch=('x86_64')
+url='https://astrada.github.io/gapi-ocaml/'
license=('MIT')
-makedepends=(
-'dune'
-'ocaml-ounit'
-)
depends=(
'ocaml>=4.02.3'
'ocaml-findlib>=1.2.7'
@@ -20,20 +15,30 @@ depends=(
'ocaml-cryptokit>=1.3.14'
'ocaml-yojson>=1.6.0'
)
-source=("$pkgname-$pkgver.tar.gz::https://github.com/astrada/$pkgname/archive/v$pkgver.tar.gz")
+makedepends=(
+'dune'
+'ocaml-ounit'
+)
options=('!strip' 'staticlibs')
+source=("$pkgname-$pkgver.tar.gz::https://github.com/astrada/$pkgname/archive/v$pkgver.tar.gz")
sha256sums=('9c4c6dfa43443675d2ac0a14ec6ff5a105e274dc8bb4cdef657fb5f6e0af5b2a')
build() {
- cd ${srcdir}/${pkgname}-${pkgver}
- dune build @install
- sed -i '/doc:\s\[/,$d' _build/default/gapi-ocaml.install
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ export OCAMLPATH="$(ocamlfind printconf destdir)"
+
+ dune build -p "$pkgname"
+
+ sed -i '/doc:\s\[/,$d' _build/default/gapi-ocaml.install
}
package() {
- cd ${srcdir}/${pkgname}-${pkgver}
- export OCAMLFIND_DESTDIR="$pkgdir/$(ocamlfind printconf destdir)"
- install -dm755 "$OCAMLFIND_DESTDIR"
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ dune install "$pkgname" --destdir="${pkgdir}" --prefix="/usr" --libdir="$(ocamlfind printconf destdir)"
+
+ install -dm755 "${pkgdir}/usr/share/"
- dune install
+ mv "${pkgdir}/usr/doc" "${pkgdir}/usr/share/"
}