Ticket #15972: Portfile

File Portfile, 3.9 KB (added by mbrooksclark@…, 16 years ago)
Line 
1# $Id&
2
3PortSystem      1.0
4
5name            wview
6
7version         4.0.1
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 1042769d7c94395bcc3732de7c1c8e87 \
34                 sha1 949c76e1a2179eedb7104a7b28a526d4e4ffe953 \
35                 rmd160 86e581f2d9779650d0189b0dbfb068b71b5affc8
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 wmr918    description { Support for the for the Oregon Scientific WMR918/968 WX Station} {
67  configure.args-append --enable-station-wmr918
68}
69
70variant sim       description { Support for the Simulated WX Station } {
71  configure.args-append --enable-station-sim
72}
73
74variant http      description { Enable support for uploading data to Weather Underground } {
75  configure.args-append --enable-http
76  depends_lib-append port:curl
77}
78
79destroot.violate_mtree
80
81post-destroot {
82  xinstall -d -o root -g wheel -m 755 \
83    ${worksrcpath}/examples/MacOSX/wview ${destroot}/Library/StartupItems/wview
84
85  xinstall -o root -g wheel -m 755 ${worksrcpath}/examples/MacOSX/wview/wview \
86    ${destroot}/Library/StartupItems/wview/wview
87
88  xinstall -o root -g wheel -m 644 \
89    ${worksrcpath}/examples/MacOSX/wview/StartupParameters.plist \
90    ${destroot}/Library/StartupItems/wview/StartupParameters.plist
91
92
93  file mkdir ${destroot}${prefix}/share/doc/${name}
94
95  file copy ${worksrcpath}/wview-Quick-Start-MacOSX.html \
96    ${destroot}${prefix}/share/doc/${name}/wview-Quick-Start-MacOSX.html
97
98  file copy ${worksrcpath}/wview-Quick-Start.html \
99    ${destroot}${prefix}/share/doc/${name}/wview-Quick-Start.html
100
101  file copy ${worksrcpath}/wview-User-Manual.html \
102    ${destroot}${prefix}/share/doc/${name}/wview-User-Manual.html
103
104  file copy ${worksrcpath}/COPYING \
105    ${destroot}${prefix}/share/doc/${name}/COPYING
106
107  file copy ${worksrcpath}/UPGRADE \
108    ${destroot}${prefix}/share/doc/${name}/UPGRADE
109
110
111}
112
113post-install {
114  ui_msg "\n#####################################"
115  ui_msg "Run\n"
116  ui_msg "\tsudo ${prefix}/bin/wviewconfig and\n"
117  ui_msg "\tsudo ${prefix}/bin/wviewhtmlconfig\n"
118  ui_msg "before launching wview\n"
119  ui_msg "\n#####################################"
120  ui_msg "html templates and config files are stored in ${prefix}/etc/wview/\n"
121  ui_msg "archive files are stored in ${prefix}/var/wview/\n"
122  ui_msg "\n#####################################"
123  ui_msg "Start the daemons with the command:\n"
124  ui_msg "\tsudo /sbin/SystemStarter start wview\n"
125  ui_msg "\n#####################################"
126}