summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Peukert2023-05-24 00:06:36 +0200
committerDaniel Peukert2023-05-24 00:06:36 +0200
commit45653c7fa7c7ec49298ed375b4573739c4720e16 (patch)
tree40be158398a96c74025f0dffb2fed1dba123153b
parent5035b3b10d7c5023fd51e28e04345c2e3bb199fb (diff)
downloadaur-45653c7fa7c7ec49298ed375b4573739c4720e16.tar.gz
Add ocaml-uutf and ocaml-uchar
-rw-r--r--.SRCINFO18
-rw-r--r--.editorconfig8
-rw-r--r--.gitignore14
-rw-r--r--PKGBUILD53
4 files changed, 64 insertions, 29 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 03032e40a6c5..a7497e2d4392 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,16 +1,22 @@
pkgbase = ocaml-uchar
pkgdesc = Compatibility library for OCaml's Uchar module
pkgver = 0.0.2
- pkgrel = 1
+ pkgrel = 2
url = https://github.com/ocaml/uchar
- arch = i686
arch = x86_64
- license = LGPL-2.1-WITH-linking-exception
- makedepends = ocaml
+ arch = i486
+ arch = i686
+ arch = pentium4
+ arch = armv7h
+ arch = aarch64
+ license = custom:LGPL2.1 with linking exception
makedepends = ocamlbuild
+ makedepends = ocaml-findlib
+ makedepends = ocaml-topkg
makedepends = opam
- depends = ocaml
- source = ocaml-uchar-0.0.2.tar.gz::https://github.com/ocaml/uchar/archive/v0.0.2.tar.gz
+ depends = ocaml>=3.12.0
+ options = !strip
+ source = ocaml-uchar-0.0.2-2.tar.gz::https://github.com/ocaml/uchar/archive/v0.0.2.tar.gz
sha512sums = 487a9706cf9dfc9b9c94442a51766cc211687d6ebcb4dd3c94d09cb1ed6d7fd61e966e91a4121fe2d1681b2fd6bfee9079d3bccccdb6d65ba2111524ab5dd1bc
pkgname = ocaml-uchar
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 c29b832f1499..989971e64b7f 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,31 +1,38 @@
-# NOTE: This is just a dummy module to satisfy dependencies, uchar is provided
-# directly by ocaml since 4.03.
-pkgname=ocaml-uchar
-_pkgname=uchar
-pkgver=0.0.2
-pkgrel=1
+# Maintainer: Daniel Peukert <daniel@peukert.cc>
+# Contributor: mortzu
+_projectname='uchar'
+pkgname="ocaml-$_projectname"
+pkgver='0.0.2'
+pkgrel='2'
pkgdesc="Compatibility library for OCaml's Uchar module"
-url="https://github.com/ocaml/uchar"
-arch=('i686' 'x86_64')
-license=('LGPL-2.1-WITH-linking-exception')
-depends=('ocaml')
-makedepends=('ocaml' 'ocamlbuild' 'opam')
-source=("$pkgname-$pkgver.tar.gz::https://github.com/ocaml/uchar/archive/v$pkgver.tar.gz")
-sha512sums=("487a9706cf9dfc9b9c94442a51766cc211687d6ebcb4dd3c94d09cb1ed6d7fd61e966e91a4121fe2d1681b2fd6bfee9079d3bccccdb6d65ba2111524ab5dd1bc")
+arch=('x86_64' 'i486' 'i686' 'pentium4' 'armv7h' 'aarch64')
+url="https://github.com/ocaml/$_projectname"
+license=('custom:LGPL2.1 with linking exception')
+depends=('ocaml>=3.12.0')
+makedepends=('ocamlbuild' 'ocaml-findlib' 'ocaml-topkg' 'opam')
+options=('!strip')
+source=("$pkgname-$pkgver-$pkgrel.tar.gz::https://github.com/ocaml/$_projectname/archive/v$pkgver.tar.gz")
+sha512sums=('487a9706cf9dfc9b9c94442a51766cc211687d6ebcb4dd3c94d09cb1ed6d7fd61e966e91a4121fe2d1681b2fd6bfee9079d3bccccdb6d65ba2111524ab5dd1bc')
-build() {
- cd "$srcdir/$_pkgname-$pkgver"
+_sourcedirectory="$_projectname-$pkgver"
+
+prepare() {
+ cd "$srcdir/$_sourcedirectory/"
- ocaml pkg/build.ml \
- native=true \
- native-dynlink=true
+ # Replace topkg watermarks
+ find . -type f -exec sed -i "s/%%NAME%%/$_projectname/g" {} +
+ find . -type f -exec sed -i "s/%%VERSION%%/$pkgver/g" {} +
+}
+
+build() {
+ cd "$srcdir/$_sourcedirectory/"
+ ocaml 'pkg/build.ml' 'native=true' 'native-dynlink=true'
}
package() {
- cd "$srcdir/$_pkgname-$pkgver"
+ cd "$srcdir/$_sourcedirectory/"
+ opam-installer --prefix="$pkgdir/usr" --libdir='lib/ocaml' --docdir='share/doc'
- opam-installer -i \
- --prefix="$pkgdir/usr" \
- --libdir="$pkgdir/usr/lib/ocaml" \
- $_pkgname.install
+ install -dm755 "$pkgdir/usr/share/licenses/$pkgname"
+ ln -sf "/usr/share/doc/$pkgname/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}