Changeset 31253


Ignore:
Timestamp:
Nov 19, 2007, 4:45:42 AM (12 years ago)
Author:
bfulgham@…
Message:

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
Location:
trunk/dports/genealogy/geneweb
Files:
1 added
1 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/genealogy/geneweb/Portfile

    r24141 r31253  
    44
    55name                    geneweb
    6 version                 4.10
     6version                 5.01
    77revision                0
    88categories              genealogy
    9 maintainers             bfulgham@mac.com
     9maintainers             bfulgham@macports.org
    1010description             Sophisticated Genealogy System
    1111long_description        GeneWeb is sophisticated genealogy software with a \
     
    1515
    1616homepage                http://cristal.inria.fr/~ddr/GeneWeb
    17 master_sites            http://cristal.inria.fr/~ddr/GeneWeb/ftp/Src \
     17master_sites            ftp://ftp.inria.fr/INRIA/Projects/cristal/${name}/Src \
    1818                        http://www.sartorelli.gen.nz/GeneWeb/Src
    19 checksums               md5 87371983b3493ced501303e096b70b3a
     19distfiles               ${name}-${version}.tgz
     20checksums               md5 a1a763213d08bc0e0f547dff9b6f2ee4
    2021platforms               darwin
    2122
    22 depends_build           port:ocaml
    23 
    24 patchfiles              patch-tools-Makefile.inc
    25 
    26 use_configure           no
     23depends_build           port:ocaml \
     24                        port:camlp5
    2725
    2826destroot.target         distrib
    2927
    30 set gwuser              geneweb
    31 set gwgroup             geneweb
     28set gwuser              ${name}
     29set gwgroup             ${name}
    3230set logdir              ${prefix}/var/log
    33 set dbdir               ${prefix}/var/db/geneweb
     31set langdir             ${prefix}/share/${name}/gw
     32set dbdir               ${prefix}/var/db/${name}
    3433
    3534startupitem.create      yes
    36 startupitem.start       "su ${gwuser} -c \"cd ~geneweb && ./gwd -bd${dbdir} -langen -log${logdir}/geneweb.log -daemon\""
     35startupitem.start       "su ${gwuser} -c \"cd ~${gwuser} && ./gw/gwd -bd${dbdir} -hd${langdir} -dd${langdir} -langen -log${logdir}/${name}.log -daemon\""
    3736
    3837pre-destroot            {
     
    4039        set gid [existsgroup ${gwgroup}]
    4140        adduser ${gwuser} shell=/bin/sh gid=${gid} \
    42                 home=${prefix}/share/geneweb \
     41                home=${prefix}/share/${name} \
    4342                realname=Geneweb\ Server
    4443}
    4544
     45destroot                {
     46        system "cd ${worksrcpath} && make distrib"
     47}
     48
    4649destroot.keepdirs       ${destroot}${dbdir}
     50
     51set distrib             ${worksrcpath}/distribution
     52
    4753post-destroot           {
    4854        xinstall -d -m 0755 ${destroot}${logdir}
    4955        xinstall -d -m 0755 ${destroot}${dbdir}
    50         system "touch ${destroot}${logdir}/geneweb.log"
    51         system "chown ${gwuser}:${gwgroup} ${destroot}${logdir}/geneweb.log"
     56
     57        system "touch ${destroot}${logdir}/${name}.log"
     58        system "chown ${gwuser}:${gwgroup} ${destroot}${logdir}/${name}.log"
    5259        system "chown -R ${gwuser}:${gwgroup} ${destroot}${dbdir}"
    5360
    54         cd ${worksrcpath}
     61        xinstall -d -m 0755 ${destroot}${prefix}/share/${name}
    5562        xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${name}
    56         xinstall -m 0644 README CHANGES ICHANGES LICENSE ${destroot}${prefix}/share/doc/${name}
    5763
    58         xinstall -d -m 0755 ${destroot}${prefix}/share/${name}
    59         xinstall -d -m 0755 ${destroot}${prefix}/share/${name}/bases
    60         xinstall -d -m 0755 ${destroot}${logdir}
    61         xinstall -d -m 0755 ${destroot}${dbdir}
     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"
    6268
    63         system "cd ${destroot} && mv gw ${destroot}${prefix}/share/${name}"
    64         system "cd ${destroot} && rm LICENSE.txt LISEZMOI.txt README.txt"
    65         system "cd ${destroot} && mv gwd ${destroot}${prefix}/share/${name}"
    66         system "cd ${destroot} && mv gwsetup ${destroot}${prefix}/share/${name}"
     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
    6784}
    6885
     
    7188        set gid [existsgroup ${gwgroup}]
    7289        adduser ${gwuser} shell=/bin/sh gid=${gid} \
    73                 home=${prefix}/share/geneweb \
     90                home=${prefix}/share/${name} \
    7491                realname=Geneweb\ Server
    7592}
    7693
    7794post-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
    78101        ui_msg "\nGeneweb will be listening on localhost, port 2317.\n"
    79102
Note: See TracChangeset for help on using the changeset viewer.