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

Last change on this file since 109415 was 109415, checked in by ryandesign@…, 7 years ago

revbump ports that link with libgd in their default configuration to rebuild with gd2 @2.1.0 (libgd.3.dylib) (#39550)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.8 KB
Line 
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: Portfile 109415 2013-08-15 06:58:50Z ryandesign@macports.org $
3
4PortSystem          1.0
5
6name                wview
7version             5.20.2
8revision            2
9categories          science
10maintainers         macports.org:mbclark
11homepage            http://wviewweather.com/
12license             GPL-2
13description         unix weather application that generates web sites
14
15long_description \
16  wview is a collection of linux/unix daemons that interface with a supported \
17  weather station to retrieve archive records (if generated by the station) and \
18  current conditions. The archive records are stored in an SQLite3 database. At a \
19  configurable interval, wview will utilize the archive history and current \
20  conditions to generate weather images (buckets, dials and graphs) and HTML web \
21  pages based on user-configurable HTML templates.
22
23platforms           darwin
24use_autoconf        yes
25master_sites        sourceforge:wview
26
27depends_lib         port:gd2 port:radlib port:openssl port:libpng port:zlib \
28                    port:sqlite3 port:curl port:gawk
29
30checksums           md5     7be3cd77bc1b6b0c542561481250f49f \
31                    sha1    118592938eed2b8628f9aada8a604f50bd843d10 \
32                    rmd160  cd5731654814a10b211e0a91ff8e52c311c04ee4
33
34destroot.violate_mtree
35
36post-destroot {
37  xinstall -d -o root -g wheel -m 755 ${destroot}/Library/StartupItems
38
39  xinstall -d -o root -g wheel -m 755 \
40    ${worksrcpath}/examples/MacOSX/wview ${destroot}/Library/StartupItems/wview
41
42  xinstall -o root -g wheel -m 755 ${worksrcpath}/examples/MacOSX/wview/wview \
43    ${destroot}/Library/StartupItems/wview/wview
44
45  xinstall -o root -g wheel -m 644 \
46    ${worksrcpath}/examples/MacOSX/wview/StartupParameters.plist \
47    ${destroot}/Library/StartupItems/wview/StartupParameters.plist
48
49  file rename ${destroot}${prefix}/var/wviewmgmt ${destroot}${prefix}/www/wviewmgmt
50
51  reinplace "s|/etc/init.d/wview stop|/sbin/SystemStarter stop wview|" \
52    ${destroot}${prefix}/www/wviewmgmt/wview_control.php
53
54  reinplace "s|/etc/init.d/wview start|/sbin/SystemStarter start wview|" \
55    ${destroot}${prefix}/www/wviewmgmt/wview_control.php
56
57  reinplace "s|/etc/init.d/wview stop|/sbin/SystemStarter stop wview|" \
58    ${destroot}${prefix}/www/wviewmgmt/wview_upgrade.php
59
60  file mkdir ${destroot}${prefix}/share/${name}
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 mkdir ${destroot}${prefix}/share/${name}/examples
69
70  file rename ${destroot}${prefix}/etc/${name} \
71    ${destroot}${prefix}/share/${name}/etc/${name}
72
73  file rename ${destroot}${prefix}/var/${name} \
74    ${destroot}${prefix}/share/${name}/var/${name}
75
76  file copy ${worksrcpath}/examples/conf \
77    ${destroot}${prefix}/share/${name}/examples/conf
78
79  file copy ${worksrcpath}/wview-Quick-Start-MacOSX.html \
80    ${destroot}${prefix}/share/doc/${name}/wview-Quick-Start-MacOSX.html
81
82  file copy ${worksrcpath}/wview-Quick-Start.html \
83    ${destroot}${prefix}/share/doc/${name}/wview-Quick-Start.html
84
85  file copy ${worksrcpath}/wview-User-Manual.html \
86    ${destroot}${prefix}/share/doc/${name}/wview-User-Manual.html
87
88  file copy ${worksrcpath}/COPYING \
89    ${destroot}${prefix}/share/doc/${name}/COPYING
90
91  file copy ${worksrcpath}/UPGRADE \
92    ${destroot}${prefix}/share/doc/${name}/UPGRADE
93}
94
95post-install {
96  if {![file exists ${prefix}/var/${name}]} {
97    file copy ${destroot}${prefix}/share/${name}/var/${name} ${prefix}/var/wview
98  }
99
100  if {![file exists ${prefix}/etc/${name}/wview-conf.sdb]} {
101    file copy ${destroot}${prefix}/share/${name}/etc/${name} ${prefix}/etc/wview
102    file attributes ${prefix}/etc/wview -group www -permissions rwxrwxr-x
103    file attributes ${prefix}/etc/${name}/wview-conf.sdb -group www -permissions rw-rw-r--
104  } else {
105    file copy -force ${destroot}${prefix}/share/${name}/etc/${name}/wview-conf-update.sql \
106      ${prefix}/etc/${name}/wview-conf-update.sql
107    exec sqlite3 ${prefix}/etc/${name}/wview-conf.sdb <  ${prefix}/etc/${name}/wview-conf-update.sql
108  }
109
110  file copy -force ${destroot}${prefix}/share/${name}/etc/${name}/wview-version \
111    ${prefix}/etc/wview/wview-version
112}
113
114notes "#####################################
115  Run
116    sudo ${prefix}/bin/wviewconfig
117    sudo ${prefix}/bin/wviewhtmlconfig
118  before launching wview
119#####################################
120  html templates and config files are stored in
121    ${prefix}/etc/wview/
122  archive files are stored in
123    ${prefix}/var/wview/
124#####################################
125  wviewmgmt scripts are installed in
126    ${prefix}/www/wviewmgmt
127#####################################
128  Start the daemons with the command:
129    sudo /sbin/SystemStarter start wview
130#####################################"
131
Note: See TracBrowser for help on using the repository browser.