updated on Thu Jan 12 04:00:44 UTC 2012
[aur-mirror.git] / ocaml-ocsigen-bundle / PKGBUILD
blob15892cdeeb7c3a3d557c68bf242c5a75b2359cbb
1 # Maintainer: Thibault Suzanne <thi.suzanne@gmail.com>
3 _srcname='ocsigen-bundle'
4 pkgname="ocaml-${_srcname}"
5 pkgver='2.0.2'
6 pkgrel=6
7 pkgdesc='Clean and safe tools for developing and running client/server Web 2.0 applications with OCaml'
8 arch=('i686' 'x86_64')
9 url='http://ocsigen.org/'
10 license=('LGPL')
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'
13   'ocaml-text')
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")
22 options=('!strip')
23 source=("http://ocsigen.org/download/${_srcname}-${pkgver}.tar.gz")
24 md5sums=('bf259b3ebe7b812282e74b9567ae719a')
27 build() {
28   cd "${srcdir}/${_srcname}-${pkgver}"
29   chmod +x configure
30   ./configure \
31     --prefix=/ \
32     --bindir=/usr/bin \
33     --sbindir=/usr/sbin \
34     --libexecdir=/usr/libexec \
35     --sysconfdir=/etc \
36     --sharedstatedir=/usr/com \
37     --localstatedir=/var \
38     --libdir=/usr/lib \
39     --includedir=/usr/include \
40     --oldincludedir=/usr/include \
41     --datarootdir=/usr/share \
42     --mandir=/usr/share/man/man1 \
43     --docdir=/usr/share/doc/ocsigenserver
44   make || return 1
48 package() {
49   cd "$srcdir/${_srcname}-${pkgver}"
50   make \
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" \
60     -e install
61   
62   rm -f "${pkgdir}/usr/lib/ocaml/ld.conf"
63   
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"