diff options
author | Daniel Peukert | 2023-08-11 13:29:48 +0200 |
---|---|---|
committer | Daniel Peukert | 2023-08-11 13:29:48 +0200 |
commit | bb900482d3b88e96cfa3f6f5ac8a2edd482993b2 (patch) | |
tree | 1333980340a3db7e14946feb3b3c837b57efef0c | |
parent | 12796f32b18e8378846889094388a3c2238bd89b (diff) | |
download | aur-bb900482d3b88e96cfa3f6f5ac8a2edd482993b2.tar.gz |
Add ocaml-graphics
-rw-r--r-- | .SRCINFO | 18 | ||||
-rw-r--r-- | .editorconfig | 8 | ||||
-rw-r--r-- | .gitignore | 14 | ||||
-rw-r--r-- | PKGBUILD | 64 |
4 files changed, 62 insertions, 42 deletions
@@ -1,14 +1,18 @@ pkgbase = ocaml-graphics - pkgdesc = Graphics library from OCaml + pkgdesc = OCaml graphics library pkgver = 5.1.2 pkgrel = 1 url = https://github.com/ocaml/graphics arch = x86_64 - license = LGPL2.1 - makedepends = dune - depends = ocaml>=4.0.9 - source = https://github.com/ocaml/graphics/archive/5.1.2.tar.gz - sha256sums = 9db6e8cd71a77fbec28cdee3fe5ed4640d6b92d9eb5ad68150beccae316620fe + arch = aarch64 + license = custom:LGPL2.1 with linking exception + depends = ocaml>=4.09.0 + depends = ocaml-compiler-libs + depends = dune>=2.1.0 + depends = libx11 + depends = pkgconf + options = !strip + source = ocaml-graphics-5.1.2.tar.gz::https://github.com/ocaml/graphics/archive/5.1.2.tar.gz + sha512sums = d4b92a34bcb11db2facbf0fa46b1a86fcad607f555d0068e430f8c4c3b6fdc07803f4bab61247c40941065e75e147e4063602a9c54593994cbd92548e25ee2df pkgname = ocaml-graphics - diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 000000000000..a467ee9a97a6 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,8 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +insert_final_newline = true +indent_style = tab +tab_width = 4 diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..82b3c183d5d4 --- /dev/null +++ b/.gitignore @@ -0,0 +1,14 @@ +# from https://github.com/github/gitignore/blob/master/ArchLinuxPackages.gitignore +*.tar +*.tar.* +*.rpm +*.jar +*.exe +*.msi +*.zip +*.tgz +*.log +*.log.* +*.sig + +*/ @@ -1,44 +1,38 @@ -# Maintainer Severin Glöckner <severin.gloeckner@stud.htwk-leipzig.de> - -# Quoting the release notes of ocaml 4.0.9 -# »The graphics library was moved out of the compiler distribution.« -# This package contains it. - -pkgname=ocaml-graphics -pkgver=5.1.2 -pkgrel=1 -pkgdesc="Graphics library from OCaml" -arch=('x86_64') -url="https://github.com/ocaml/graphics" -license=('LGPL2.1') -depends=('ocaml>=4.0.9') -makedepends=('dune') -source=("https://github.com/ocaml/graphics/archive/${pkgver}.tar.gz") -sha256sums=('9db6e8cd71a77fbec28cdee3fe5ed4640d6b92d9eb5ad68150beccae316620fe') +# Maintainer: Daniel Peukert <daniel@peukert.cc> +# Contributor: Severin Glöckner <severin.gloeckner@stud.htwk-leipzig.de> +_projectname='graphics' +pkgname="ocaml-$_projectname" +pkgver='5.1.2' +pkgrel='1' +pkgdesc='OCaml graphics library' +arch=('x86_64' 'aarch64') +url="https://github.com/ocaml/$_projectname" +license=('custom:LGPL2.1 with linking exception') +depends=('ocaml>=4.09.0' 'ocaml-compiler-libs' 'dune>=2.1.0' 'libx11' 'pkgconf') +options=('!strip') +source=("$pkgname-$pkgver.tar.gz::$url/archive/$pkgver.tar.gz") +sha512sums=('d4b92a34bcb11db2facbf0fa46b1a86fcad607f555d0068e430f8c4c3b6fdc07803f4bab61247c40941065e75e147e4063602a9c54593994cbd92548e25ee2df') + +_sourcedirectory="$_projectname-$pkgver" build() { - cd "${srcdir}/graphics-${pkgver}" - - dune build -p graphics + cd "$srcdir/$_sourcedirectory/" + dune build --release --verbose } +check() { + cd "$srcdir/$_sourcedirectory/" + dune runtest --release --verbose +} package() { - cd "${srcdir}/graphics-${pkgver}" - - DESTDIR="${pkgdir}" dune install --prefix "/usr" --libdir "lib/ocaml" - - # There's nothing useful inside. - rm -r "${pkgdir}/usr/doc/" + cd "$srcdir/$_sourcedirectory/" + DESTDIR="$pkgdir" dune install --prefix '/usr' --libdir '/usr/lib/ocaml' --docdir '/usr/share/doc' --mandir '/usr/share/man' --release --verbose - # License has an addition to LGPL2.1. - install -Dm644 "$srcdir"/graphics-$pkgver/LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE + for _folder in "$pkgdir/usr/share/doc/"*; do + mv "$_folder" "$pkgdir/usr/share/doc/ocaml-$(basename "$_folder")" + done - # Unfortunately, the files won't be found in the subfolder. Linking them. - cd "${pkgdir}/usr/lib/ocaml/" - for file in graphics/*graphics* - do - ln -s graphics/$(basename "$file") $(basename "$file") - done + install -dm755 "$pkgdir/usr/share/licenses/$pkgname" + ln -sf "/usr/share/doc/$pkgname/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" } - |