1 | # -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 |
---|
2 | # $Id$ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | name naviserver |
---|
7 | version 4.99.8 |
---|
8 | revision 0 |
---|
9 | categories www |
---|
10 | maintainers wu.ac.at:neumann |
---|
11 | description NaviServer is a high performance web server written in C (extensible in Tcl) |
---|
12 | long_description \ |
---|
13 | NaviServer is a versatile multiprotocol (http et al) server written in C/Tcl. \ |
---|
14 | It can be extended in either language to create interesting web sites and \ |
---|
15 | internet based services. NaviServer is a derivative from AOLserver and differs \ |
---|
16 | from it through multiprotocol support and various functional improvements (e.g. multiple \ |
---|
17 | reader and writer threads, more built-in functionality, better statistics, etc.) |
---|
18 | homepage https://sourceforge.net/projects/naviserver/ |
---|
19 | platforms darwin |
---|
20 | license MPL-1.1 |
---|
21 | |
---|
22 | distname ${name}-${version} |
---|
23 | distfiles ${distname}.tar.gz |
---|
24 | |
---|
25 | master_sites \ |
---|
26 | sourceforge:project/naviserver/naviserver/${version} |
---|
27 | |
---|
28 | checksums \ |
---|
29 | md5 1db9e1c28e1768ad09fb9483f0692935 \ |
---|
30 | sha1 79934115e96f29cd176a60ab63ed7ca4d98b3664 \ |
---|
31 | rmd160 6a898a55453ffcf5bd1b9923eea5bd08d140a8cf |
---|
32 | |
---|
33 | depends_lib port:tcl port:nsf |
---|
34 | depends_run port:wget ;# actually, just for the simple installer from bitbucket |
---|
35 | |
---|
36 | worksrcdir ${name}-${version} |
---|
37 | set ns_user nsadmin |
---|
38 | set ns_group nsadmin |
---|
39 | |
---|
40 | set nsdir ${prefix}/ns |
---|
41 | set logdir ${prefix}/var/log/ns |
---|
42 | |
---|
43 | configure.pre_args --prefix=${prefix}/ns |
---|
44 | configure.args --with-tcl=${prefix}/lib --enable-symbols |
---|
45 | configure.env TCLSH=${prefix}/bin/tclsh |
---|
46 | |
---|
47 | add_users ${ns_user} shell=/usr/bin/false group=${ns_group} home=${nsdir} "realname=NaviServer Admin" |
---|
48 | |
---|
49 | set servername plain |
---|
50 | set pidfile ${logdir}/nsd-${servername}.pid |
---|
51 | set configfile ${nsdir}/conf/${servername}-config.tcl |
---|
52 | |
---|
53 | pre-destroot { |
---|
54 | xinstall -m 755 -d ${nsdir} |
---|
55 | xinstall -m 755 -d ${logdir} |
---|
56 | } |
---|
57 | |
---|
58 | post-destroot { |
---|
59 | file attributes ${logdir} -group ${ns_group} -owner ${ns_user} |
---|
60 | file attributes ${nsdir} -group ${ns_group} -owner ${ns_user} |
---|
61 | } |
---|
62 | |
---|
63 | post-install { |
---|
64 | if {![file exists $configfile]} { |
---|
65 | file mkdir [file dirname $configfile] |
---|
66 | file copy ${destroot}${nsdir}/conf/sample-config.tcl $configfile |
---|
67 | reinplace "s|server1|$servername|g" ${configfile} |
---|
68 | } |
---|
69 | } |
---|
70 | startupitem.create yes |
---|
71 | startupitem.start "${nsdir}/bin/nsd -t ${configfile} -i -u ${ns_user} -g ${ns_group}" |
---|
72 | startupitem.pidfile auto ${pidfile} |
---|
73 | startupitem.stop "kill \$(cat ${pidfile})" |
---|
74 | |
---|
75 | destroot.violate_mtree yes |
---|
76 | |
---|
77 | notes [subst { |
---|
78 | NaviServer ${version} was installed into ${nsdir}/. The instance |
---|
79 | $servername can be started/stopped on your local machine: |
---|
80 | |
---|
81 | sudo port load naviserver |
---|
82 | sudo port unload naviserver |
---|
83 | |
---|
84 | When the server is running, once can browse the default pages |
---|
85 | via http://127.0.0.1:8080/ |
---|
86 | |
---|
87 | The server is logging per default into the directory ${logdir}/ |
---|
88 | Now, you might wish to configure the server according to your |
---|
89 | needs by altering ${configfile}. Consult the alternate |
---|
90 | configuration files in ${nsdir}/conf/ as a reference. |
---|
91 | |
---|
92 | }] |
---|
93 | |
---|
94 | #livecheck.regex NaviServer (\[^ \]+) released |
---|