# $Id: Portfile,v 1.9 2004/02/24 03:45:46 rshaw Exp $ PortSystem 1.0 name zope version 2.7.0 revision 1 categories www zope python maintainers wbb4@opendarwin.org description Object-Oriented Python Web Application Server long_description Zope is a leading open source application server, \ specializing in content management, portals, and \ custom applications. platforms darwin freebsd homepage http://www.zope.org master_sites http://www.zope.org/Products/Zope/${version}/${version} dist_subdir zope distname Zope-2.7.0 extract.suffix .tgz checksums md5 f733cd97f32411d43d372ac61eed98f4 # Use Python 2.3 from DarwinPorts explicitly set python ${prefix}/bin/python2.3 # Default Zope User and Password. The password is changed from what is # printed durring the build, as the user will not see that by default. set zuser admin set zpasswd mypass # Location to install Zope and the Zope user set zopehome ${prefix}/libexec/Zope set zopeinst ${prefix}/www/Zope set zopeuser zope set zopegroup www depends_build bin:${python}:python23 platform darwin { depends_run path:/Library/StartupItems/DarwinPortsStartup:DarwinPortsStartup patchfiles patch-zdctl.py } platform freebsd { # FreeBSD calls it gtar, we call it gnutar... need a better solution # so we don't have to install gnutar from dports just for this if it # exists from FreeBSD ports depends_build-append bin:gnutar:gnutar } extract.post_args | gnutar -xf - configure.args --prefix=${zopehome} --with-python=${python} build.target default destroot.destdir PREFIX=${destroot}${zopehome} pre-destroot { adduser ${zopeuser} gid=[existsgroup ${zopegroup}] } post-destroot { system "chown -R ${zopeuser} ${destroot}${zopehome}" system "chgrp -R ${zopegroup} ${destroot}${zopehome}" system "${destroot}${zopehome}/bin/mkzopeinstance.py \ -u ${zuser}:${zpasswd} -d ${destroot}${zopeinst}" system "chown -R ${zopeuser} ${destroot}${zopeinst}" system "chgrp -R ${zopegroup} ${destroot}${zopeinst}" reinplace "s|^#\[ \t\]*effective-user.*$|&\\\neffective-user ${zopeuser}|" \ ${destroot}${zopeinst}/etc/zope.conf reinplace "s|${destroot}||g" \ ${destroot}${zopeinst}/bin/runzope \ ${destroot}${zopeinst}/bin/runzope.bat \ ${destroot}${zopeinst}/bin/zopectl \ ${destroot}${zopeinst}/bin/zopeservice.py \ ${destroot}${zopeinst}/etc/zope.conf xinstall -o ${zopeuser} -m 0644 ${filespath}/version.txt \ ${destroot}${zopehome}/lib/python reinplace "s|%%VERSION%%|${version}|g" \ ${destroot}${zopehome}/lib/python/version.txt xinstall -d -o root -m 0755 ${destroot}${prefix}/bin xinstall -o root -m 0755 ${filespath}/zopectl \ ${destroot}${prefix}/bin reinplace "s|%%ZOPEINST%%|${zopeinst}|g" \ ${destroot}${prefix}/bin/zopectl reinplace "s|%%ZOPEUSER%%|${zopeuser}|g" \ ${destroot}${prefix}/bin/zopectl xinstall -o root -m 755 -d ${destroot}${prefix}/etc/rc.d system "ln -s ../../bin/zopectl \ ${destroot}${prefix}/etc/rc.d/zope.sh" } post-install { ui_msg "${UI_PREFIX} The '${zuser}' user's password has \ been set to '${zpasswd}'. Please change it." }