1 # Maintainer: Thibault Suzanne <thi.suzanne@gmail.com>
3 _srcname='ocsigen-bundle'
4 pkgname="ocaml-${_srcname}"
7 pkgdesc='Clean and safe tools for developing and running client/server Web 2.0 applications with OCaml'
9 url='http://ocsigen.org/'
11 depends=('ocaml>=3.12.0' 'ocaml-compiler-libs' 'libev' 'glibc'
12 'ocaml-calendar' 'ocaml-cryptokit' 'ocamlnet' 'ocaml-pcre' 'ocaml-react' 'ocaml-ssl' 'ocaml-sqlite3'
14 makedepends=('ocaml-findlib')
15 optdepends=('ocaml-zip' 'ocamlduce' 'ocaml-type-conv')
16 provides=("ocaml-ocsigenserver=${pkgver}" "ocaml-lwt=${pkgver}" "ocaml-tyxml=${pkgver}"
17 "ocaml-eliom=${pkgver}" "ocaml-js_of_ocaml=${pkgver}" "ocaml-deriving-ocsigen=0.3b")
19 conflicts=("ocaml-ocsigenserver" "ocaml-lwt" "ocaml-tyxml"
20 "ocaml-eliom" "ocaml-js_of_ocaml" "ocaml-deriving-ocsigen")
23 source=("http://ocsigen.org/download/${_srcname}-${pkgver}.tar.gz")
24 md5sums=('bf259b3ebe7b812282e74b9567ae719a')
28 cd "${srcdir}/${_srcname}-${pkgver}"
34 --libexecdir=/usr/libexec \
36 --sharedstatedir=/usr/com \
37 --localstatedir=/var \
39 --includedir=/usr/include \
40 --oldincludedir=/usr/include \
41 --datarootdir=/usr/share \
42 --mandir=/usr/share/man/man1 \
43 --docdir=/usr/share/doc/ocsigenserver
49 cd "$srcdir/${_srcname}-${pkgver}"
51 SITELIB="${pkgdir}/usr/lib/ocaml" \
52 BINDIR="${pkgdir}/usr/bin" \
53 LDCONF="${pkgdir}/usr/lib/ocaml/ld.conf" \
54 COMMANDPIPE="${pkgdir}/var/run/ocsigen" \
55 CONFIGDIR="${pkgdir}/etc/ocsigenserver" \
56 LOGDIR="${pkgdir}/var/log/ocsigenserver" \
57 STATICPAGESDIR="${pkgdir}/srv/ocsigenserver" \
58 DATADIR="${pkgdir}/var/lib/ocsigenserver" \
59 MANDIR="${pkgdir}/usr/share/man/man1" \
62 rm -f "${pkgdir}/usr/lib/ocaml/ld.conf"
64 # Fixing miswritten directories in ocsigenserver configuration file
65 sed -i -e "s#//#/#g; s#/var/www/#/srv/#g" "${pkgdir}/etc/ocsigenserver/ocsigenserver.conf"
67 # Writing lines for eliom support by default in ocsigenserver configuration file
68 sed -i -e '26 s#<!--##; 31 s#-->#<extension findlib-package="eliom.server"/>#' \
69 "${pkgdir}/etc/ocsigenserver/ocsigenserver.conf"