archrelease: copy trunk to extra-x86_64
[arch-packages.git] / ocaml / repos / extra-x86_64 / PKGBUILD
blobd4a5fd9edb3a7f7334a63f6c4f5fcc4a7abac063
1 # Maintainer: Jürgen Hötzel <juergen@archlinux.org>
3 pkgbase='ocaml'
4 pkgname=('ocaml' 'ocaml-compiler-libs')
5 pkgver=4.14.0
6 pkgrel=1
7 pkgdesc="A functional language with OO extensions"
8 arch=('x86_64')
9 license=('LGPL2.1' 'custom: QPL-1.0')
10 url="https://caml.inria.fr/"
11 makedepends=('ncurses>=5.6-7')
12 optdepends=('ncurses: advanced ncurses features' 'tk: advanced tk features')
13 source=(https://caml.inria.fr/distrib/ocaml-${pkgver%.*}/${pkgname}-${pkgver}.tar.xz)
14 sha512sums=('0fae5b8752ce900bc69f71ebdc82faa588272fd3dce6795aa03467e89e1e376f127a288221761e353191fb5941b563e183098c0c74b18374aa0ca1c8e0715e97')
15 options=('!makeflags' '!emptydirs' 'staticlibs')
19 build() {
20   cd "${srcdir}/${pkgname}-${pkgver}"
21   CFLAGS+=' -ffat-lto-objects'
22   CXXFLAGS+=' -ffat-lto-objects'
23   ./configure --prefix /usr --mandir /usr/share/man --disable-force-safe-string --enable-frame-pointers
24   make --debug=v world.opt
27 package_ocaml() {
28   cd "${srcdir}/${pkgbase}-${pkgver}"
29   make DESTDIR="${pkgdir}" install
31   # Save >10MB with this one, makepkg only strips debug symbols.
32   #find "${pkgdir}/usr/lib" -type f -name '*.so.*' -exec strip --strip-unneeded {} \;
34   # install license
35   install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
36   install -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/"
38   # remove compiler libs
39   rm -rf "${pkgdir}/usr/lib/ocaml/compiler-libs"
42 package_ocaml-compiler-libs() {
43 pkgdesc="Several modules used internally by the OCaml compiler"
44 license=('custom: QPL-1.0')
45 depends=('ocaml')
46 optdepends=()
48   cd "${srcdir}/${pkgbase}-${pkgver}"
49   make DESTDIR="${pkgdir}" install
50   # Remove non-compiler-libs
51   rm -rf   "${pkgdir}/usr/bin"  "${pkgdir}/usr/lib/ocaml/caml" \
52      "${pkgdir}/usr/lib/ocaml/ocamldoc" "${pkgdir}/usr/lib/ocaml/stublibs" \
53      "${pkgdir}/usr/lib/ocaml/threads" "${pkgdir}/usr/share"
54   find "${pkgdir}/usr/lib/ocaml/" -maxdepth 1 -type f -delete
56   install -m755 -d "${pkgdir}/usr/share/licenses/${pkgname}"
57   install -m644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/"