Ticket #14962: Portfile

File Portfile, 3.8 KB (added by mbrooksclark@…, 16 years ago)

wview3.8.0 portfile

Line 
1# $Id&
2
3PortSystem      1.0
4
5name            wview
6
7version         3.8.0
8
9revision        1
10
11categories      science
12
13maintainers     mac.com:mbrooksclark
14
15homepage        http://wviewweather.com/
16
17description     Daemons that download and archive data from supported weather stations
18
19long_description \
20  wview is a unix application for weather stations. It archives weather \
21  data from the station. Generates full html web sites with graphics. \
22  ftp/ssh export capability. MySQL/PostgreSQL archiving. International. \
23  Weather alarms. Data feed. RSS feed. Stations currently supported include: \
24  Davis Vantage Pro/Pro2, Vaisala WXT-510, La Crosse WS-2300, and a \
25  weather station simulator.
26
27platforms        darwin
28
29master_sites     sourceforge:wview
30
31depends_lib      port:gd2 port:radlib
32
33checksums        md5 9554fd283b2d8f39d3ba703a234a2b06 \
34                 sha1 63570b77279d013d86c1d5b5b82d474480fb9b80 \
35                 rmd160 dda1d379250731d726676a9e7d99df624d1fd5e0
36
37configure.args   --exec-prefix=${prefix}
38
39variant env      description { Install config files and templates (first time install) } {
40  destroot.target-append install-env
41}
42
43variant mysql5  description { Includes mySQL5 database support } {
44  configure.args-append --enable-mysql
45  configure.ldflags-append  -L${prefix}/lib/mysql5/mysql
46  depends_lib-append port:mysql5
47}
48
49variant pgresql   description { Includes Postgresql database support } {
50  configure.args-append --enable-pgresql
51  depends_lib-append port:postgresql83
52}
53
54variant vpro      description { Support for Davis Vantage Pro WX Station } {
55  configure.args-append --enable-station-vp2
56}
57
58variant wxt510    description { Support for Vaisala WXT-510 WX Station } {
59  configure.args-append --enable-station-wxt510
60}
61
62variant ws2300    description { Support for the La Crosse WS-2300 series stations } {
63  configure.args-append --enable-station-ws2300
64}
65
66variant sim       description { Support for the Simulated WX Station } {
67  configure.args-append --enable-station-sim
68}
69
70variant http      description { Enable support for uploading data to Weather Underground } {
71  configure.args-append --enable-http
72  depends_lib-append port:curl
73}
74
75destroot.violate_mtree
76
77post-destroot {
78  xinstall -d -o root -g wheel -m 755 \
79    ${worksrcpath}/examples/MacOSX/wview ${destroot}/Library/StartupItems/wview
80
81  xinstall -o root -g wheel -m 755 ${worksrcpath}/examples/MacOSX/wview/wview \
82    ${destroot}/Library/StartupItems/wview/wview
83
84  xinstall -o root -g wheel -m 644 \
85    ${worksrcpath}/examples/MacOSX/wview/StartupParameters.plist \
86    ${destroot}/Library/StartupItems/wview/StartupParameters.plist
87
88
89  file mkdir ${destroot}${prefix}/share/doc/${name}
90
91  file copy ${worksrcpath}/wview-Quick-Start-MacOSX.html \
92    ${destroot}${prefix}/share/doc/${name}/wview-Quick-Start-MacOSX.html
93
94  file copy ${worksrcpath}/wview-Quick-Start.html \
95    ${destroot}${prefix}/share/doc/${name}/wview-Quick-Start.html
96
97  file copy ${worksrcpath}/wview-User-Manual.html \
98    ${destroot}${prefix}/share/doc/${name}/wview-User-Manual.html
99
100  file copy ${worksrcpath}/COPYING \
101    ${destroot}${prefix}/share/doc/${name}/COPYING
102
103  file copy ${worksrcpath}/UPGRADE \
104    ${destroot}${prefix}/share/doc/${name}/UPGRADE
105
106
107}
108
109post-install {
110  ui_msg "\n#####################################"
111  ui_msg "Run\n"
112  ui_msg "\tsudo ${prefix}/bin/wviewconfig and\n"
113  ui_msg "\tsudo ${prefix}/bin/wviewhtmlconfig\n"
114  ui_msg "before launching wview\n"
115  ui_msg "\n#####################################"
116  ui_msg "html templates and config files are stored in ${prefix}/etc/wview/\n"
117  ui_msg "archive files are stored in ${prefix}/var/wview/\n"
118  ui_msg "\n#####################################"
119  ui_msg "Start the daemons with the command:\n"
120  ui_msg "\tsudo /sbin/SystemStarter start wview\n"
121  ui_msg "\n#####################################"
122}