summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Peukert2020-03-14 21:05:49 +0100
committerDaniel Peukert2020-03-14 21:05:49 +0100
commitbccebff1d5b9ad0a0879e01373f159a315d561d5 (patch)
tree369e402582613af39b5baaa9bb76df7154618efd
parente2534d3ea92dc3b1b655e3c0d2f3c60d22063a0a (diff)
downloadaur-bccebff1d5b9ad0a0879e01373f159a315d561d5.tar.gz
Added ocaml-base and ocaml-sexplib0
-rw-r--r--.SRCINFO15
-rw-r--r--.editorconfig8
-rw-r--r--.gitignore14
-rw-r--r--PKGBUILD45
4 files changed, 57 insertions, 25 deletions
diff --git a/.SRCINFO b/.SRCINFO
index fe7a934825b..d59c95fe38d 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,16 +1,21 @@
pkgbase = ocaml-sexplib0
pkgdesc = Library containing the definition of S-expressions and some base converters
pkgver = 0.13.0
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/janestreet/sexplib0
arch = x86_64
+ arch = i686
+ arch = arm
+ arch = armv6h
+ arch = armv7h
+ arch = aarch64
license = MIT
makedepends = dune
+ makedepends = ocaml-findlib
depends = glibc
- depends = ocaml
+ depends = ocaml>=4.04.2
options = !strip
- source = https://ocaml.janestreet.com/ocaml-core/v0.13/files/sexplib0-v0.13.0.tar.gz
- sha512sums = cf9dc665919a06fdddcecdfbf5fcd1b41c20acad5d18f31302f248df4c55b6cb4cf734b73f786a9169a316d0024fe243b83868ad7d881f4ccff5a8ad746a28ca
+ source = ocaml-sexplib0-0.13.0-2.tar.gz::https://github.com/janestreet/sexplib0/archive/v0.13.0.tar.gz
+ sha256sums = f98c6693e3067b816f8a21a648a2481fa49b792fb6146ec701adf9ec41affa51
pkgname = ocaml-sexplib0
-
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 00000000000..a467ee9a97a
--- /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 00000000000..82b3c183d5d
--- /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
+
+*/
diff --git a/PKGBUILD b/PKGBUILD
index ed3ebfc244d..7aa1b475466 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,29 +1,34 @@
-# Maintainer: Jakob Gahde <j5lx@fmail.co.uk>
-
-pkgname=ocaml-sexplib0
-pkgver=0.13.0
-pkgrel=1
-pkgdesc="Library containing the definition of S-expressions and some base converters"
-arch=('x86_64')
-url='https://github.com/janestreet/sexplib0'
+# Maintainer: Daniel Peukert <dan.peukert@gmail.com>
+# Contributor: Jakob Gahde <j5lx@fmail.co.uk>
+_projectname='sexplib0'
+pkgname="ocaml-$_projectname"
+pkgver='0.13.0'
+pkgrel='2'
+pkgdesc='Library containing the definition of S-expressions and some base converters'
+arch=('x86_64' 'i686' 'arm' 'armv6h' 'armv7h' 'aarch64')
+url="https://github.com/janestreet/$_projectname"
license=('MIT')
-depends=('glibc' 'ocaml')
-makedepends=('dune')
+depends=('glibc' 'ocaml>=4.04.2')
+makedepends=('dune' 'ocaml-findlib')
options=('!strip')
-source=("https://ocaml.janestreet.com/ocaml-core/v$(echo ${pkgver} | grep -Po "^[0-9]+\.[0-9]+")/files/sexplib0-v${pkgver}.tar.gz")
-sha512sums=('cf9dc665919a06fdddcecdfbf5fcd1b41c20acad5d18f31302f248df4c55b6cb4cf734b73f786a9169a316d0024fe243b83868ad7d881f4ccff5a8ad746a28ca')
+source=("$pkgname-$pkgver-$pkgrel.tar.gz::$url/archive/v$pkgver.tar.gz")
+sha256sums=('f98c6693e3067b816f8a21a648a2481fa49b792fb6146ec701adf9ec41affa51')
-build() {
- cd "${srcdir}/sexplib0-v${pkgver}"
+_sourcedirectory="$_projectname-$pkgver"
- dune build --profile release
+build() {
+ cd "$srcdir/$_sourcedirectory/"
+ dune build -p "$_projectname" --verbose
}
-
package() {
- cd "${srcdir}/sexplib0-v${pkgver}"
+ cd "$srcdir/$_sourcedirectory/"
+ DESTDIR="$pkgdir" dune install --prefix '/usr' --libdir 'lib/ocaml'
+
+ install -dm755 "$pkgdir/usr/share/doc/$pkgname"
+ mv "$pkgdir/usr/doc/$_projectname/"* "$pkgdir/usr/share/doc/$pkgname/"
+ rm -r "$pkgdir/usr/doc/"
- dune install --destdir "${pkgdir}"
- install -Dm755 "LICENSE.md" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.md"
- mv "${pkgdir}/usr/doc" "${pkgdir}/usr/share/"
+ install -dm755 "$pkgdir/usr/share/licenses/$pkgname"
+ ln -sf "/usr/share/doc/$pkgname/LICENSE.md" "$pkgdir/usr/share/licenses/$pkgname/LICENSE.md"
}