source: trunk/dports/genealogy/geneweb/Portfile

Last change on this file was 137992, checked in by mww@…, 2 years ago

inc. revision to rebuild library dependents of ocaml (ocaml update to version 4.02.2)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.9 KB
Line 
1# $Id: Portfile 137992 2015-06-24 16:17:51Z ryandesign@macports.org $
2
3PortSystem 1.0
4
5name                    geneweb
6version                 5.02
7revision                3
8categories              genealogy
9maintainers             bfulgham
10description             Sophisticated Genealogy System
11long_description        GeneWeb is sophisticated genealogy software with a \
12                        web interface.  It provides efficient relationship and consanguinity \
13                        computing, support for very large database (i.e., hundreds of thousands \
14                        of entries), and more.
15
16homepage                http://cristal.inria.fr/~ddr/GeneWeb
17master_sites            http://cristal.inria.fr/~ddr/GeneWeb/ftp/Src \
18                        ftp://ftp.inria.fr/INRIA/Projects/cristal/${name}/Src \
19                        http://www.sartorelli.gen.nz/GeneWeb/Src
20distfiles               ${name}-${version}.tgz
21checksums               md5 e8c6c789a9dd2f9155bf6eefa8786d01 \
22                        sha1 e040496b3ce106cc7a508360cd0e4268bcb3e7b1 \
23                        rmd160 fd284630e11957cf1265bfce9207e46d449a83ec
24platforms               darwin
25
26depends_build           port:ocaml \
27                        port:camlp5
28
29patchfiles              patch-5.02-1
30
31use_parallel_build      no
32
33destroot.target         distrib
34
35set gwuser              ${name}
36set gwgroup             ${name}
37set logdir              ${prefix}/var/log
38set langdir             ${prefix}/share/${name}/gw
39set dbdir               ${prefix}/var/db/${name}
40
41startupitem.create      yes
42startupitem.init        HOME=${prefix}/share/${name}
43startupitem.start       "su ${gwuser} -c \"cd ${prefix}/share/${name} && ./gw/gwd -bd${dbdir} -hd${langdir} -dd${langdir} -langen -log${logdir}/${name}.log -daemon\""
44startupitem.pidfile     none
45
46platform darwin {
47        if {${configure.build_arch} eq "x86_64" || ${configure.build_arch} eq "ppc64"} {
48                patchfiles-append patch-64-bit
49        }
50}
51
52pre-destroot            {
53        addgroup ${gwgroup}
54        set gid [existsgroup ${gwgroup}]
55        adduser ${gwuser} shell=/bin/sh gid=${gid} \
56                home=${prefix}/share/${name} \
57                realname=Geneweb\ Server
58}
59
60destroot                {
61        system "cd ${worksrcpath} && make distrib"
62}
63
64destroot.keepdirs       ${destroot}${dbdir}
65
66set distrib             ${worksrcpath}/distribution
67
68post-destroot           {
69        xinstall -m 0755 -o ${gwuser} -g ${gwgroup} -d ${destroot}${logdir}
70        xinstall -m 0755 -o ${gwuser} -g ${gwgroup} -d ${destroot}${dbdir}
71
72        system "touch ${destroot}${logdir}/${name}.log"
73        system "chown ${gwuser}:${gwgroup} ${destroot}${logdir}/${name}.log"
74        system "chown -R ${gwuser}:${gwgroup} ${destroot}${dbdir}"
75
76        xinstall -m 0755 -o ${gwuser} -g ${gwgroup} -d ${destroot}${prefix}/share/${name}
77        xinstall -m 0755 -o ${gwuser} -g ${gwgroup} -d ${destroot}${prefix}/share/doc/${name}
78
79        foreach x {LICENSE.txt README.txt START.htm gw gwd gwsetup} { file copy -force ${distrib}/${x} ${destroot}${prefix}/share/${name}/${x} }
80       
81        system "chmod a+rx ${destroot}${prefix}/share/${name}/gwsetup"
82        system "chmod a+rx ${destroot}${prefix}/share/${name}/gwd"
83
84        # Make the directory structure generally writeable so the gwsetup and other stuff will work easily.
85        system "chown -R ${gwuser}:${gwgroup} ${destroot}${prefix}/share/${name}"
86        system "chmod -R a+r ${destroot}${prefix}/share/${name}/gw"
87
88        # Move a few utilities where the user can get to them easily
89        file copy -force ${destroot}${prefix}/share/${name}/gw/consang ${destroot}${prefix}/bin
90        file copy -force ${destroot}${prefix}/share/${name}/gw/ged2gwb ${destroot}${prefix}/bin
91        file copy -force ${destroot}${prefix}/share/${name}/gw/gwb2ged ${destroot}${prefix}/bin
92        file copy -force ${filespath}/gwsetup.macports ${destroot}${prefix}/bin/gwsetup
93
94        # Set correct path in gwsetup
95        reinplace "s|%PREFIX%|${prefix}|" ${destroot}${prefix}/bin/gwsetup
96        system "chmod a+rx ${destroot}${prefix}/bin/gwsetup"
97}
98
99pre-install             {
100        addgroup ${gwgroup}
101        set gid [existsgroup ${gwgroup}]
102        adduser ${gwuser} shell=/bin/sh gid=${gid} \
103                home=${prefix}/share/${name} \
104                realname=Geneweb\ Server
105}
106
107post-activate   {
108        system "chown -R ${gwuser}:${gwgroup} ${prefix}/var/db/${name}"
109        system "chmod -R a+rw ${prefix}/var/db/${name}"
110}
111
112notes "
113Geneweb will be listening on localhost, port 2317.
114
115To get started, you will need to load an initial database.\
116Run the program 'gwsetup' to get started. After that point,\
117simply point your browser to http://localhost:2317 to review\
118the data.
119"
Note: See TracBrowser for help on using the repository browser.