summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Peukert2022-08-04 23:47:45 +0200
committerDaniel Peukert2022-08-04 23:47:45 +0200
commitfe84ba141c8e451e57ac6a2874f06214f9ccec40 (patch)
tree71bb5044c32b3d4c569bc50ed6bf924535be3db4
parent0b34f2d2521116650e8deafde5d7045530eb4342 (diff)
downloadaur-fe84ba141c8e451e57ac6a2874f06214f9ccec40.tar.gz
Add ocaml-fileutils
-rw-r--r--.SRCINFO30
-rw-r--r--.editorconfig8
-rw-r--r--.gitignore14
-rw-r--r--PKGBUILD58
-rw-r--r--fix-ounit-name.diff10
5 files changed, 87 insertions, 33 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 8476c833a89b..3de57fcc9ffc 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,17 +1,23 @@
pkgbase = ocaml-fileutils
- pkgdesc = A library to provide pure OCaml functions to manipulate real file and filename.
- pkgver = 0.5.3
+ pkgdesc = OCaml API to manipulate real files and filenames
+ pkgver = 0.6.3
pkgrel = 1
- url = http://forge.ocamlcore.org/projects/ocaml-fileutils
- arch = i686
+ url = https://github.com/gildor478/ocaml-fileutils
arch = x86_64
- license = LGPL
- makedepends = ocaml-findlib
- makedepends = ocaml-ounit
- makedepends = ocamlbuild
- depends = ocaml
- source = https://forge.ocamlcore.org/frs/download.php/1728/ocaml-fileutils-0.5.3.tar.gz
- md5sums = 9b719b19b96525004c88bf7bc846fa1d
+ arch = i686
+ arch = arm
+ arch = armv6h
+ arch = armv7h
+ arch = aarch64
+ license = custom:LGPL2.1 with linking exception
+ checkdepends = ocaml-ounit>=2.0.0
+ makedepends = dune>=1.11.0
+ depends = ocaml>=4.03.0
+ depends = ocaml-stdlib-shims
+ options = !strip
+ source = ocaml-fileutils-0.6.3-1.tar.gz::https://github.com/gildor478/ocaml-fileutils/archive/v0.6.3.tar.gz
+ source = fix-ounit-name.diff
+ sha512sums = 491c01347714b9caf69e184be7e031d82d3602b91ce52c5c995b25897090d9af79b2ae058ff92b91ab31b44dd1fdf15fbe1a428d2f3a50872d3f0f7689a64e8c
+ sha512sums = e68fcb4cd54603573d7175579d7d78045d5b9faf6c3c3dc149f5d6908e301e6518bad41a8793df666b3441331d275040342e5bcb6012851e884b9eeca8f028d9
pkgname = ocaml-fileutils
-
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
+
+*/
diff --git a/PKGBUILD b/PKGBUILD
index 3e1cc9dfbdaf..8a9567cb5425 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,33 +1,49 @@
-# Maintainer: Thorsten Wißmann <edu@thorsten-wissmann.de>
+# Maintainer: Daniel Peukert <daniel@peukert.cc>
+# Contributor: Thorsten Wißmann <edu@thorsten-wissmann.de>
# Contributor: Serge Zirukin <ftrvxmtrx@gmail.com>
# Contributor: Sergei Lebedev <superbobry@gmail.com>
# Contributor: Magnus Therning <magnus@therning.org>
# Contributor: Thomas Pani <thomas.pani@gmail.com>
# Contributor: crave <crave@infinity>
+pkgname='ocaml-fileutils'
+pkgver='0.6.3'
+pkgrel='1'
+pkgdesc='OCaml API to manipulate real files and filenames'
+arch=('x86_64' 'i686' 'arm' 'armv6h' 'armv7h' 'aarch64')
+url="https://github.com/gildor478/$pkgname"
+license=('custom:LGPL2.1 with linking exception')
+depends=('ocaml>=4.03.0' 'ocaml-stdlib-shims')
+makedepends=('dune>=1.11.0')
+checkdepends=('ocaml-ounit>=2.0.0')
+options=('!strip')
+source=(
+ "$pkgname-$pkgver-$pkgrel.tar.gz::$url/archive/v$pkgver.tar.gz"
+ 'fix-ounit-name.diff'
+)
+sha512sums=('491c01347714b9caf69e184be7e031d82d3602b91ce52c5c995b25897090d9af79b2ae058ff92b91ab31b44dd1fdf15fbe1a428d2f3a50872d3f0f7689a64e8c'
+ 'e68fcb4cd54603573d7175579d7d78045d5b9faf6c3c3dc149f5d6908e301e6518bad41a8793df666b3441331d275040342e5bcb6012851e884b9eeca8f028d9')
-pkgname=ocaml-fileutils
-pkgver=0.5.3
-oldver=0.4.5
-pkgrel=1
-pkgdesc="A library to provide pure OCaml functions to manipulate real file and filename."
-arch=('i686' 'x86_64')
-url="http://forge.ocamlcore.org/projects/ocaml-fileutils"
-license=('LGPL')
-depends=('ocaml')
-makedepends=('ocaml-findlib' 'ocaml-ounit' 'ocamlbuild')
-source=('https://forge.ocamlcore.org/frs/download.php/1728/ocaml-fileutils-0.5.3.tar.gz')
-md5sums=('9b719b19b96525004c88bf7bc846fa1d')
+_sourcedirectory="$pkgname-$pkgver"
+
+prepare() {
+ cd "$srcdir/$_sourcedirectory/"
+ patch --forward -p1 < "$srcdir/fix-ounit-name.diff"
+}
build() {
- cd "$srcdir/"*/
- ocaml setup.ml -configure --prefix prefix
- ocaml setup.ml -build
+ cd "$srcdir/$_sourcedirectory/"
+ dune build --release --verbose
+}
+
+check() {
+ cd "$srcdir/$_sourcedirectory/"
+ dune runtest --release --verbose
}
package() {
- cd "$srcdir/"*/
- export OCAMLFIND_DESTDIR="$pkgdir$(ocamlfind printconf destdir)"
- install -dm 755 "$OCAMLFIND_DESTDIR"
- ocaml setup.ml -install
- install -Dm 644 COPYING.txt "$pkgdir/usr/share/licenses/$pkgname/COPYING"
+ cd "$srcdir/$_sourcedirectory/"
+ DESTDIR="$pkgdir" dune install --prefix '/usr' --libdir '/usr/lib/ocaml' --docdir '/usr/share/doc' --mandir '/usr/share/man' --release --verbose
+
+ install -dm755 "$pkgdir/usr/share/licenses/$pkgname"
+ ln -sf "/usr/share/doc/$pkgname/LICENSE.txt" "$pkgdir/usr/share/licenses/$pkgname/LICENSE.txt"
}
diff --git a/fix-ounit-name.diff b/fix-ounit-name.diff
new file mode 100644
index 000000000000..658cd8b33cbf
--- /dev/null
+++ b/fix-ounit-name.diff
@@ -0,0 +1,10 @@
+diff --git a/test/dune b/test/dune
+index 38ebc4e..eecfe54 100644
+--- a/test/dune
++++ b/test/dune
+@@ -6,4 +6,4 @@
+ (test
+ (name test)
+ (modules test)
+- (libraries fileutils fileutils_str oUnit stdlib-shims))
++ (libraries fileutils fileutils_str ounit2 stdlib-shims))