core/ocaml/PKGBUILD

58 lines
2.0 KiB
Bash
Raw Normal View History

2013-06-20 18:07:01 +08:00
# maintainer: Neophytos Kolokotronis <tetris4@gmail.com>
# contributions from Arch: https://www.archlinux.org/packages/extra/x86_64/ocaml/
2010-03-14 23:48:48 +08:00
2015-10-20 14:35:38 +08:00
pkgbase='ocaml'
pkgname=('ocaml' 'ocaml-compiler-libs')
2017-11-15 18:18:26 +08:00
pkgver=4.05.0
2010-03-14 23:48:48 +08:00
pkgrel=1
pkgdesc="A functional language with OO extensions"
2013-06-20 18:07:01 +08:00
arch=('x86_64')
2015-10-20 14:35:38 +08:00
license=('LGPL2.1' 'custom: QPL-1.0')
2016-10-03 16:42:25 +08:00
url="http://ocaml.org/"
2010-03-14 23:48:48 +08:00
depends=('gdbm')
2017-11-15 18:18:26 +08:00
makedepends=('tk>=8.6.0' 'ncurses>=6.0' 'libx11')
2010-03-14 23:48:48 +08:00
optdepends=('ncurses: advanced ncurses features' 'tk: advanced tk features')
2017-01-17 04:18:26 +08:00
source=(http://caml.inria.fr/pub/distrib/${pkgbase}-${pkgver%.*}/${pkgbase}-${pkgver}.tar.gz)
2017-11-15 18:18:26 +08:00
md5sums=('89fd8cee148a00a6fcd5f587a2cebe10')
2015-10-20 14:35:38 +08:00
options=('!makeflags' '!emptydirs' 'staticlibs')
2010-03-14 23:48:48 +08:00
build() {
2015-10-20 14:35:38 +08:00
cd "${srcdir}/${pkgname}-${pkgver}"
./configure -prefix /usr -x11include /usr/include
make world.opt
}
2015-10-20 14:35:38 +08:00
package_ocaml() {
cd "${srcdir}/${pkgbase}-${pkgver}"
make PREFIX="${pkgdir}/usr" MANDIR="${pkgdir}/usr/share/man" install
# Save >10MB with this one, makepkg only strips debug symbols.
#find "${pkgdir}/usr/lib" -type f -name '*.so.*' -exec strip --strip-unneeded {} \;
# install license
install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
install -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/"
}
package_ocaml-compiler-libs() {
2017-01-17 04:18:26 +08:00
pkgdesc="Several modules used internally by the OCaml compiler"
license=('custom: QPL-1.0')
depends=('ocaml')
optdepends=()
2015-10-20 14:35:38 +08:00
cd "${srcdir}/${pkgbase}-${pkgver}"
# Install compiler libraries
local compiler_libs="${pkgdir}/usr/lib/ocaml/compiler-libs"
mkdir -p "$compiler_libs"/{parsing,typing,utils}
cp parsing/*.{cmi,cmo,cmx,ml,mli,mll,o} "$compiler_libs"/parsing
cp typing/*.{cmi,cmo,cmx,ml,mli,o} "$compiler_libs"/typing
cp utils/*.{cmi,cmo,cmx,ml,mli,o} "$compiler_libs"/utils
# duplicated by installation
rm -f "$compiler_libs"/typing/outcometree.{cmi,mli}
2010-03-14 23:48:48 +08:00
# install license
install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
install -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/"
2010-03-14 23:48:48 +08:00
}