source: trunk/dports/science/wview/Portfile @ 61517

Last change on this file since 61517 was 61517, checked in by macsforever2000@…, 8 years ago

Maintainer update to version 5.8.0. Changed installation behavior for config and database files. (#22875)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.6 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
2# $Id: Portfile 61517 2009-12-13 19:37:59Z macsforever2000@macports.org $
3
4PortSystem          1.0
5
6name                wview
7version             5.8.0
8categories          science
9maintainers         mac.com:mbrooksclark
10homepage            http://wviewweather.com/
11description         unix weather application that generates web sites
12
13long_description \
14  wview is a collection of linux/unix daemons that interface with a supported \
15  weather station to retrieve archive records (if generated by the station) and \
16  current conditions. The archive records are stored in an SQLite3 database. At a \
17  configurable interval, wview will utilize the archive history and current \
18  conditions to generate weather images (buckets, dials and graphs) and HTML web \
19  pages based on user-configurable HTML templates.
20
21platforms           darwin
22universal_variant   no
23use_autoconf        yes
24master_sites        sourceforge:wview
25
26depends_lib         port:gd2 port:radlib port:openssl port:libpng port:zlib \
27                    port:sqlite3 port:curl
28depends_build       port:gawk
29
30checksums           md5     22145b0f1ff4ba72828668430ead2dcd \
31                    sha1    80b95fa86740000a80d4dedb131aeaf48a6a15bc \
32                    rmd160  e5e3185ff6e28b437c4b0b2c894cf4cd6379cc3c
33
34configure.args      --enable-station-sim --enable-http
35
36destroot.violate_mtree
37
38post-destroot {
39  xinstall -d -o root -g wheel -m 755 ${destroot}/Library/StartupItems
40 
41  xinstall -d -o root -g wheel -m 755 \
42    ${worksrcpath}/examples/MacOSX/wview ${destroot}/Library/StartupItems/wview
43 
44  xinstall -o root -g wheel -m 755 ${worksrcpath}/examples/MacOSX/wview/wview \
45    ${destroot}/Library/StartupItems/wview/wview
46 
47  xinstall -o root -g wheel -m 644 \
48    ${worksrcpath}/examples/MacOSX/wview/StartupParameters.plist \
49    ${destroot}/Library/StartupItems/wview/StartupParameters.plist
50   
51  file rename ${destroot}${prefix}/var/wviewmgmt ${destroot}${prefix}/www/wviewmgmt
52 
53  reinplace "s|/etc/init.d/wview stop|/sbin/SystemStarter stop wview|" \
54    ${destroot}${prefix}/www/wviewmgmt/wview_control.php
55   
56  reinplace "s|/etc/init.d/wview start|/sbin/SystemStarter start wview|" \
57    ${destroot}${prefix}/www/wviewmgmt/wview_control.php
58   
59  reinplace "s|/etc/init.d/wview stop|/sbin/SystemStarter stop wview|" \
60    ${destroot}${prefix}/www/wviewmgmt/wview_upgrade.php
61 
62  file mkdir ${destroot}${prefix}/share/doc/${name}
63 
64  file mkdir ${destroot}${prefix}/share/${name}/etc
65 
66  file mkdir ${destroot}${prefix}/share/${name}/var
67 
68  file rename ${destroot}${prefix}/etc/${name} \
69    ${destroot}${prefix}/share/${name}/etc/${name}
70 
71  file rename ${destroot}${prefix}/var/${name} \
72    ${destroot}${prefix}/share/${name}/var/${name}
73 
74  file copy ${worksrcpath}/wview-Quick-Start-MacOSX.html \
75    ${destroot}${prefix}/share/doc/${name}/wview-Quick-Start-MacOSX.html
76 
77  file copy ${worksrcpath}/wview-Quick-Start.html \
78    ${destroot}${prefix}/share/doc/${name}/wview-Quick-Start.html
79 
80  file copy ${worksrcpath}/wview-User-Manual.html \
81    ${destroot}${prefix}/share/doc/${name}/wview-User-Manual.html
82 
83  file copy ${worksrcpath}/COPYING \
84    ${destroot}${prefix}/share/doc/${name}/COPYING
85 
86  file copy ${worksrcpath}/UPGRADE \
87    ${destroot}${prefix}/share/doc/${name}/UPGRADE
88}
89
90post-install {
91  if {![file exists ${prefix}/var/${name}]} {
92    file copy ${destroot}${prefix}/share/${name}/var/${name} ${prefix}/var/wview
93  }
94 
95  if {![file exists ${prefix}/etc/${name}/wview-conf.sdb]} {
96    file copy ${destroot}${prefix}/share/${name}/etc/${name} ${prefix}/etc/wview
97    file attributes ${prefix}/etc/wview -group www
98    file attributes ${prefix}/etc/${name}/wview-conf.sdb -group www
99  }
100 
101  file copy -force ${destroot}${prefix}/share/${name}/etc/${name}/wview-version \
102    ${prefix}/etc/wview/wview-version
103 
104  ui_msg "#####################################"
105  ui_msg "Run"
106  ui_msg "\tsudo ${prefix}/bin/wviewconfig"
107  ui_msg "\tsudo ${prefix}/bin/wviewhtmlconfig"
108  ui_msg "before launching wview\n"
109  ui_msg "#####################################"
110  ui_msg "html templates and config files are stored in"
111  ui_msg "\t${prefix}/etc/wview/\n"
112  ui_msg "archive files are stored in"
113  ui_msg "\t${prefix}/var/wview/\n"
114  ui_msg "#####################################"
115  ui_msg "wviewmgmt scripts are installed in"
116  ui_msg "\t${prefix}/www/wviewmgmt\n"
117  ui_msg "#####################################"
118  ui_msg "Start the daemons with the command:"
119  ui_msg "\tsudo /sbin/SystemStarter start wview\n"
120  ui_msg "#####################################"
121}
Note: See TracBrowser for help on using the repository browser.