summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJ5lx2016-02-06 02:56:05 +0100
committerJ5lx2016-02-06 02:56:05 +0100
commit2af859cd0d0b1d01046c2818f5a299c306ce76e1 (patch)
treec9c69f8676b9e9958c8b5365a5c185f0b6028f41
downloadaur-2af859cd0d0b1d01046c2818f5a299c306ce76e1.tar.gz
113.24.00-1: Initial upload
-rw-r--r--.SRCINFO23
-rw-r--r--PKGBUILD35
-rw-r--r--libdir.patch36
3 files changed, 94 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..6657fda03cd
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,23 @@
+# Generated by mksrcinfo v8
+# Sat Feb 6 01:55:49 UTC 2016
+pkgbase = ocaml-ppx_driver
+ pkgdesc = Feature-full driver for OCaml AST transformers
+ pkgver = 113.24.00
+ pkgrel = 1
+ url = https://github.com/janestreet/ppx_driver
+ arch = i686
+ arch = x86_64
+ license = Apache
+ makedepends = ocaml-findlib
+ makedepends = opam
+ depends = ocaml
+ depends = ocaml-ppx_core
+ depends = ocaml-ppx_optcomp
+ options = !strip
+ source = https://ocaml.janestreet.com/ocaml-core/113.24/files/ppx_driver-113.24.00.tar.gz
+ source = libdir.patch
+ md5sums = dd5f40bef1c6d0cd3e78da9aac420209
+ md5sums = 7f0a951f1ac87385272ea7a6dd58762a
+
+pkgname = ocaml-ppx_driver
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..81cc7435757
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,35 @@
+# Maintainer: Jakob Gahde <j5lx@fmail.co.uk>
+
+pkgname=ocaml-ppx_driver
+pkgver=113.24.00
+pkgrel=1
+license=('Apache')
+arch=('i686' 'x86_64')
+pkgdesc="Feature-full driver for OCaml AST transformers"
+url="https://github.com/janestreet/ppx_driver"
+depends=('ocaml' 'ocaml-ppx_core' 'ocaml-ppx_optcomp')
+makedepends=('ocaml-findlib' 'opam')
+source=("https://ocaml.janestreet.com/ocaml-core/$(echo ${pkgver} | grep -Po "^[0-9]+\.[0-9]+")/files/${pkgname#ocaml-}-$(echo ${pkgver} | grep -Po "^[0-9]+\.[0-9]+\.[0-9]+").tar.gz"
+ "libdir.patch")
+options=('!strip')
+md5sums=('dd5f40bef1c6d0cd3e78da9aac420209'
+ '7f0a951f1ac87385272ea7a6dd58762a')
+
+prepare() {
+ cd "${srcdir}/${pkgname#ocaml-}-${pkgver}"
+
+ patch -Np1 < "${srcdir}/libdir.patch"
+}
+
+build() {
+ cd "${srcdir}/${pkgname#ocaml-}-${pkgver}"
+
+ ./configure --prefix=/usr
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname#ocaml-}-${pkgver}"
+
+ make install PREFIX="${pkgdir}/usr" LIBDIR="${pkgdir}$(ocamlc -where)"
+}
diff --git a/libdir.patch b/libdir.patch
new file mode 100644
index 00000000000..6284fcd558b
--- /dev/null
+++ b/libdir.patch
@@ -0,0 +1,36 @@
+diff -aur package.pristine/Makefile package.new/Makefile
+--- package.pristine/Makefile 2016-02-06 01:55:14.650150309 +0100
++++ package.new/Makefile 2016-02-06 01:57:56.012174364 +0100
+@@ -29,26 +29,26 @@
+ ocaml -I js-utils js-utils/gen_install.ml
+
+ install: $(NAME).install
+- opam-installer -i --prefix $(PREFIX) $(NAME).install
++ opam-installer -i --prefix $(PREFIX) --libdir $(LIBDIR) $(NAME).install
+
+ uninstall: $(NAME).install
+- opam-installer -u --prefix $(PREFIX) $(NAME).install
++ opam-installer -u --prefix $(PREFIX) --libdir $(LIBDIR) $(NAME).install
+
+ reinstall: $(NAME).install
+- opam-installer -u --prefix $(PREFIX) $(NAME).install &> /dev/null || true
+- opam-installer -i --prefix $(PREFIX) $(NAME).install
++ opam-installer -u --prefix $(PREFIX) --libdir $(LIBDIR) $(NAME).install &> /dev/null || true
++ opam-installer -i --prefix $(PREFIX) --libdir $(LIBDIR) $(NAME).install
+
+ bin.tar.gz: $(NAME).install
+ rm -rf _install
+ mkdir _install
+- opam-installer -i --prefix _install $(NAME).install
++ opam-installer -i --prefix _install --libdir $(LIBDIR) $(NAME).install
+ tar czf bin.tar.gz -C _install .
+ rm -rf _install
+
+ bin.lzo: $(NAME).install
+ rm -rf _install
+ mkdir _install
+- opam-installer -i --prefix _install $(NAME).install
++ opam-installer -i --prefix _install --libdir $(LIBDIR) $(NAME).install
+ cd _install && lzop -1 -P -o ../bin.lzo `find . -type f`
+ rm -rf _install
+