source: trunk/dports/genealogy/geneweb/Portfile @ 31253

Last change on this file since 31253 was 31253, checked in by bfulgham@…, 13 years ago

Update geneweb to:

  1. Remove 'cd' use in Portfile.
  2. Make compatibile with ocaml 3.10 (using new campl5).
  3. Correct various install and setup problems.
  4. Update to Geneweb 5.01
  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.5 KB
Line 
1# $Id: Portfile 31253 2007-11-19 04:45:42Z bfulgham@macports.org $
2
3PortSystem 1.0
4
5name                    geneweb
6version                 5.01
7revision                0
8categories              genealogy
9maintainers             bfulgham@macports.org
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            ftp://ftp.inria.fr/INRIA/Projects/cristal/${name}/Src \
18                        http://www.sartorelli.gen.nz/GeneWeb/Src
19distfiles               ${name}-${version}.tgz
20checksums               md5 a1a763213d08bc0e0f547dff9b6f2ee4
21platforms               darwin
22
23depends_build           port:ocaml \
24                        port:camlp5
25
26destroot.target         distrib
27
28set gwuser              ${name}
29set gwgroup             ${name}
30set logdir              ${prefix}/var/log
31set langdir             ${prefix}/share/${name}/gw
32set dbdir               ${prefix}/var/db/${name}
33
34startupitem.create      yes
35startupitem.start       "su ${gwuser} -c \"cd ~${gwuser} && ./gw/gwd -bd${dbdir} -hd${langdir} -dd${langdir} -langen -log${logdir}/${name}.log -daemon\""
36
37pre-destroot            {
38        addgroup ${gwgroup}
39        set gid [existsgroup ${gwgroup}]
40        adduser ${gwuser} shell=/bin/sh gid=${gid} \
41                home=${prefix}/share/${name} \
42                realname=Geneweb\ Server
43}
44
45destroot                {
46        system "cd ${worksrcpath} && make distrib"
47}
48
49destroot.keepdirs       ${destroot}${dbdir}
50
51set distrib             ${worksrcpath}/distribution
52
53post-destroot           {
54        xinstall -d -m 0755 ${destroot}${logdir}
55        xinstall -d -m 0755 ${destroot}${dbdir}
56
57        system "touch ${destroot}${logdir}/${name}.log"
58        system "chown ${gwuser}:${gwgroup} ${destroot}${logdir}/${name}.log"
59        system "chown -R ${gwuser}:${gwgroup} ${destroot}${dbdir}"
60
61        xinstall -d -m 0755 ${destroot}${prefix}/share/${name}
62        xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${name}
63
64        foreach x {LICENSE.txt README.txt START.htm gw gwd gwsetup} { file copy -force ${distrib}/${x} ${destroot}${prefix}/share/${name}/${x} }
65       
66        system "chmod a+rx ${destroot}${prefix}/share/${name}/gwsetup"
67        system "chmod a+rx ${destroot}${prefix}/share/${name}/gwd"
68
69        # Make the directory structure generally writeable so the gwsetup and other stuff will work easily.
70        system "chown -R ${gwuser}:${gwgroup} ${destroot}${prefix}/share/${name}"
71        system "chmod -R a+r ${destroot}${prefix}/share/${name}/gw"
72
73        # Move a few utilities where the user can get to them easily
74        xinstall -d -m 0755 ${destroot}${prefix}/bin
75        file copy -force ${destroot}${prefix}/share/${name}/gw/consang ${destroot}${prefix}/bin
76        file copy -force ${destroot}${prefix}/share/${name}/gw/ged2gwb ${destroot}${prefix}/bin
77        file copy -force ${destroot}${prefix}/share/${name}/gw/gwb2ged ${destroot}${prefix}/bin
78        file copy -force ${filespath}/gwsetup.macports ${destroot}${prefix}/bin/gwsetup
79
80        # Set correct path in gwsetup
81        reinplace "s|%PREFIX%|${prefix}|" ${destroot}${prefix}/bin/gwsetup
82        system "chmod a+rx ${destroot}${prefix}/bin/gwsetup"
83
84}
85
86pre-install             {
87        addgroup ${gwgroup}
88        set gid [existsgroup ${gwgroup}]
89        adduser ${gwuser} shell=/bin/sh gid=${gid} \
90                home=${prefix}/share/${name} \
91                realname=Geneweb\ Server
92}
93
94post-install    {
95        # Create a location to store the databases
96        # Create the bases directory:
97        xinstall -d -m 0755 ${prefix}/var/db/${name}
98        system "chown -R ${gwuser}:${gwgroup} ${prefix}/var/db/${name}"
99        system "chmod -R a+rw ${prefix}/var/db/${name}"
100
101        ui_msg "\nGeneweb will be listening on localhost, port 2317.\n"
102
103        ui_msg "To get started, you will need to load an initial database."
104        ui_msg "Run the program 'gwsetup' to get started.  After that point,"
105        ui_msg "simply point your browser to http://localhost:2317 to review"
106        ui_msg "the data."
107}
108
Note: See TracBrowser for help on using the repository browser.