Opened 20 years ago
Closed 19 years ago
#2188 closed defect (invalid)
NEW: py-webware-0.8.1
Reported by: | opendarwin.nospam@… | Owned by: | mww@… |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.0 |
Keywords: | Cc: | ||
Port: |
Description
py-webware-0.8.1
the portfile can be found here: INLINE
Description: Python Web Application Toolkit
Homepage: http://www.webwareforpython.org
Comments: - ${destroot}${prefix}/${name} is possibly not the proper choice to put the package but didn't know better
- includes fix for bug in mod_webkit2 apache module (from cvs)
- mod_webkit2 is the recommended adapter according to the developers, so i decided to
install it by default instead of making it a variant
================INLINE CONTENT================ # $Id: $ PortSystem 1.0 PortGroup python 1.0 name py-webware version 0.8.1 categories-append www platforms darwin maintainers opendarwin.nospam@… description Python Web Application Toolkit long_description Webware for Python is a suite of software components for \
developing object-oriented, web-based applications. The \ suite uses well known design patterns and includes \ popular features such as a fast application server, \ Python Server Pages (PSP), and a CGI wrapper.
homepage http://www.webwareforpython.org/ master_sites sourceforge:webware distname Webware-${version} checksums md5 e3db25f18891a41ebcc58e1d6df7bc10
depends_lib-append path:${prefix}/apache2/bin/apxs:apache2 \
path:/Library/StartupItems/DarwinPortsStartup:DarwinPortsStartup
build.dir ${worksrcpath}/WebKit/Adapters/mod_webkit2 build.cmd make build.target all
destroot.dir ${worksrcpath} destroot.cmd ${python.bin} install.py destroot.args --password-prompt=no destroot.target destroot.destdir
pre-build {
cd ${worksrcpath}/WebKit/Adapters/mod_webkit2 reinplace "s|/usr/local|${prefix}|g" Makefile
# fix from cvs for bug in mod_webkit2 ( http://tinyurl.com/5wq7 ) reinplace "394a
\ndata += aprlen;\n\n" mod_webkit.c
}
post-destroot {
# adapt startup script for Darwin and DP # sorry about messing that much with reinplace, by the way # a simple patch file would probably be more appropriate here # but i was in the mood for utilizing what i just learned about sed reinplace "s|/opt/Webware|${prefix}/${name}|g" \
${worksrcpath}/WebKit/webkit
reinplace "s|/var/run|${prefix}/var/run|g" ${worksrcpath}/WebKit/webkit reinplace "s|/var/log|${prefix}/var/log|g" ${worksrcpath}/WebKit/webkit reinplace "47s|python|${python.bin}|" ${worksrcpath}/WebKit/webkit reinplace "50h;50G" ${worksrcpath}/WebKit/webkit reinplace "51s|
(\[\[:space:\]\]*
).*$|
1chown www:www \$LOG|" \${worksrcpath}/WebKit/webkit
reinplace "54s|
(\[\[:space:\]\]*
)
(.*
)$|
1#
2|" \${worksrcpath}/WebKit/webkit
reinplace "56s|webware|www|" ${worksrcpath}/WebKit/webkit reinplace "57s|#.*|sudo -u www \$LAUNCH >> \$LOG 2>
&1
&|" \${worksrcpath}/WebKit/webkit
# make sure these two directories exist # otherwise startup script won't run xinstall -d -m 0755 ${destroot}${prefix}/var/run xinstall -d -m 0755 ${destroot}${prefix}/var/log system "touch ${destroot}${prefix}/var/run/.turd" system "touch ${destroot}${prefix}/var/log/.turd"
# install startup script where DarwinPortsStartup can find it xinstall -d -m 0755 ${destroot}${prefix}/etc/rc.d xinstall -m 0755 ${worksrcpath}/WebKit/webkit \
${destroot}${prefix}/etc/rc.d
file rename ${destroot}${prefix}/etc/rc.d/webkit \
${destroot}${prefix}/etc/rc.d/webkit.sh
# Webware by itself keeps everything in place # nothing is moved outside the source dir during installation actually # so we have to take care of it ourselves and copy the whole stuff to destroot file copy ${worksrcpath} \
${destroot}${prefix}/${name}
# fix permissions so that webserver gets write access where required file attributes ${destroot}${prefix}/${name}/WebKit/Cache \
-group www -owner www
file attributes ${destroot}${prefix}/${name}/WebKit/ErrorMsgs \
-group www -owner www
file attributes ${destroot}${prefix}/${name}/WebKit/Logs \
-group www -owner www
file attributes ${destroot}${prefix}/${name}/WebKit/Sessions \
-group www -owner www
system "touch ${destroot}${prefix}/${name}/WebKit/address.text" file attributes ${destroot}${prefix}/${name}/WebKit/address.text \
-group www -owner www
system "touch ${destroot}${prefix}/${name}/WebKit/appserverpid.txt" file attributes ${destroot}${prefix}/${name}/WebKit/appserverpid.txt \
-group www -owner www
# install mod_webkit2 for use with apache2 cd ${worksrcpath}/WebKit/Adapters/mod_webkit2 xinstall -d -m 0755 ${destroot}${prefix}/apache2/modules xinstall -m 0644 .libs/mod_webkit.so \ ${destroot}${prefix}/apache2/modules
}
post-install {
ui_msg "########################################################" ui_msg "# A password was autogenerated; check the file:" ui_msg "# ${prefix}/${name}/WebKit/Configs/Application.config" ui_msg "########################################################" ui_msg "" ui_msg "########################################################" ui_msg "# You can find more information at:" ui_msg "# * ${prefix}/${name}/Docs/index.html (e.g., local docs)" ui_msg "# * http://webware.sourceforge.net" ui_msg "########################################################" ui_msg "" ui_msg "########################################################" ui_msg "# to enable mod_webkit add" ui_msg "# LoadModule webkit_module modules/mod_webkit.so" ui_msg "# to your apache2 config file:" ui_msg "# ${prefix}/apache2/conf/httpd.conf" ui_msg "# you must also add something like this" ui_msg "# <Location /WK>" ui_msg "# WKServer 127.0.0.1 8086" ui_msg "# SetHandler webkit-handler" ui_msg "# </Location>" ui_msg "########################################################"
}
Change History (5)
comment:1 Changed 20 years ago by olegb@…
Owner: | changed from darwinports-bugs@… to mww@… |
---|
comment:2 Changed 20 years ago by mww@…
- using ${destroot}${prefix}/var/run/.turd and log/.turd is a bad idea as many ports use these dirs,
resulting in conflicting files; if possible, just 'touch' something like var/run/webkit.log or make a subdir for the pid file.
- please use a patch instead of the reinplaces in post-destroot - in half a year no one will remember
what they should do..
comment:3 Changed 20 years ago by mww@…
oh and while at it: do you really _need_ DarwinPortsStartup? Or can it be (also) sufficient to just start it manually?
comment:4 Changed 19 years ago by opendarwin.nospam@…
i do not use the software any longer. so, i have no plans to revise the portfile. feel free to close the bug.
comment:5 Changed 19 years ago by mww@…
Resolution: | → invalid |
---|---|
Status: | new → closed |
assigning to da master of python, mww@