most recent changes, diff for geneweb
Index: genealogy/geneweb/Portfile
--- genealogy/geneweb/Portfile (revision 31252)
+++ genealogy/geneweb/Portfile (revision 31253)
@@ -3,10 +3,10 @@
PortSystem 1.0
name geneweb
-version 4.10
+version 5.01
revision 0
categories genealogy
-maintainers bfulgham@mac.com
+maintainers bfulgham@macports.org
description Sophisticated Genealogy System
long_description GeneWeb is sophisticated genealogy software with a \
web interface. It provides efficient relationship and consanguinity \
@@ -14,67 +14,90 @@
of entries), and more.
homepage http://cristal.inria.fr/~ddr/GeneWeb
-master_sites http://cristal.inria.fr/~ddr/GeneWeb/ftp/Src \
+master_sites ftp://ftp.inria.fr/INRIA/Projects/cristal/${name}/Src \
http://www.sartorelli.gen.nz/GeneWeb/Src
-checksums md5 87371983b3493ced501303e096b70b3a
+distfiles ${name}-${version}.tgz
+checksums md5 a1a763213d08bc0e0f547dff9b6f2ee4
platforms darwin
-depends_build port:ocaml
+depends_build port:ocaml \
+ port:camlp5
-patchfiles patch-tools-Makefile.inc
-
-use_configure no
-
destroot.target distrib
-set gwuser geneweb
-set gwgroup geneweb
+set gwuser ${name}
+set gwgroup ${name}
set logdir ${prefix}/var/log
-set dbdir ${prefix}/var/db/geneweb
+set langdir ${prefix}/share/${name}/gw
+set dbdir ${prefix}/var/db/${name}
startupitem.create yes
-startupitem.start "su ${gwuser} -c \"cd ~geneweb && ./gwd -bd${dbdir} -langen -log${logdir}/geneweb.log -daemon\""
+startupitem.start "su ${gwuser} -c \"cd ~${gwuser} && ./gw/gwd -bd${dbdir} -hd${langdir} -dd${langdir} -langen -log${logdir}/${name}.log -daemon\""
pre-destroot {
addgroup ${gwgroup}
set gid [existsgroup ${gwgroup}]
adduser ${gwuser} shell=/bin/sh gid=${gid} \
- home=${prefix}/share/geneweb \
+ home=${prefix}/share/${name} \
realname=Geneweb\ Server
}
+destroot {
+ system "cd ${worksrcpath} && make distrib"
+}
+
destroot.keepdirs ${destroot}${dbdir}
+
+set distrib ${worksrcpath}/distribution
+
post-destroot {
xinstall -d -m 0755 ${destroot}${logdir}
xinstall -d -m 0755 ${destroot}${dbdir}
- system "touch ${destroot}${logdir}/geneweb.log"
- system "chown ${gwuser}:${gwgroup} ${destroot}${logdir}/geneweb.log"
+
+ system "touch ${destroot}${logdir}/${name}.log"
+ system "chown ${gwuser}:${gwgroup} ${destroot}${logdir}/${name}.log"
system "chown -R ${gwuser}:${gwgroup} ${destroot}${dbdir}"
- cd ${worksrcpath}
+ xinstall -d -m 0755 ${destroot}${prefix}/share/${name}
xinstall -d -m 0755 ${destroot}${prefix}/share/doc/${name}
- xinstall -m 0644 README CHANGES ICHANGES LICENSE ${destroot}${prefix}/share/doc/${name}
- xinstall -d -m 0755 ${destroot}${prefix}/share/${name}
- xinstall -d -m 0755 ${destroot}${prefix}/share/${name}/bases
- xinstall -d -m 0755 ${destroot}${logdir}
- xinstall -d -m 0755 ${destroot}${dbdir}
+ foreach x {LICENSE.txt README.txt START.htm gw gwd gwsetup} { file copy -force ${distrib}/${x} ${destroot}${prefix}/share/${name}/${x} }
+
+ system "chmod a+rx ${destroot}${prefix}/share/${name}/gwsetup"
+ system "chmod a+rx ${destroot}${prefix}/share/${name}/gwd"
- system "cd ${destroot} && mv gw ${destroot}${prefix}/share/${name}"
- system "cd ${destroot} && rm LICENSE.txt LISEZMOI.txt README.txt"
- system "cd ${destroot} && mv gwd ${destroot}${prefix}/share/${name}"
- system "cd ${destroot} && mv gwsetup ${destroot}${prefix}/share/${name}"
+ # Make the directory structure generally writeable so the gwsetup and other stuff will work easily.
+ system "chown -R ${gwuser}:${gwgroup} ${destroot}${prefix}/share/${name}"
+ system "chmod -R a+r ${destroot}${prefix}/share/${name}/gw"
+
+ # Move a few utilities where the user can get to them easily
+ xinstall -d -m 0755 ${destroot}${prefix}/bin
+ file copy -force ${destroot}${prefix}/share/${name}/gw/consang ${destroot}${prefix}/bin
+ file copy -force ${destroot}${prefix}/share/${name}/gw/ged2gwb ${destroot}${prefix}/bin
+ file copy -force ${destroot}${prefix}/share/${name}/gw/gwb2ged ${destroot}${prefix}/bin
+ file copy -force ${filespath}/gwsetup.macports ${destroot}${prefix}/bin/gwsetup
+
+ # Set correct path in gwsetup
+ reinplace "s|%PREFIX%|${prefix}|" ${destroot}${prefix}/bin/gwsetup
+ system "chmod a+rx ${destroot}${prefix}/bin/gwsetup"
+
}
pre-install {
addgroup ${gwgroup}
set gid [existsgroup ${gwgroup}]
adduser ${gwuser} shell=/bin/sh gid=${gid} \
- home=${prefix}/share/geneweb \
+ home=${prefix}/share/${name} \
realname=Geneweb\ Server
}
post-install {
+ # Create a location to store the databases
+ # Create the bases directory:
+ xinstall -d -m 0755 ${prefix}/var/db/${name}
+ system "chown -R ${gwuser}:${gwgroup} ${prefix}/var/db/${name}"
+ system "chmod -R a+rw ${prefix}/var/db/${name}"
+
ui_msg "\nGeneweb will be listening on localhost, port 2317.\n"
ui_msg "To get started, you will need to load an initial database."