Index: astro/Makefile =================================================================== --- astro/Makefile +++ astro/Makefile @@ -111,6 +111,7 @@ SUBDIR += wcslib SUBDIR += weather SUBDIR += weatherspect + SUBDIR += weewx SUBDIR += wmjupiter SUBDIR += wmmoonclock SUBDIR += wmsolar Index: astro/weewx/Makefile =================================================================== --- /dev/null +++ astro/weewx/Makefile @@ -0,0 +1,76 @@ +# $FreeBSD$ + +PORTNAME= weewx +PORTVERSION= 3.6.2 +CATEGORIES= astro www +MASTER_SITES= http://weewx.com/downloads/ + +MAINTAINER= asomers@FreeBSD.org +COMMENT= Open source software for your weather station + +LICENSE= GPLv3 +LICENSE_FILE= ${WRKSRC}/LICENSE.txt + +BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}configobj>0:devel/py-configobj +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}configobj>0:devel/py-configobj \ + cheetah:devel/py-cheetah \ + ${PYTHON_PKGNAMEPREFIX}pillow>0:graphics/py-pillow \ + ${LOCALBASE}/share/fonts/freefont-ttf/FreeMonoBold.ttf:x11-fonts/freefont-ttf \ + ${PYTHON_PKGNAMEPREFIX}sqlite3>0:databases/py-sqlite3 +# Note: weewx will run without pyephem, but almanac information will be more +# limited. +RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/ephem/__init__.py:astro/pyephem + +OPTIONS_DEFINE= DOCS EXAMPLES MYSQL USB SERIAL +OPTIONS_DEFAULT= DOCS EXAMPLES USB SERIAL +USB_DESC= USB-attached weather station support +SERIAL_DESC= Serial-attached weather station support + +MYSQL_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}MySQLdb>0:databases/py-MySQLdb +SERIAL_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}serial>0:comms/py-serial +USB_RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}usb>0:devel/py-usb + +NO_ARCH= yes +USES= python +USE_PYTHON= distutils +PYDISTUTILS_INSTALLNOSINGLE= yes +PYDISTUTILS_INSTALLARGS+= --no-prompt +USE_RC_SUBR= weewxd +SUB_LIST+= PYTHON_CMD="${PYTHON_CMD}" + +# These files all contain font paths that must be fixed +FONTFILES= extensions/basic/skins/basic/skin.conf \ + docs/usersguide.htm \ + skins/Standard/skin.conf + +post-patch: + @${REINPLACE_CMD} -e 's:%%STAGEDIR%%:${STAGEDIR}:g' ${WRKSRC}/setup.py + @${REINPLACE_CMD} -e 's:/home:${PREFIX}:g' ${WRKSRC}/setup.cfg +.for f in ${FONTFILES} + @${REINPLACE_CMD} -e 's:/usr/share/fonts/truetype/freefont:${LOCALBASE}/share/fonts/freefont-ttf:g;s:/usr/share/fonts/truetype/ttf-dejavu:${LOCALBASE}/share/fonts/dejavu:g' ${WRKSRC}/${f} +.endfor + +# Delete a bunch of files that aren't useful to us +post-install: + @${RM} -r ${STAGEDIR}${PREFIX}/weewx/util/init.d \ + ${STAGEDIR}${PREFIX}/weewx/util/launchd \ + ${STAGEDIR}${PREFIX}/weewx/util/systemd \ + ${STAGEDIR}${PREFIX}/weewx/util/udev + +post-install-DOCS-on: + @${MV} ${STAGEDIR}${PREFIX}/weewx/docs ${STAGEDIR}/${DOCSDIR} + +post-install-DOCS-off: + @${RM} -r ${STAGEDIR}${PREFIX}/weewx/docs + +post-install-EXAMPLES-on: + @${MKDIR} ${STAGEDIR}${EXAMPLESDIR} + @${MV} ${STAGEDIR}${PREFIX}/weewx/bin/examples ${STAGEDIR}${EXAMPLESDIR}/bin + @${MV} ${STAGEDIR}${PREFIX}/weewx/util/* ${STAGEDIR}${EXAMPLESDIR} + @${RMDIR} ${STAGEDIR}${PREFIX}/weewx/util + +post-install-EXAMPLES-off: + @${RM} -r ${STAGEDIR}${PRERFIX}/weewx/bin/examples \ + ${STAGEDIR}${PREFIX}/util + +.include Index: astro/weewx/distinfo =================================================================== --- /dev/null +++ astro/weewx/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1480607177 +SHA256 (weewx-3.6.2.tar.gz) = 8f1f3b7a5cec4565d0713c2a66c0ced0a063de0d4cfb58b8729885213c917f69 +SIZE (weewx-3.6.2.tar.gz) = 1091935 Index: astro/weewx/files/patch-setup.py =================================================================== --- /dev/null +++ astro/weewx/files/patch-setup.py @@ -0,0 +1,38 @@ +--- setup.py.orig 2016-03-11 16:07:38 UTC ++++ setup.py +@@ -166,7 +166,8 @@ class weewx_install_data(install_data): + % (f, e)) + + # The path where the weewx.conf configuration file will be installed +- install_path = os.path.join(install_dir, os.path.basename(f)) ++ real_install_dir = install_dir.replace("%%STAGEDIR%%", "", 1) ++ install_path = os.path.join(install_dir, os.path.basename(f)) + ".sample" + + # Do we have an old config file? + if os.path.isfile(install_path): +@@ -193,7 +194,7 @@ class weewx_install_data(install_data): + weecfg.modify_config(config_dict, stn_info, DEBUG) + + # Set the WEEWX_ROOT +- config_dict['WEEWX_ROOT'] = os.path.normpath(install_dir) ++ config_dict['WEEWX_ROOT'] = os.path.normpath(real_install_dir) + # Finally, reorder it to the canonical form + weecfg.reorder_to_ref(config_dict) + +@@ -220,6 +221,7 @@ class weewx_install_data(install_data): + + def massage_start_file(self, f, install_dir, **kwargs): + ++ real_install_dir = install_dir.replace("%%STAGEDIR%%", "", 1) + outname = os.path.join(install_dir, os.path.basename(f)) + sre = re.compile(r"WEEWX_ROOT\s*=") + +@@ -227,7 +229,7 @@ class weewx_install_data(install_data): + with tempfile.NamedTemporaryFile("w") as tmpfile: + for line in infile: + if sre.match(line): +- tmpfile.writelines("WEEWX_ROOT=%s\n" % self.install_dir) ++ tmpfile.writelines("WEEWX_ROOT=%s\n" % self.real_install_dir) + else: + tmpfile.writelines(line) + tmpfile.flush() Index: astro/weewx/files/weewxd.in =================================================================== --- /dev/null +++ astro/weewx/files/weewxd.in @@ -0,0 +1,31 @@ +#!/bin/sh + +# $FreeBSD$ +# +# PROVIDE: weewxd +# REQUIRE: LOGIN +# KEYWORD: shutdown +# +# Add this line to /etc/rc.conf or /etc/rc.conf.local to enable weewxd +# +# weewxd_enable (bool): Set to NO by default +# weewxd_config (path): Set to %%PREFIX%%/weewx/weewx.conf by default +# + +. /etc/rc.subr + +name=weewxd +rcvar=weewxd_enable +desc="Personal weather station recording and publishing daemon" + +load_rc_config $name + +: ${weewxd_enable:=NO} +: ${weewxd_config:=%%PREFIX%%/weewx/weewx.conf} + +command=%%PREFIX%%/weewx/bin/weewxd +command_interpreter=%%PYTHON_CMD%% +pidfile=/var/run/${name}.pid +command_args="$weewxd_config --daemon --pidfile=$pidfile" + +run_rc_command "$1" Index: astro/weewx/pkg-descr =================================================================== --- /dev/null +++ astro/weewx/pkg-descr @@ -0,0 +1,8 @@ +Open source software for your weather station + +The WeeWX weather system is written in Python and runs on Linux, MacOSX, +Solaris, and *BSD. It runs exceptionally well on a Raspberry Pi. It generates +plots, HTML pages, and monthly and yearly summary reports, which can be +uploaded to a web server. Thousands of users worldwide! + +WWW: http://weewx.com Index: astro/weewx/pkg-plist =================================================================== --- /dev/null +++ astro/weewx/pkg-plist @@ -0,0 +1,247 @@ +%%PORTDOCS%%%%DOCSDIR%%/changes.txt +%%PORTDOCS%%%%DOCSDIR%%/copyright.htm +%%PORTDOCS%%%%DOCSDIR%%/css/jquery.tocify.css +%%PORTDOCS%%%%DOCSDIR%%/css/ui-lightness/images/animated-overlay.gif +%%PORTDOCS%%%%DOCSDIR%%/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png +%%PORTDOCS%%%%DOCSDIR%%/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png +%%PORTDOCS%%%%DOCSDIR%%/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png +%%PORTDOCS%%%%DOCSDIR%%/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png +%%PORTDOCS%%%%DOCSDIR%%/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png +%%PORTDOCS%%%%DOCSDIR%%/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png +%%PORTDOCS%%%%DOCSDIR%%/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png +%%PORTDOCS%%%%DOCSDIR%%/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +%%PORTDOCS%%%%DOCSDIR%%/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +%%PORTDOCS%%%%DOCSDIR%%/css/ui-lightness/images/ui-icons_222222_256x240.png +%%PORTDOCS%%%%DOCSDIR%%/css/ui-lightness/images/ui-icons_228ef1_256x240.png +%%PORTDOCS%%%%DOCSDIR%%/css/ui-lightness/images/ui-icons_ef8c08_256x240.png +%%PORTDOCS%%%%DOCSDIR%%/css/ui-lightness/images/ui-icons_ffd27a_256x240.png +%%PORTDOCS%%%%DOCSDIR%%/css/ui-lightness/images/ui-icons_ffffff_256x240.png +%%PORTDOCS%%%%DOCSDIR%%/css/ui-lightness/jquery-ui-1.10.4.custom.css +%%PORTDOCS%%%%DOCSDIR%%/css/ui-lightness/jquery-ui-1.10.4.custom.min.css +%%PORTDOCS%%%%DOCSDIR%%/css/weewx_docs.css +%%PORTDOCS%%%%DOCSDIR%%/customizing.htm +%%PORTDOCS%%%%DOCSDIR%%/debian.htm +%%PORTDOCS%%%%DOCSDIR%%/hardware.htm +%%PORTDOCS%%%%DOCSDIR%%/images/day-gap-not-shown.png +%%PORTDOCS%%%%DOCSDIR%%/images/day-gap-showing.png +%%PORTDOCS%%%%DOCSDIR%%/images/daycompare.png +%%PORTDOCS%%%%DOCSDIR%%/images/daytemp_with_avg.png +%%PORTDOCS%%%%DOCSDIR%%/images/daywindvec.png +%%PORTDOCS%%%%DOCSDIR%%/images/ferrites.jpg +%%PORTDOCS%%%%DOCSDIR%%/images/funky_degree.png +%%PORTDOCS%%%%DOCSDIR%%/images/image_parts.png +%%PORTDOCS%%%%DOCSDIR%%/images/image_parts.xcf +%%PORTDOCS%%%%DOCSDIR%%/images/logo-apple.png +%%PORTDOCS%%%%DOCSDIR%%/images/logo-centos.png +%%PORTDOCS%%%%DOCSDIR%%/images/logo-debian.png +%%PORTDOCS%%%%DOCSDIR%%/images/logo-fedora.png +%%PORTDOCS%%%%DOCSDIR%%/images/logo-linux.png +%%PORTDOCS%%%%DOCSDIR%%/images/logo-mint.png +%%PORTDOCS%%%%DOCSDIR%%/images/logo-opensuse.png +%%PORTDOCS%%%%DOCSDIR%%/images/logo-redhat.png +%%PORTDOCS%%%%DOCSDIR%%/images/logo-suse.png +%%PORTDOCS%%%%DOCSDIR%%/images/logo-ubuntu.png +%%PORTDOCS%%%%DOCSDIR%%/images/logo-weewx.png +%%PORTDOCS%%%%DOCSDIR%%/images/sample_monthrain.png +%%PORTDOCS%%%%DOCSDIR%%/images/weekgustoverlay.png +%%PORTDOCS%%%%DOCSDIR%%/images/weektempdew.png +%%PORTDOCS%%%%DOCSDIR%%/images/yearhilow.png +%%PORTDOCS%%%%DOCSDIR%%/js/jquery-1.11.1.min.js +%%PORTDOCS%%%%DOCSDIR%%/js/jquery-ui-1.10.4.custom.min.js +%%PORTDOCS%%%%DOCSDIR%%/js/jquery.tocify-1.9.0.js +%%PORTDOCS%%%%DOCSDIR%%/js/jquery.tocify-1.9.0.min.js +%%PORTDOCS%%%%DOCSDIR%%/js/weewx.js +%%PORTDOCS%%%%DOCSDIR%%/macos.htm +%%PORTDOCS%%%%DOCSDIR%%/readme.htm +%%PORTDOCS%%%%DOCSDIR%%/redhat.htm +%%PORTDOCS%%%%DOCSDIR%%/setup.htm +%%PORTDOCS%%%%DOCSDIR%%/suse.htm +%%PORTDOCS%%%%DOCSDIR%%/upgrading.htm +%%PORTDOCS%%%%DOCSDIR%%/usersguide.htm +%%PORTDOCS%%%%DOCSDIR%%/utilities.htm +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/apache/conf.d/weewx.conf +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/bin/__init__.py +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/bin/__init__.pyc +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/bin/alarm.py +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/bin/alarm.pyc +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/bin/lowBattery.py +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/bin/lowBattery.pyc +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/bin/xsearch.py +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/bin/xsearch.pyc +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/import/csv-example.conf +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/import/cumulus-example.conf +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/import/wu-example.conf +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/logrotate.d/weewx +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/logwatch/conf/logfiles/weewx.conf +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/logwatch/conf/services/weewx.conf +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/logwatch/scripts/services/weewx +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/newsyslog.d/weewx.conf +%%PORTEXAMPLES%%%%EXAMPLESDIR%%/rsyslog.d/weewx.conf +weewx/LICENSE.txt +weewx/README +weewx/bin/daemon.py +weewx/bin/daemon.pyc +weewx/bin/schemas/__init__.py +weewx/bin/schemas/__init__.pyc +weewx/bin/schemas/wview.py +weewx/bin/schemas/wview.pyc +weewx/bin/user/__init__.py +weewx/bin/user/__init__.pyc +weewx/bin/user/extensions.py +weewx/bin/user/extensions.pyc +weewx/bin/wee_config +weewx/bin/wee_database +weewx/bin/wee_debug +weewx/bin/wee_device +weewx/bin/wee_extension +weewx/bin/wee_import +weewx/bin/wee_reports +weewx/bin/weecfg/__init__.py +weewx/bin/weecfg/__init__.pyc +weewx/bin/weecfg/config.py +weewx/bin/weecfg/config.pyc +weewx/bin/weecfg/extension.py +weewx/bin/weecfg/extension.pyc +weewx/bin/weedb/__init__.py +weewx/bin/weedb/__init__.pyc +weewx/bin/weedb/mysql.py +weewx/bin/weedb/mysql.pyc +weewx/bin/weedb/sqlite.py +weewx/bin/weedb/sqlite.pyc +weewx/bin/weeimport/__init__.py +weewx/bin/weeimport/__init__.pyc +weewx/bin/weeimport/csvimport.py +weewx/bin/weeimport/csvimport.pyc +weewx/bin/weeimport/cumulusimport.py +weewx/bin/weeimport/cumulusimport.pyc +weewx/bin/weeimport/weeimport.py +weewx/bin/weeimport/weeimport.pyc +weewx/bin/weeimport/wuimport.py +weewx/bin/weeimport/wuimport.pyc +weewx/bin/weeplot/__init__.py +weewx/bin/weeplot/__init__.pyc +weewx/bin/weeplot/genplot.py +weewx/bin/weeplot/genplot.pyc +weewx/bin/weeplot/utilities.py +weewx/bin/weeplot/utilities.pyc +weewx/bin/weeutil/Moon.py +weewx/bin/weeutil/Moon.pyc +weewx/bin/weeutil/Sun.py +weewx/bin/weeutil/Sun.pyc +weewx/bin/weeutil/__init__.py +weewx/bin/weeutil/__init__.pyc +weewx/bin/weeutil/ftpupload.py +weewx/bin/weeutil/ftpupload.pyc +weewx/bin/weeutil/rsyncupload.py +weewx/bin/weeutil/rsyncupload.pyc +weewx/bin/weeutil/weeutil.py +weewx/bin/weeutil/weeutil.pyc +weewx/bin/weewx-3.6.2-py%%PYTHON_VER%%.egg-info/PKG-INFO +weewx/bin/weewx-3.6.2-py%%PYTHON_VER%%.egg-info/SOURCES.txt +weewx/bin/weewx-3.6.2-py%%PYTHON_VER%%.egg-info/dependency_links.txt +weewx/bin/weewx-3.6.2-py%%PYTHON_VER%%.egg-info/top_level.txt +weewx/bin/weewx/__init__.py +weewx/bin/weewx/__init__.pyc +weewx/bin/weewx/accum.py +weewx/bin/weewx/accum.pyc +weewx/bin/weewx/almanac.py +weewx/bin/weewx/almanac.pyc +weewx/bin/weewx/cheetahgenerator.py +weewx/bin/weewx/cheetahgenerator.pyc +weewx/bin/weewx/crc16.py +weewx/bin/weewx/crc16.pyc +weewx/bin/weewx/drivers/__init__.py +weewx/bin/weewx/drivers/__init__.pyc +weewx/bin/weewx/drivers/acurite.py +weewx/bin/weewx/drivers/acurite.pyc +weewx/bin/weewx/drivers/cc3000.py +weewx/bin/weewx/drivers/cc3000.pyc +weewx/bin/weewx/drivers/fousb.py +weewx/bin/weewx/drivers/fousb.pyc +weewx/bin/weewx/drivers/simulator.py +weewx/bin/weewx/drivers/simulator.pyc +weewx/bin/weewx/drivers/te923.py +weewx/bin/weewx/drivers/te923.pyc +weewx/bin/weewx/drivers/ultimeter.py +weewx/bin/weewx/drivers/ultimeter.pyc +weewx/bin/weewx/drivers/vantage.py +weewx/bin/weewx/drivers/vantage.pyc +weewx/bin/weewx/drivers/wmr100.py +weewx/bin/weewx/drivers/wmr100.pyc +weewx/bin/weewx/drivers/wmr200.py +weewx/bin/weewx/drivers/wmr200.pyc +weewx/bin/weewx/drivers/wmr300.py +weewx/bin/weewx/drivers/wmr300.pyc +weewx/bin/weewx/drivers/wmr9x8.py +weewx/bin/weewx/drivers/wmr9x8.pyc +weewx/bin/weewx/drivers/ws1.py +weewx/bin/weewx/drivers/ws1.pyc +weewx/bin/weewx/drivers/ws23xx.py +weewx/bin/weewx/drivers/ws23xx.pyc +weewx/bin/weewx/drivers/ws28xx.py +weewx/bin/weewx/drivers/ws28xx.pyc +weewx/bin/weewx/engine.py +weewx/bin/weewx/engine.pyc +weewx/bin/weewx/filegenerator.py +weewx/bin/weewx/filegenerator.pyc +weewx/bin/weewx/imagegenerator.py +weewx/bin/weewx/imagegenerator.pyc +weewx/bin/weewx/manager.py +weewx/bin/weewx/manager.pyc +weewx/bin/weewx/qc.py +weewx/bin/weewx/qc.pyc +weewx/bin/weewx/reportengine.py +weewx/bin/weewx/reportengine.pyc +weewx/bin/weewx/restx.py +weewx/bin/weewx/restx.pyc +weewx/bin/weewx/station.py +weewx/bin/weewx/station.pyc +weewx/bin/weewx/tags.py +weewx/bin/weewx/tags.pyc +weewx/bin/weewx/units.py +weewx/bin/weewx/units.pyc +weewx/bin/weewx/uwxutils.py +weewx/bin/weewx/uwxutils.pyc +weewx/bin/weewx/wxengine.py +weewx/bin/weewx/wxengine.pyc +weewx/bin/weewx/wxformulas.py +weewx/bin/weewx/wxformulas.pyc +weewx/bin/weewx/wxmanager.py +weewx/bin/weewx/wxmanager.pyc +weewx/bin/weewx/wxservices.py +weewx/bin/weewx/wxservices.pyc +weewx/bin/weewxd +weewx/bin/wunderfixer +weewx/skins/Ftp/skin.conf +weewx/skins/Rsync/skin.conf +weewx/skins/Standard/NOAA/NOAA-YYYY-MM.txt.tmpl +weewx/skins/Standard/NOAA/NOAA-YYYY.txt.tmpl +weewx/skins/Standard/RSS/weewx_rss.xml.tmpl +weewx/skins/Standard/backgrounds/band.gif +weewx/skins/Standard/backgrounds/butterfly.jpg +weewx/skins/Standard/backgrounds/drops.gif +weewx/skins/Standard/backgrounds/flower.jpg +weewx/skins/Standard/backgrounds/leaf.jpg +weewx/skins/Standard/backgrounds/night.gif +weewx/skins/Standard/favicon.ico +weewx/skins/Standard/index.html.tmpl +weewx/skins/Standard/mobile.css +weewx/skins/Standard/mobile.html.tmpl +weewx/skins/Standard/month.html.tmpl +weewx/skins/Standard/skin.conf +weewx/skins/Standard/smartphone/barometer.html.tmpl +weewx/skins/Standard/smartphone/custom.js +weewx/skins/Standard/smartphone/humidity.html.tmpl +weewx/skins/Standard/smartphone/icons/icon_ipad_x1.png +weewx/skins/Standard/smartphone/icons/icon_ipad_x2.png +weewx/skins/Standard/smartphone/icons/icon_iphone_x1.png +weewx/skins/Standard/smartphone/icons/icon_iphone_x2.png +weewx/skins/Standard/smartphone/index.html.tmpl +weewx/skins/Standard/smartphone/radar.html.tmpl +weewx/skins/Standard/smartphone/rain.html.tmpl +weewx/skins/Standard/smartphone/temp_outside.html.tmpl +weewx/skins/Standard/smartphone/wind.html.tmpl +weewx/skins/Standard/week.html.tmpl +weewx/skins/Standard/weewx.css +weewx/skins/Standard/year.html.tmpl +@sample weewx/weewx.conf.sample