www-client/seamonkey-bin: bump with unofficial release build
[gentoo.git] / app-misc / geneweb / geneweb-6.07.ebuild
1 # Copyright 1999-2014 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Id$
4
5 EAPI=4
6 inherit eutils user
7
8 MY_PN=gw
9 MY_PV=${PV/./-}
10 MY_P=${MY_PN}-${PV}
11
12 DESCRIPTION="Genealogy software program with a Web interface"
13 HOMEPAGE="http://opensource.geneanet.org/projects/geneweb"
14 SRC_URI="http://opensource.geneanet.org/attachments/download/240/${MY_P}-src.tgz
15         mirror://gentoo/${P}-reduce-utf8.ml.patch.gz"
16
17 LICENSE="GPL-2"
18 SLOT="0"
19 KEYWORDS="amd64 x86"
20 IUSE="+ocamlopt"
21
22 RDEPEND="dev-lang/ocaml[ocamlopt?]
23         dev-ml/camlp5[ocamlopt?]"
24 DEPEND="${RDEPEND}
25         !net-p2p/ghostwhitecrab"
26
27 S=${WORKDIR}/gw-${PV}-src
28
29 src_prepare() {
30         esvn_clean
31         epatch "${FILESDIR}"/${P}-gentoo.patch \
32                 "${FILESDIR}"/${P}-parallellbuild.patch \
33                 ../${P}-reduce-utf8.ml.patch
34 }
35
36 src_compile() {
37         if use ocamlopt; then
38                 emake
39         else
40                 emake OCAMLC=ocamlc OCAMLOPT=ocamlopt out
41                 # If using bytecode we dont want to strip the binary as it would remove
42                 # the bytecode and only leave ocamlrun...
43                 export STRIP_MASK="*/bin/*"
44         fi
45 }
46
47 src_install() {
48         dodoc ICHANGES
49         emake distrib
50         # Install doc
51         cd distribution
52         dodoc CHANGES.txt
53         # Install binaries
54         cd gw
55         dobin gwc gwc1 gwc2 consang gwd gwu update_nldb ged2gwb ged2gwb2 gwb2ged gwsetup
56         insinto /usr/lib/${PN}
57         doins -r gwtp_tmp/*
58         dodoc a.gwf
59         insinto /usr/share/${PN}
60         doins -r etc images lang setup gwd.arg only.txt
61
62         cd ../..
63
64         # Install binaries
65         dobin src/check_base
66         # Install manpages
67         doman man/*
68
69         # Install doc
70         insinto /usr/share/doc/${PF}/contrib
71         doins -r contrib/{gwdiff,misc}
72
73         newinitd "${FILESDIR}/geneweb.initd" geneweb
74         newconfd "${FILESDIR}/geneweb.confd" geneweb
75 }
76
77 pkg_postinst() {
78         enewuser geneweb "" "/bin/bash" /var/lib/geneweb
79         einfo "A CGI program has been installed in /usr/lib/${PN}. Follow the"
80         einfo "instructions on the README in that directory to use it"
81         einfo "For 64 bits architecture you need to rebuild the database"
82         einfo "\"gwu foo > foo.gw \" will save the database (use the previous"
83         einfo "version to do that). \"gwc2 foo.gw -o bar \" will restore it "
84         einfo "(usiing the current package)"
85 }