# $Id: Portfile,v 1.1 2004/02/16 00:28:49 rshaw Exp $ PortSystem 1.0 name zope-usersniffer version 1.21 categories www python zope maintainers rshaw@opendarwin.org description Zope extension that returns remote client info long_description Zope extension that returns client info based upon \ REMOTE_USER_AGENT. Used primarly for ZopeEditManager \ support on Mac OS X. platforms darwin freebsd homepage http://www.zope.org/Members/svenasse/UserSniffer master_sites http://zope.org/Members/svenasse/UserSniffer/${version} dist_subdir zope/${name} distname UserSniffer extract.suffix .tgz distfiles ${distname}${extract.suffix} checksums md5 db661c65c07cd5f60df67ca7104781f2 # Use Python 2.3 from DarwinPorts explicitly set python ${prefix}/bin/python2.3 # Location to install Zope extensions and the Zope user set zopehome ${prefix}/libexec/Zope set zopeinst ${prefix}/www/Zope set zopeext ${zopeinst}/Extensions set zopeuser zope set zopegroup www # Depends on Zope depends_build path:${zopehome}:zope platform freebsd { extract.post_args | gtar -xf - } use_configure no pre-build { file copy ${zopehome}/bin/compilezpy.py ${workpath} reinplace "s|^.*sys.stdout|#&|" ${workpath}/compilezpy.py } build { system "cd ${workpath} && ${python} ${workpath}/compilezpy.py" } destroot { if {$env(USER) != "root"} { ui_msg "------------------------------------------------------------" ui_msg "Note that you are not installing as root, so files installed" ui_msg "by this port will not end up with proper ownership and" ui_msg "likely not work correctly with Zope." ui_msg "------------------------------------------------------------" } # Install products xinstall -d -m 0755 ${destroot}${zopeext} system "cp -R ${workpath}/${distname}.* ${destroot}${zopeext}" if {$env(USER) == "root"} { system "chown -R ${zopeuser} ${destroot}${zopeinst}" system "chgrp -R ${zopegroup} ${destroot}${zopeinst}" } ui_msg "------------------------------------------------------------" ui_msg "To complete the installation, you must add an External" ui_msg "Method object to your Zope instance with the following" ui_msg "attributes:" ui_msg "" ui_msg "\tId: UserSniffer" ui_msg "\tModule Name: UserSniffer" ui_msg "\tFunction Name: UserSniffer" ui_msg "" ui_msg "See ${zopeext}/${distname}.py for further details." ui_msg "------------------------------------------------------------" }