summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Letan2024-01-21 14:55:27 +0100
committerThomas Letan2024-01-21 14:55:27 +0100
commitb2ac6d9a4e2ed4f541d7aabd89805867123d6718 (patch)
tree81eff44a80e5b17399d775abc128db14145e2721
downloadaur-ocaml-cstruct.tar.gz
ocaml-cstruct.6.2.0
-rw-r--r--.SRCINFO14
-rw-r--r--.gitignore4
-rw-r--r--PKGBUILD29
3 files changed, 47 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..6fbfb4884cdb
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,14 @@
+pkgbase = ocaml-cstruct
+ pkgdesc = Map OCaml arrays onto C-like structs
+ pkgver = 6.2.0
+ pkgrel = 1
+ url = https://github.com/mirage/ocaml-cstruct
+ arch = x86_64
+ license = custom:ISC
+ makedepends = dune
+ depends = ocaml
+ options = !strip
+ source = ocaml-cstruct-6.2.0.tbz::https://github.com/mirage/ocaml-cstruct/releases/download/v6.2.0/cstruct-6.2.0.tbz
+ sha512sums = 8d33fe6b3707a3994d0225cd33cadde0bb2ca834ef01096e3df33a08e4a8c6d02ebccddf558a73988b8a5595b65fdc10de61efbf872c6c9e55c719c7e19c463d
+
+pkgname = ocaml-cstruct
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..4bd725f54fe7
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+ocaml-cstruct-*.pkg.tar.zst
+ocaml-cstruct-*.tbz
+pkg/
+src/
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..f50d01f804c4
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,29 @@
+# Maintainer: Thomas Letan <lthms@soap.coffee>
+
+pkgname=ocaml-cstruct
+pkgver=6.2.0
+pkgrel=1
+license=('custom:ISC')
+arch=('x86_64')
+pkgdesc="Map OCaml arrays onto C-like structs"
+url="https://github.com/mirage/ocaml-cstruct"
+depends=('ocaml')
+makedepends=('dune')
+source=(
+ "$pkgname-$pkgver.tbz::https://github.com/mirage/ocaml-cstruct/releases/download/v$pkgver/cstruct-$pkgver.tbz"
+)
+options=('!strip')
+sha512sums=(
+ "8d33fe6b3707a3994d0225cd33cadde0bb2ca834ef01096e3df33a08e4a8c6d02ebccddf558a73988b8a5595b65fdc10de61efbf872c6c9e55c719c7e19c463d"
+)
+
+build() {
+ cd "${srcdir}/cstruct-${pkgver}"
+ # The "-p" flag is necessary for release builds, see the Dune manpage. Dune will complain if you forget some packages.
+ dune build -p cstruct
+}
+
+package() {
+ cd "${srcdir}/cstruct-${pkgver}"
+ DESTDIR="${pkgdir}" dune install cstruct --prefix "/usr" --libdir "/usr/lib/ocaml" --docdir "/usr/share/doc"
+}