Signed-off-by: Paul Fertser <[email protected]>
---
This patch might be a bit problematic to apply with git because some of
the new patches are amending wview sources that use the DOS line-endings
convention. It applies and works fine with patch -p1 though. Please
advice me how to proceed if that's unacceptable.
The proper integration of this wview software is complicated due to some
strange flaws in the sources, i workaround them with symlinks and provide
an appropriate init script to allow user to use a nice big storage for the
generated data. This package is runtime-tested on a DIR-620 system.
libs/radlib/Makefile | 44 +-
.../patches/001-cross_compile_link_bug.patch | 71 +++
libs/radlib/patches/001-cross_link_bug.patch | 44 --
utils/wview/Makefile | 170 +++++++
utils/wview/files/etc/init.d/wview | 55 +++
utils/wview/patches/010-fix-cross-compile.patch | 499 ++++++++++++++++++++
utils/wview/patches/020-use-standard-awk.patch | 22 +
7 files changed, 851 insertions(+), 54 deletions(-)
create mode 100644 libs/radlib/patches/001-cross_compile_link_bug.patch
delete mode 100644 libs/radlib/patches/001-cross_link_bug.patch
create mode 100644 utils/wview/Makefile
create mode 100644 utils/wview/files/etc/init.d/wview
create mode 100644 utils/wview/patches/010-fix-cross-compile.patch
create mode 100644 utils/wview/patches/020-use-standard-awk.patch
diff --git a/libs/radlib/Makefile b/libs/radlib/Makefile
index 1ac860a..c5c580f 100644
--- a/libs/radlib/Makefile
+++ b/libs/radlib/Makefile
@@ -8,18 +8,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=radlib
-PKG_VERSION:=2.8.5
-PKG_RELEASE:=2
+PKG_VERSION:=2.12.0
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=@SF/radlib
-PKG_MD5SUM:=82ab0c702e55a860b69ad76e2aac748f
-
-ifeq ($(CONFIG_EXTERNAL_KERNEL_TREE),)
-PATCH_DIR:=
-else
-PATCH_DIR:=./patches
-endif
+PKG_SHA1SUM:=1b3feace6d0361436c9e4ce9b06856195a5ac1b1
PKG_FIXUP:=autoreconf
@@ -36,13 +30,43 @@ define Package/radlib/description
radlib is a rapid application development library for unix
multi-process applications
endef
+define Package/radlib-sqlite
+ $(call Package/radlib)
+ VARIANT:=sqlite
+ DEPENDS+=+libsqlite3
+ TITLE+= (sqlite)
+endef
+
+define Package/radlib-sqlite/description
+ $(call Package/radlib/description)
+ This package comes with sqlite support
+endef
+
CONFIGURE_ARGS += \
--prefix="$(TOOLCHAIN_DIR)/usr"
+ifeq ($(BUILD_VARIANT),sqlite)
+CONFIGURE_ARGS += \
+ --enable-sqlite
+endif
+
+define Build/InstallDev
+ $(INSTALL_DIR) $(1)/usr/include
+ $(CP) $(PKG_BUILD_DIR)/h/rad*.h $(1)/usr/include/
+ $(INSTALL_DIR) $(1)/usr/lib
+ $(CP) $(PKG_BUILD_DIR)/src/.libs/librad.so* $(1)/usr/lib/
+endef
+
define Package/radlib/install
$(INSTALL_DIR) $(1)/usr/lib
- $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/.libs/librad.so $(1)/usr/lib/
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/.libs/librad.so* $(1)/usr/lib/
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/msgRouter/.libs/radmrouted $(1)/usr/bin/
endef
+define Package/radlib-sqlite/install
+ $(call Package/radlib/install,$(1))
+endef
$(eval $(call BuildPackage,radlib))
+$(eval $(call BuildPackage,radlib-sqlite))
diff --git a/libs/radlib/patches/001-cross_compile_link_bug.patch
b/libs/radlib/patches/001-cross_compile_link_bug.patch
new file mode 100644
index 0000000..2c943bd
--- /dev/null
+++ b/libs/radlib/patches/001-cross_compile_link_bug.patch
@@ -0,0 +1,71 @@
+--- a/debug/Makefile.am
++++ b/debug/Makefile.am
+@@ -27,8 +27,8 @@ raddebug_LDADD += -lsqlite3
+ endif
+
+ # define library directories
+-raddebug_LDFLAGS = -L../src/.libs -L$(prefix)/lib -L/usr/lib
+-INCLUDES += -I$(prefix)/include -I/usr/include
++raddebug_LDFLAGS = -L../src/.libs -L$(prefix)/lib
++INCLUDES += -I$(prefix)/include
+
+ if MYSQL
+ raddebug_LDFLAGS += -L$(prefix)/lib64/mysql -L$(prefix)/lib/mysql
-L/usr/lib64/mysql -L/usr/lib/mysql
+@@ -39,6 +39,6 @@ INCLUDES += -I$(prefix)/pgsql/in
+ endif
+ endif
+
+-if CROSSCOMPILE
+-raddebug_LDFLAGS += $(prefix)/lib/crt1.o $(prefix)/lib/crti.o
$(prefix)/lib/crtn.o
+-endif
++#if CROSSCOMPILE
++#raddebug_LDFLAGS += $(prefix)/lib/crt1.o $(prefix)/lib/crti.o
$(prefix)/lib/crtn.o
++#endif
+--- a/msgRouter/Makefile.am
++++ b/msgRouter/Makefile.am
+@@ -27,8 +27,8 @@ radmrouted_LDADD += -lsqlite3
+ endif
+
+ # define library directories
+-radmrouted_LDFLAGS = -L../src/.libs -L$(prefix)/lib -L/usr/lib
+-INCLUDES += -I$(prefix)/include -I/usr/include
++radmrouted_LDFLAGS = -L../src/.libs -L$(prefix)/lib
++INCLUDES += -I$(prefix)/include
+
+ if MYSQL
+ radmrouted_LDFLAGS += -L$(prefix)/lib64/mysql -L$(prefix)/lib/mysql
-L/usr/lib64/mysql -L/usr/lib/mysql
+@@ -39,6 +39,6 @@ INCLUDES += -I$(prefix)/pgsql/
+ endif
+ endif
+
+-if CROSSCOMPILE
+-radmrouted_LDFLAGS += $(prefix)/lib/crt1.o $(prefix)/lib/crti.o
$(prefix)/lib/crtn.o
+-endif
++#if CROSSCOMPILE
++#radmrouted_LDFLAGS += $(prefix)/lib/crt1.o $(prefix)/lib/crti.o
$(prefix)/lib/crtn.o
++#endif
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -34,9 +34,6 @@ PGSQL_HDRS = \
+ $(top_srcdir)/database/postgresql/_pg-types.h
+ endif
+ if SQLITE
+-SQ_INCLUDES = \
+- -I$(prefix)/include \
+- -I/usr/include
+ SQ_SOURCES = \
+ $(top_srcdir)/src/radsqlite.c
+ SQLITE_HDRS = \
+@@ -46,11 +43,9 @@ endif
+ # define include directories
+ INCLUDES = \
+ -I$(top_srcdir)/h \
+- -I$(prefix)/include \
+ -D_GNU_SOURCE \
+ $(MY_INCLUDES) \
+- $(PG_INCLUDES) \
+- $(SQ_INCLUDES)
++ $(PG_INCLUDES)
+
+
+
diff --git a/libs/radlib/patches/001-cross_link_bug.patch
b/libs/radlib/patches/001-cross_link_bug.patch
deleted file mode 100644
index 00dc1c4..0000000
--- a/libs/radlib/patches/001-cross_link_bug.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-diff -urN radlib-2.8.4/debug/Makefile.am radlib-2.8.42/debug/Makefile.am
---- radlib-2.8.4/debug/Makefile.am 2009-02-05 06:10:01.000000000 +0100
-+++ radlib-2.8.42/debug/Makefile.am 2009-10-04 16:40:08.000000000 +0200
-@@ -43,5 +43,5 @@
- endif
-
- if CROSSCOMPILE
--raddebug_LDFLAGS += $(prefix)/lib/crt1.o $(prefix)/lib/crti.o
$(prefix)/lib/crtn.o
-+#raddebug_LDFLAGS += $(prefix)/lib/crt1.o $(prefix)/lib/crti.o
$(prefix)/lib/crtn.o
- endif
-diff -urN radlib-2.8.4/debug/Makefile.in radlib-2.8.42/debug/Makefile.in
---- radlib-2.8.4/debug/Makefile.in 2009-08-15 16:03:37.000000000 +0200
-+++ radlib-2.8.42/debug/Makefile.in 2009-10-04 16:40:17.000000000 +0200
-@@ -43,7 +43,7 @@
- @MYSQL_FALSE@@PGRESQL_TRUE@am__append_6 = -I$(prefix)/pgsql/include
- @SQLITE_TRUE@am__append_7 = -L/usr/lib -L/usr/local/lib
- @SQLITE_TRUE@am__append_8 = -I/usr/include -I/usr/local/include
--@CROSSCOMPILE_TRUE@am__append_9 = $(prefix)/lib/crt1.o $(prefix)/lib/crti.o
$(prefix)/lib/crtn.o
-+#@CROSSCOMPILE_TRUE@am__append_9 = $(prefix)/lib/crt1.o $(prefix)/lib/crti.o
$(prefix)/lib/crtn.o
- subdir = debug
- DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
- ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-diff -urN radlib-2.8.4/msgRouter/Makefile.am
radlib-2.8.42/msgRouter/Makefile.am
---- radlib-2.8.4/msgRouter/Makefile.am 2009-02-05 06:10:01.000000000 +0100
-+++ radlib-2.8.42/msgRouter/Makefile.am 2009-10-04 16:31:24.000000000
+0200
-@@ -44,5 +44,5 @@
- endif
-
- if CROSSCOMPILE
--radmrouted_LDFLAGS += $(prefix)/lib/crt1.o $(prefix)/lib/crti.o
$(prefix)/lib/crtn.o
-+#radmrouted_LDFLAGS += $(prefix)/lib/crt1.o $(prefix)/lib/crti.o
$(prefix)/lib/crtn.o
- endif
-diff -urN radlib-2.8.4/msgRouter/Makefile.in
radlib-2.8.42/msgRouter/Makefile.in
---- radlib-2.8.4/msgRouter/Makefile.in 2009-08-15 16:03:37.000000000 +0200
-+++ radlib-2.8.42/msgRouter/Makefile.in 2009-10-04 16:36:01.000000000
+0200
-@@ -43,7 +43,7 @@
- @MYSQL_FALSE@@PGRESQL_TRUE@am__append_6 = -I$(prefix)/pgsql/include
- @SQLITE_TRUE@am__append_7 = -L/usr/lib -L/usr/local/lib
- @SQLITE_TRUE@am__append_8 = -I/usr/include -I/usr/local/include
--@CROSSCOMPILE_TRUE@am__append_9 = $(prefix)/lib/crt1.o $(prefix)/lib/crti.o
$(prefix)/lib/crtn.o
-+#@CROSSCOMPILE_TRUE@am__append_9 = $(prefix)/lib/crt1.o $(prefix)/lib/crti.o
$(prefix)/lib/crtn.o
- subdir = msgRouter
- DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in
- ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
diff --git a/utils/wview/Makefile b/utils/wview/Makefile
new file mode 100644
index 0000000..ed1b519
--- /dev/null
+++ b/utils/wview/Makefile
@@ -0,0 +1,170 @@
+#
+# Copyright (C) 2012 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=wview
+PKG_VERSION:=5.19.0-jgoerzen
+PKG_RELEASE=$(PKG_SOURCE_VERSION)
+PKG_SOURCE_URL:=git://github.com/jgoerzen/wview.git
+PKG_SOURCE_VERSION:=7bfac6c11e756290c38e7b5862a4c51b6bc6c51e
+PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
+
+PKG_FIXUP:=autoreconf
+
+include $(INCLUDE_DIR)/package.mk
+
+define Package/wview
+ SECTION:=utils
+ CATEGORY:=Utilities
+ DEPENDS:=+libcurl +zlib +libpng +libgd +libreadline +libsqlite3 +libusb-1.0
+radlib-sqlite +sqlite3-cli
+ TITLE:=Wview Weather Station Software
+ URL:=http://www.wviewweather.com/
+endef
+
+define Package/wview/description
+ Wview is a collection of linux/unix daemons which interface with a supported
+ weather station to retrieve archive records (if generated by the station) and
+ current conditions. If the station does not generate archive records
+ internally, wview will auto-generate archive records based on the sensor
+ readings collected for that interval. The archive records and High/Low
(HILOW)
+ data are stored in SQLite3 databases. At a configurable interval, wview will
+ utilize the archive history and current conditions to generate weather images
+ (buckets, dials and graphs) and HTML web pages based on user-configurable
HTML
+ templates.
+
+ After install you need to create a directory holding archive and create the
+ database there by running there
+ sqlite3 wview-archive.sdb '.read /etc/wview/wview-archive.sql'
+
+ Then copy all your theme files to the appropriate place (on a non-volatile
+ storage), and html-templates.conf to /etc/wview/; then wviewconfig to
configure
+ the system.
+
+ Read and amend /etc/init.d/wview appropriately for your particular setup!
+endef
+
+define Package/wview/prerm
+#!/bin/sh
+if [ -z "$${IPKG_INSTROOT}" ]; then
+ echo "Removing rc.d symlink for wview"
+ /etc/init.d/wview disable
+fi
+exit 0
+endef
+
+define Package/wview/install
+ $(INSTALL_DIR) $(1)/usr/bin
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/cwop/wvcwopd $(1)/usr/bin/wvcwopd
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/http/wvhttpd $(1)/usr/bin/wvhttpd
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/procmon/wvpmond $(1)/usr/bin/wvpmond
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/utilities/hilowcreate/hilowcreate
$(1)/usr/bin/hilowcreate
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/utilities/sqlite2wlk/sqlite2wlk
$(1)/usr/bin/sqlite2wlk
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/htmlgenerator/htmlgend
$(1)/usr/bin/htmlgend
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/stations/VantagePro/vpconfig/vpinstall
$(1)/usr/bin/vpinstall
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/ftp/wviewftpd $(1)/usr/bin/wviewftpd
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/ssh/wviewsshd $(1)/usr/bin/wviewsshd
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/stations/Virtual/wviewd_virtual
$(1)/usr/bin/wviewd_virtual
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/utilities/archive-be2le/arc_be2le
$(1)/usr/bin/arc_be2le
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/utilities/archive-le2be/arc_le2be
$(1)/usr/bin/arc_le2be
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/alarms/wvalarmd $(1)/usr/bin/wvalarmd
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/utilities/wlk2sqlite/wlk2sqlite
$(1)/usr/bin/wlk2sqlite
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/stations/Simulator/wviewd_sim
$(1)/usr/bin/wviewd_sim
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/stations/TWI/wviewd_twi
$(1)/usr/bin/wviewd_twi
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/stations/VantagePro/wviewd_vpro
$(1)/usr/bin/wviewd_vpro
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/wviewconfig/wviewconfig
$(1)/usr/bin/wviewconfig
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/wviewconfig/wviewhtmlconfig
$(1)/usr/bin/wviewhtmlconfig
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/stations/WH1080/wviewd_wh1080
$(1)/usr/bin/wviewd_wh1080
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/stations/WMR918/wviewd_wmr918
$(1)/usr/bin/wviewd_wmr918
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/stations/WS-2300/wviewd_ws2300
$(1)/usr/bin/wviewd_ws2300
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/stations/WMRUSB/wviewd_wmrusb
$(1)/usr/bin/wviewd_wmrusb
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/stations/WXT510/wviewd_wxt510
$(1)/usr/bin/wviewd_wxt510
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/stations/VantagePro/vpconfig/vpconfig
$(1)/usr/bin/vpconfig
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/wviewconfig/wviewcleardata
$(1)/usr/bin/wviewcleardata
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/stations/TE923/wviewd_te923
$(1)/usr/bin/wviewd_te923
+ $(INSTALL_BIN)
$(PKG_BUILD_DIR)/stations/WXT510/wxt510config/wxt510config
$(1)/usr/bin/wxt510config
+ $(INSTALL_DIR) $(1)/etc/init.d
+ $(INSTALL_BIN) ./files/etc/init.d/wview $(1)/etc/init.d/
+ $(INSTALL_DIR) $(1)/etc/wview
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/examples/conf/wview-conf.sql
$(1)/etc/wview/wview-conf.sql
+ $(INSTALL_DATA)
$(PKG_BUILD_DIR)/examples/html/chrome/standard/graphics.conf
$(1)/etc/wview/graphics.conf
+ $(INSTALL_DATA)
$(PKG_BUILD_DIR)/examples/html/chrome/standard/post-generate.sh
$(1)/etc/wview/post-generate.sh
+ $(INSTALL_DATA)
$(PKG_BUILD_DIR)/examples/html/chrome/standard/images.conf
$(1)/etc/wview/images.conf
+ $(INSTALL_DATA)
$(PKG_BUILD_DIR)/examples/html/chrome/standard/images-user.conf
$(1)/etc/wview/images-user.conf
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/examples/conf/arcrec-header.conf
$(1)/etc/wview/arcrec-header.conf
+ $(INSTALL_DATA)
$(PKG_BUILD_DIR)/examples/html/chrome/standard/pre-generate.sh
$(1)/etc/wview/pre-generate.sh
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/examples/conf/wview-conf-update.sql
$(1)/etc/wview/wview-conf-update.sql
+ $(INSTALL_DATA)
$(PKG_BUILD_DIR)/examples/conf/forecast.conf-no-forecast
$(1)/etc/wview/forecast.conf-no-forecast
+ echo $(PKG_VERSION) > $(1)/etc/wview/wview-version
+ echo wviewd_sim > $(1)/etc/wview/wview-binary
+
+# This should never be defined as the user is expected to manually install all
the
+# theme files he wants to an appropriate place and to specify that place in
the config.
+# Leaving here for the future reference to be able to prepare a full variant
of the package
+ifdef INSTALL_TEMPLATES
+ $(INSTALL_DIR) $(1)/etc/wview/html
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/examples/html/Template-Skins-HOWTO.txt
$(1)/etc/wview/html/Template-Skins-HOWTO.txt
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/examples/html/parameterlist.htx
$(1)/etc/wview/html/parameterlist.htx
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/examples/html/parameterlist.txt
$(1)/etc/wview/html/parameterlist.txt
+ $(INSTALL_DATA)
$(PKG_BUILD_DIR)/examples/html/chrome/standard/awekas_wl.htx-metric
$(1)/etc/wview/html/awekas_wl.htx-metric
+ $(INSTALL_DATA)
$(PKG_BUILD_DIR)/examples/html/chrome/standard/Current.htx
$(1)/etc/wview/html/Current.htx
+ $(INSTALL_DATA)
$(PKG_BUILD_DIR)/examples/html/chrome/standard/html-templates.conf
$(1)/etc/wview/html/html-templates.conf
+ $(INSTALL_DATA)
$(PKG_BUILD_DIR)/examples/html/chrome/standard/Weekly.htx
$(1)/etc/wview/html/Weekly.htx
+ $(INSTALL_DATA)
$(PKG_BUILD_DIR)/examples/html/chrome/standard/Monthly.htx
$(1)/etc/wview/html/Monthly.htx
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/examples/html/chrome/standard/data.htx
$(1)/etc/wview/html/data.htx
+ $(INSTALL_DATA)
$(PKG_BUILD_DIR)/examples/html/chrome/standard/index-day.htx
$(1)/etc/wview/html/index-day.htx
+ $(INSTALL_DATA)
$(PKG_BUILD_DIR)/examples/html/chrome/standard/Yearly.htx
$(1)/etc/wview/html/Yearly.htx
+ $(INSTALL_DATA)
$(PKG_BUILD_DIR)/examples/html/chrome/standard/Daily.htx
$(1)/etc/wview/html/Daily.htx
+ $(INSTALL_DATA)
$(PKG_BUILD_DIR)/examples/html/chrome/standard/almanac.htx
$(1)/etc/wview/html/almanac.htx
+ $(INSTALL_DATA)
$(PKG_BUILD_DIR)/examples/html/chrome/standard/header-big.incx
$(1)/etc/wview/html/header-big.incx
+ $(INSTALL_DATA)
$(PKG_BUILD_DIR)/examples/html/chrome/standard/index.htx
$(1)/etc/wview/html/index.htx
+ $(INSTALL_DATA)
$(PKG_BUILD_DIR)/examples/html/chrome/standard/awekas_wl.htx-us
$(1)/etc/wview/html/awekas_wl.htx-us
+ $(INSTALL_DATA)
$(PKG_BUILD_DIR)/examples/html/chrome/standard/Current_Conditions.htx
$(1)/etc/wview/html/Current_Conditions.htx
+ $(INSTALL_DATA)
$(PKG_BUILD_DIR)/examples/html/chrome/standard/header.incx
$(1)/etc/wview/html/header.incx
+ $(INSTALL_DATA)
$(PKG_BUILD_DIR)/examples/html/chrome/standard/index-night.htx
$(1)/etc/wview/html/index-night.htx
+ $(INSTALL_DATA)
$(PKG_BUILD_DIR)/examples/html/chrome/standard/wxrss.xtx
$(1)/etc/wview/html/wxrss.xtx
+ $(INSTALL_DATA)
$(PKG_BUILD_DIR)/examples/html/chrome/standard/readings.incx
$(1)/etc/wview/html/readings.incx
+ $(INSTALL_DATA)
$(PKG_BUILD_DIR)/examples/html/chrome/standard/nav-buttons.incx
$(1)/etc/wview/html/nav-buttons.incx
+ $(INSTALL_DIR) $(1)/etc/wview/alarms
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/examples/alarms/outtempMax.sh
$(1)/etc/wview/alarms/outtempMax.sh
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/examples/alarms/outtempMin.sh
$(1)/etc/wview/alarms/outtempMin.sh
+ $(INSTALL_BIN) $(PKG_BUILD_DIR)/examples/alarms/outtempMaxEmail.sh
$(1)/etc/wview/alarms/outtempMaxEmail.sh
+ $(INSTALL_DIR) $(1)/var/run/wview
+ $(INSTALL_DIR) $(1)/var/wview/img
+ $(INSTALL_DATA)
$(PKG_BUILD_DIR)/examples/html/chrome/static/fc-icon-partlycloudy.gif
$(1)/var/wview/img/fc-icon-partlycloudy.gif
+ $(INSTALL_DATA)
$(PKG_BUILD_DIR)/examples/html/chrome/static/fc-icon-rain.gif
$(1)/var/wview/img/fc-icon-rain.gif
+ $(INSTALL_DATA)
$(PKG_BUILD_DIR)/examples/html/chrome/static/chart_bg.png
$(1)/var/wview/img/chart_bg.png
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/examples/html/chrome/static/dot_bg.png
$(1)/var/wview/img/dot_bg.png
+ $(INSTALL_DATA)
$(PKG_BUILD_DIR)/examples/html/chrome/static/fc-icon-snowandrain.gif
$(1)/var/wview/img/fc-icon-snowandrain.gif
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/examples/html/chrome/static/Clouds.jpg
$(1)/var/wview/img/Clouds.jpg
+ $(INSTALL_DATA)
$(PKG_BUILD_DIR)/examples/html/chrome/static/Clouds-blue.jpg
$(1)/var/wview/img/Clouds-blue.jpg
+ $(INSTALL_DATA)
$(PKG_BUILD_DIR)/examples/html/chrome/static/fc-icon-partlycloudyandsnow.gif
$(1)/var/wview/img/fc-icon-partlycloudyandsnow.gif
+ $(INSTALL_DATA)
$(PKG_BUILD_DIR)/examples/html/chrome/static/dial_bg.png
$(1)/var/wview/img/dial_bg.png
+ $(INSTALL_DATA)
$(PKG_BUILD_DIR)/examples/html/chrome/static/fc-icon-snow.gif
$(1)/var/wview/img/fc-icon-snow.gif
+ $(INSTALL_DATA)
$(PKG_BUILD_DIR)/examples/html/chrome/static/bucket_bg.png
$(1)/var/wview/img/bucket_bg.png
+ $(INSTALL_DATA)
$(PKG_BUILD_DIR)/examples/html/chrome/static/fc-icon-cloudy.gif
$(1)/var/wview/img/fc-icon-cloudy.gif
+ $(INSTALL_DATA)
$(PKG_BUILD_DIR)/examples/html/chrome/static/django_bg.jpg
$(1)/var/wview/img/django_bg.jpg
+ $(INSTALL_DATA)
$(PKG_BUILD_DIR)/examples/html/chrome/static/fc-icon-sunny.gif
$(1)/var/wview/img/fc-icon-sunny.gif
+ $(INSTALL_DATA)
$(PKG_BUILD_DIR)/examples/html/chrome/static/fc-icon-partlycloudyandrain.gif
$(1)/var/wview/img/fc-icon-partlycloudyandrain.gif
+ $(INSTALL_DATA)
$(PKG_BUILD_DIR)/examples/html/chrome/static/above-clouds.jpg
$(1)/var/wview/img/above-clouds.jpg
+
+# These files and the directories should be created manually wherever the user
is going to
+# have her weather archive and the generated html files
+ $(INSTALL_DIR) $(1)/var/wview/img/NOAA
+ $(INSTALL_DIR) $(1)/var/wview/img/Archive
+ $(INSTALL_DIR) $(1)/var/wview/noaa
+ $(INSTALL_DIR) $(1)/var/wview/alarms
+ $(INSTALL_DIR) $(1)/var/wview/archive
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/bin/archive/wview-archive.sql
$(1)/var/wview/archive/wview-archive.sql
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/bin/archive/readme.txt
$(1)/var/wview/archive/readme.txt
+endif
+ $(INSTALL_DATA) $(PKG_BUILD_DIR)/bin/archive/wview-archive.sql
$(1)/etc/wview/wview-archive.sql
+endef
+
+$(eval $(call BuildPackage,wview))
+
diff --git a/utils/wview/files/etc/init.d/wview
b/utils/wview/files/etc/init.d/wview
new file mode 100644
index 0000000..b212d28
--- /dev/null
+++ b/utils/wview/files/etc/init.d/wview
@@ -0,0 +1,55 @@
+#!/bin/sh /etc/rc.common
+
+START=99
+
+CONF_DIRECTORY=/etc/wview
+RUN_DIRECTORY=/var/wview
+WVIEW_INSTALL_DIR=/usr/bin
+
+WVIEWD_FILE=`cat $CONF_DIRECTORY/wview-binary`
+WVIEWD_BIN=$WVIEW_INSTALL_DIR/$WVIEWD_FILE
+
+WVIEWD_FILE=`cat $CONF_DIRECTORY/wview-binary`
+WVIEWD_BIN=$WVIEW_INSTALL_DIR/$WVIEWD_FILE
+HTMLD_BIN=$WVIEW_INSTALL_DIR/htmlgend
+FTPD_BIN=$WVIEW_INSTALL_DIR/wviewftpd
+SSHD_BIN=$WVIEW_INSTALL_DIR/wviewsshd
+ALARMD_BIN=$WVIEW_INSTALL_DIR/wvalarmd
+CWOPD_BIN=$WVIEW_INSTALL_DIR/wvcwopd
+HTTP_BIN=$WVIEW_INSTALL_DIR/wvhttpd
+RADROUTER_BIN=$WVIEW_INSTALL_DIR/radmrouted
+PMOND_BIN=$WVIEW_INSTALL_DIR/wvpmond
+
+RADROUTER_PID=$RUN_DIRECTORY/radmrouted.pid
+WVIEWD_PID=$RUN_DIRECTORY/wviewd.pid
+HTMLD_PID=$RUN_DIRECTORY/htmlgend.pid
+FTPD_PID=$RUN_DIRECTORY/wviewftpd.pid
+SSHD_PID=$RUN_DIRECTORY/wviewsshd.pid
+ALARMD_PID=$RUN_DIRECTORY/wvalarmd.pid
+CWOPD_PID=$RUN_DIRECTORY/wvcwopd.pid
+HTTP_PID=$RUN_DIRECTORY/wvhttpd.pid
+PMOND_PID=$RUN_DIRECTORY/wvpmond.pid
+
+start() {
+ mkdir /mnt/extusb 2> /dev/null
+ mount /dev/sda1 /mnt/extusb 2> /dev/null
+ mkdir $RUN_DIRECTORY 2> /dev/null
+ ln -snf /mnt/extusb/wview-html $CONF_DIRECTORY/html
+ ln -snf /mnt/extusb/wview-data/measurements-archive /var/wview/archive
+ start-stop-daemon -S -x $RADROUTER_BIN -- 1 $RUN_DIRECTORY
+ sleep 1
+ start-stop-daemon -S -x $WVIEWD_BIN
+ sleep 1
+ for i in HTMLD ALARMD CWOPD HTTP FTPD SSHD PMOND; do
+ start-stop-daemon -S -x $(eval echo \$$(echo ${i}_BIN))
+ done
+}
+
+stop() {
+ for i in RADROUTER WVIEWD HTMLD ALARMD CWOPD HTTP FTPD SSHD PMOND; do
+ PID_FILE=$(eval echo \$$(echo ${i}_PID))
+ start-stop-daemon -K -s TERM -p $PID_FILE
+ rm -f $PID_FILE
+ done
+}
+
diff --git a/utils/wview/patches/010-fix-cross-compile.patch
b/utils/wview/patches/010-fix-cross-compile.patch
new file mode 100644
index 0000000..59523bf
--- /dev/null
+++ b/utils/wview/patches/010-fix-cross-compile.patch
@@ -0,0 +1,499 @@
+--- a/alarms/Makefile.am
++++ b/alarms/Makefile.am
+@@ -8,7 +8,6 @@ bin_PROGRAMS = wvalarmd
+ # define include directories
+ INCLUDES = \
+ -I$(top_srcdir)/common \
+- -I$(prefix)/include \
+ -D_GNU_SOURCE \
+ -DWV_CONFIG_DIR=\"$(sysconfdir)/wview\" \
+ -DWV_RUN_DIR=\"$(localstatedir)/wview\" \
+@@ -36,9 +35,7 @@ wvalarmd_SOURCES = \
+ wvalarmd_LDADD =
+
+ # define library directories
+-wvalarmd_LDFLAGS = -L$(prefix)/lib -L$(prefix)/usr/lib -L/usr/lib
+
+ if CROSSCOMPILE
+-wvalarmd_LDFLAGS += $(prefix)/lib/crt1.o $(prefix)/lib/crti.o
$(prefix)/lib/crtn.o
+ endif
+
+--- a/cwop/Makefile.am
++++ b/cwop/Makefile.am
+@@ -8,7 +8,6 @@ bin_PROGRAMS = wvcwopd
+ # define include directories
+ INCLUDES = \
+ -I$(top_srcdir)/common \
+- -I$(prefix)/include \
+ -D_GNU_SOURCE \
+ -DWV_CONFIG_DIR=\"$(sysconfdir)/wview\" \
+ -DWV_RUN_DIR=\"$(localstatedir)/wview\" \
+@@ -32,9 +31,7 @@ wvcwopd_SOURCES = \
+ wvcwopd_LDADD =
+
+ # define library directories
+-wvcwopd_LDFLAGS = -L$(prefix)/lib -L$(prefix)/usr/lib -L/usr/lib
+
+ if CROSSCOMPILE
+-wvcwopd_LDFLAGS += $(prefix)/lib/crt1.o $(prefix)/lib/crti.o
$(prefix)/lib/crtn.o
+ endif
+
+--- a/ftp/Makefile.am
++++ b/ftp/Makefile.am
+@@ -7,7 +7,6 @@ bin_PROGRAMS = wviewftpd
+
+ # define include directories
+ INCLUDES = -I$(top_srcdir)/common \
+- -I$(prefix)/include \
+ -DWV_CONFIG_DIR=\"$(sysconfdir)/wview\" \
+ -DWV_RUN_DIR=\"$(localstatedir)/wview\" \
+ -D_GNU_SOURCE
+@@ -33,9 +32,7 @@ wviewftpd_SOURCES = \
+ wviewftpd_LDADD = -lssl -lcurl
+
+ # define library directories
+-wviewftpd_LDFLAGS = -L$(prefix)/lib -L$(prefix)/usr/lib -L/usr/lib
+
+ if CROSSCOMPILE
+-wviewftpd_LDFLAGS += $(prefix)/lib/crt1.o $(prefix)/lib/crti.o
$(prefix)/lib/crtn.o
+ endif
+
+--- a/htmlgenerator/Makefile.am
++++ b/htmlgenerator/Makefile.am
+@@ -8,7 +8,6 @@ bin_PROGRAMS = htmlgend
+ # define include directories
+ INCLUDES = \
+ -I$(top_srcdir)/common \
+- -I$(prefix)/include \
+ -D_GNU_SOURCE \
+ -DWV_CONFIG_DIR=\"$(sysconfdir)/wview\" \
+ -DWV_RUN_DIR=\"$(localstatedir)/wview\" \
+@@ -66,9 +65,7 @@ htmlgend_SOURCES = \
+ htmlgend_LDADD =
+
+ # define library directories
+-htmlgend_LDFLAGS = -L$(prefix)/lib -L$(prefix)/usr/lib -L/usr/lib
+
+ if CROSSCOMPILE
+-htmlgend_LDFLAGS += $(prefix)/lib/crt1.o $(prefix)/lib/crti.o
$(prefix)/lib/crtn.o
+ endif
+
+--- a/http/Makefile.am
++++ b/http/Makefile.am
+@@ -8,9 +8,6 @@ bin_PROGRAMS = wvhttpd
+ # define include directories
+ INCLUDES = \
+ -I$(top_srcdir)/common \
+- -I$(prefix)/include \
+- -I/usr/include \
+- -I/usr/local/include \
+ -D_GNU_SOURCE \
+ -DWV_CONFIG_DIR=\"$(sysconfdir)/wview\" \
+ -DWV_RUN_DIR=\"$(localstatedir)/wview\" \
+@@ -38,9 +35,7 @@ wvhttpd_SOURCES = \
+ wvhttpd_LDADD = -lssl -lcurl
+
+ # define library directories
+-wvhttpd_LDFLAGS = -L$(prefix)/lib -L$(prefix)/usr/lib -L/usr/lib
+
+ if CROSSCOMPILE
+-wvhttpd_LDFLAGS += $(prefix)/lib/crt1.o $(prefix)/lib/crti.o
$(prefix)/lib/crtn.o
+ endif
+
+--- a/procmon/Makefile.am
++++ b/procmon/Makefile.am
+@@ -8,7 +8,6 @@ bin_PROGRAMS = wvpmond
+ # define include directories
+ INCLUDES = \
+ -I$(top_srcdir)/common \
+- -I$(prefix)/include \
+ -D_GNU_SOURCE \
+ -DWV_CONFIG_DIR=\"$(sysconfdir)/wview\" \
+ -DWV_RUN_DIR=\"$(localstatedir)/wview\" \
+@@ -33,9 +32,7 @@ wvpmond_SOURCES = \
+ wvpmond_LDADD =
+
+ # define library directories
+-wvpmond_LDFLAGS = -L$(prefix)/lib -L$(prefix)/usr/lib -L/usr/lib
+
+ if CROSSCOMPILE
+-wvpmond_LDFLAGS += $(prefix)/lib/crt1.o $(prefix)/lib/crti.o
$(prefix)/lib/crtn.o
+ endif
+
+--- a/ssh/Makefile.am
++++ b/ssh/Makefile.am
+@@ -7,7 +7,6 @@ bin_PROGRAMS = wviewsshd
+
+ # define include directories
+ INCLUDES = -I$(top_srcdir)/common \
+- -I$(prefix)/include \
+ -DWV_CONFIG_DIR=\"$(sysconfdir)/wview\" \
+ -DWV_RUN_DIR=\"$(localstatedir)/wview\" \
+ -D_GNU_SOURCE
+@@ -33,9 +32,7 @@ wviewsshd_SOURCES = \
+ wviewsshd_LDADD =
+
+ # define library directories
+-wviewsshd_LDFLAGS = -L$(prefix)/lib -L$(prefix)/usr/lib -L/usr/lib
+
+ if CROSSCOMPILE
+-wviewsshd_LDFLAGS += $(prefix)/lib/crt1.o $(prefix)/lib/crti.o
$(prefix)/lib/crtn.o
+ endif
+
+--- a/stations/Simulator/Makefile.am
++++ b/stations/Simulator/Makefile.am
+@@ -7,7 +7,6 @@ bin_PROGRAMS = wviewd_sim
+ INCLUDES = \
+ -I$(top_srcdir)/common \
+ -I$(top_srcdir)/stations/common \
+- -I$(prefix)/include \
+ -D_GNU_SOURCE \
+ -DWV_CONFIG_DIR=\"$(sysconfdir)/wview\" \
+ -DWV_RUN_DIR=\"$(localstatedir)/wview\" \
+@@ -52,9 +51,7 @@ wviewd_sim_SOURCES = \
+ wviewd_sim_LDADD =
+
+ # define library directories
+-wviewd_sim_LDFLAGS = -L$(prefix)/lib -L$(prefix)/usr/lib -L/usr/lib
+
+ if CROSSCOMPILE
+-wviewd_sim_LDFLAGS += $(prefix)/lib/crt1.o $(prefix)/lib/crti.o
$(prefix)/lib/crtn.o
+ endif
+
+--- a/stations/TE923/Makefile.am
++++ b/stations/TE923/Makefile.am
+@@ -7,7 +7,6 @@ bin_PROGRAMS = wviewd_te923
+ INCLUDES = \
+ -I$(top_srcdir)/common \
+ -I$(top_srcdir)/stations/common \
+- -I$(prefix)/include \
+ -D_GNU_SOURCE \
+ -DWV_CONFIG_DIR=\"$(sysconfdir)/wview\" \
+ -DWV_RUN_DIR=\"$(localstatedir)/wview\" \
+@@ -53,11 +52,9 @@ wviewd_te923_SOURCES = \
+
+ if DARWIN
+ wviewd_te923_SOURCES += $(top_srcdir)/stations/common/hidapi-osx.c
+-wviewd_te923_LDFLAGS = -L$(prefix)/lib -L/usr/lib -L/usr/local/lib
-framework IOKit -framework CoreFoundation
+ wviewd_te923_LDADD =
+ else
+ wviewd_te923_SOURCES += $(top_srcdir)/stations/common/hidapi-linux.c
+-wviewd_te923_LDFLAGS = -L$(prefix)/lib -L/usr/lib -L/usr/local/lib
+ if FREEBSD
+ wviewd_te923_LDADD = -lusb
+ else
+--- a/stations/TWI/Makefile.am
++++ b/stations/TWI/Makefile.am
+@@ -7,7 +7,6 @@ bin_PROGRAMS = wviewd_twi
+ INCLUDES = \
+ -I$(top_srcdir)/common \
+ -I$(top_srcdir)/stations/common \
+- -I$(prefix)/include \
+ -D_GNU_SOURCE \
+ -DWV_CONFIG_DIR=\"$(sysconfdir)/wview\" \
+ -DWV_RUN_DIR=\"$(localstatedir)/wview\" \
+@@ -57,9 +56,7 @@ wviewd_twi_SOURCES = \
+ wviewd_twi_LDADD =
+
+ # define library directories
+-wviewd_twi_LDFLAGS = -L$(prefix)/lib -L$(prefix)/usr/lib -L/usr/lib
+
+ if CROSSCOMPILE
+-wviewd_twi_LDFLAGS += $(prefix)/lib/crt1.o $(prefix)/lib/crti.o
$(prefix)/lib/crtn.o
+ endif
+
+--- a/stations/VantagePro/Makefile.am
++++ b/stations/VantagePro/Makefile.am
+@@ -9,7 +9,6 @@ bin_PROGRAMS = wviewd_vpro
+ INCLUDES = \
+ -I$(top_srcdir)/common \
+ -I$(top_srcdir)/stations/common \
+- -I$(prefix)/include \
+ -D_GNU_SOURCE \
+ -DWV_CONFIG_DIR=\"$(sysconfdir)/wview\" \
+ -DWV_RUN_DIR=\"$(localstatedir)/wview\" \
+@@ -56,9 +55,7 @@ wviewd_vpro_SOURCES = \
+ wviewd_vpro_LDADD =
+
+ # define library directories
+-wviewd_vpro_LDFLAGS = -L$(prefix)/lib -L$(prefix)/usr/lib -L/usr/lib
+
+ if CROSSCOMPILE
+-wviewd_vpro_LDFLAGS += $(prefix)/lib/crt1.o $(prefix)/lib/crti.o
$(prefix)/lib/crtn.o
+ endif
+
+--- a/stations/VantagePro/vpconfig/Makefile.am
++++ b/stations/VantagePro/vpconfig/Makefile.am
+@@ -13,7 +13,6 @@ INCLUDES = \
+ -I$(top_srcdir)/common \
+ -I$(top_srcdir)/stations/common \
+ -I$(top_srcdir)/stations/VantagePro \
+- -I$(prefix)/include \
+ -DWV_CONFIG_DIR=\"$(sysconfdir)/wview\" \
+ -DWV_RUN_DIR=\"$(localstatedir)/wview\" \
+ -D_VP_CONFIG_ONLY \
+@@ -40,10 +39,8 @@ vpconfig_SOURCES = \
+ vpconfig_LDADD =
+
+ # define library directories
+-vpconfig_LDFLAGS = -L$(prefix)/lib -L$(prefix)/usr/lib -L/usr/lib
+
+ if CROSSCOMPILE
+-vpconfig_LDFLAGS += $(prefix)/lib/crt1.o $(prefix)/lib/crti.o
$(prefix)/lib/crtn.o
+ endif
+
+ CLEANFILES = $(bin_SCRIPTS)
+--- a/stations/Virtual/Makefile.am
++++ b/stations/Virtual/Makefile.am
+@@ -7,7 +7,6 @@ bin_PROGRAMS = wviewd_virtual
+ INCLUDES = \
+ -I$(top_srcdir)/common \
+ -I$(top_srcdir)/stations/common \
+- -I$(prefix)/include \
+ -D_GNU_SOURCE \
+ -DWV_CONFIG_DIR=\"$(sysconfdir)/wview\" \
+ -DWV_RUN_DIR=\"$(localstatedir)/wview\" \
+@@ -58,9 +57,7 @@ wviewd_virtual_SOURCES = \
+ wviewd_virtual_LDADD =
+
+ # define library directories
+-wviewd_virtual_LDFLAGS = -L$(prefix)/lib -L$(prefix)/usr/lib -L/usr/lib
+
+ if CROSSCOMPILE
+-wviewd_virtual_LDFLAGS += $(prefix)/lib/crt1.o $(prefix)/lib/crti.o
$(prefix)/lib/crtn.o
+ endif
+
+--- a/stations/WH1080/Makefile.am
++++ b/stations/WH1080/Makefile.am
+@@ -7,7 +7,6 @@ bin_PROGRAMS = wviewd_wh1080
+ INCLUDES = \
+ -I$(top_srcdir)/common \
+ -I$(top_srcdir)/stations/common \
+- -I$(prefix)/include \
+ -D_GNU_SOURCE \
+ -DWV_CONFIG_DIR=\"$(sysconfdir)/wview\" \
+ -DWV_RUN_DIR=\"$(localstatedir)/wview\" \
+@@ -53,11 +52,9 @@ wviewd_wh1080_SOURCES = \
+
+ if DARWIN
+ wviewd_wh1080_SOURCES += $(top_srcdir)/stations/common/hidapi-osx.c
+-wviewd_wh1080_LDFLAGS = -L$(prefix)/lib -L/usr/lib -L/usr/local/lib
-framework IOKit -framework CoreFoundation
+ wviewd_wh1080_LDADD =
+ else
+ wviewd_wh1080_SOURCES += $(top_srcdir)/stations/common/hidapi-linux.c
+-wviewd_wh1080_LDFLAGS = -L$(prefix)/lib -L/usr/lib -L/usr/local/lib
+ if FREEBSD
+ wviewd_wh1080_LDADD = -lusb
+ else
+--- a/stations/WMR918/Makefile.am
++++ b/stations/WMR918/Makefile.am
+@@ -7,7 +7,6 @@ bin_PROGRAMS = wviewd_wmr918
+ INCLUDES = \
+ -I$(top_srcdir)/common \
+ -I$(top_srcdir)/stations/common \
+- -I$(prefix)/include \
+ -D_GNU_SOURCE \
+ -DWV_CONFIG_DIR=\"$(sysconfdir)/wview\" \
+ -DWV_RUN_DIR=\"$(localstatedir)/wview\" \
+@@ -56,9 +55,7 @@ wviewd_wmr918_SOURCES = \
+ wviewd_wmr918_LDADD =
+
+ # define library directories
+-wviewd_wmr918_LDFLAGS = -L$(prefix)/lib -L$(prefix)/usr/lib -L/usr/lib
+
+ if CROSSCOMPILE
+-wviewd_wmr918_LDFLAGS += $(prefix)/lib/crt1.o $(prefix)/lib/crti.o
$(prefix)/lib/crtn.o
+ endif
+
+--- a/stations/WMRUSB/Makefile.am
++++ b/stations/WMRUSB/Makefile.am
+@@ -7,7 +7,6 @@ bin_PROGRAMS = wviewd_wmrusb
+ INCLUDES = \
+ -I$(top_srcdir)/common \
+ -I$(top_srcdir)/stations/common \
+- -I$(prefix)/include \
+ -D_GNU_SOURCE \
+ -DWV_CONFIG_DIR=\"$(sysconfdir)/wview\" \
+ -DWV_RUN_DIR=\"$(localstatedir)/wview\" \
+@@ -52,11 +51,9 @@ wviewd_wmrusb_SOURCES = \
+
+ if DARWIN
+ wviewd_wmrusb_SOURCES += $(top_srcdir)/stations/common/hidapi-osx.c
+-wviewd_wmrusb_LDFLAGS = -L$(prefix)/lib -L/usr/lib -L/usr/local/lib
-framework IOKit -framework CoreFoundation
+ wviewd_wmrusb_LDADD =
+ else
+ wviewd_wmrusb_SOURCES += $(top_srcdir)/stations/common/hidapi-linux.c
+-wviewd_wmrusb_LDFLAGS = -L$(prefix)/lib -L/usr/lib -L/usr/local/lib
+ if FREEBSD
+ wviewd_wmrusb_LDADD = -lusb
+ else
+--- a/stations/WS-2300/Makefile.am
++++ b/stations/WS-2300/Makefile.am
+@@ -7,7 +7,6 @@ bin_PROGRAMS = wviewd_ws2300
+ INCLUDES = \
+ -I$(top_srcdir)/common \
+ -I$(top_srcdir)/stations/common \
+- -I$(prefix)/include \
+ -D_GNU_SOURCE \
+ -DWV_CONFIG_DIR=\"$(sysconfdir)/wview\" \
+ -DWV_RUN_DIR=\"$(localstatedir)/wview\" \
+@@ -56,9 +55,7 @@ wviewd_ws2300_SOURCES = \
+ wviewd_ws2300_LDADD =
+
+ # define library directories
+-wviewd_ws2300_LDFLAGS = -L$(prefix)/lib -L$(prefix)/usr/lib -L/usr/lib
+
+ if CROSSCOMPILE
+-wviewd_ws2300_LDFLAGS += $(prefix)/lib/crt1.o $(prefix)/lib/crti.o
$(prefix)/lib/crtn.o
+ endif
+
+--- a/stations/WXT510/Makefile.am
++++ b/stations/WXT510/Makefile.am
+@@ -10,7 +10,6 @@ bin_PROGRAMS = wviewd_wxt510
+ INCLUDES = \
+ -I$(top_srcdir)/common \
+ -I$(top_srcdir)/stations/common \
+- -I$(prefix)/include \
+ -D_GNU_SOURCE \
+ -DWV_CONFIG_DIR=\"$(sysconfdir)/wview\" \
+ -DWV_RUN_DIR=\"$(localstatedir)/wview\" \
+@@ -59,9 +58,7 @@ wviewd_wxt510_SOURCES = \
+ wviewd_wxt510_LDADD =
+
+ # define library directories
+-wviewd_wxt510_LDFLAGS = -L$(prefix)/lib -L$(prefix)/usr/lib -L/usr/lib
+
+ if CROSSCOMPILE
+-wviewd_wxt510_LDFLAGS += $(prefix)/lib/crt1.o $(prefix)/lib/crti.o
$(prefix)/lib/crtn.o
+ endif
+
+--- a/stations/WXT510/wxt510config/Makefile.am
++++ b/stations/WXT510/wxt510config/Makefile.am
+@@ -8,7 +8,6 @@ INCLUDES = \
+ -I$(top_srcdir)/common \
+ -I$(top_srcdir)/stations/common \
+ -I$(top_srcdir)/stations/WXT510 \
+- -I$(prefix)/include \
+ -D_WXT510_CONFIG_ONLY \
+ -DWV_CONFIG_DIR=\"$(sysconfdir)/wview\" \
+ -DWV_RUN_DIR=\"$(localstatedir)/wview\" \
+@@ -38,9 +37,7 @@ wxt510config_SOURCES = \
+ wxt510config_LDADD =
+
+ # define library directories
+-wxt510config_LDFLAGS = -L$(prefix)/lib -L$(prefix)/usr/lib -L/usr/lib
+
+ if CROSSCOMPILE
+-wxt510config_LDFLAGS += $(prefix)/lib/crt1.o $(prefix)/lib/crti.o
$(prefix)/lib/crtn.o
+ endif
+
+--- a/utilities/archive-be2le/Makefile.am
++++ b/utilities/archive-be2le/Makefile.am
+@@ -8,7 +8,6 @@ INCLUDES = \
+ -I$(top_srcdir)/common \
+ -I$(top_srcdir)/stations/VantagePro \
+ -I$(top_srcdir)/utilities \
+- -I$(prefix)/include \
+ -DWV_CONFIG_DIR=\"$(sysconfdir)/wview\" \
+ -DWV_RUN_DIR=\"$(localstatedir)/wview\" \
+ -DBUILD_UTILITIES \
+@@ -31,9 +30,7 @@ arc_be2le_SOURCES = \
+ arc_be2le_LDADD =
+
+ # define library directories
+-arc_be2le_LDFLAGS = -L$(prefix)/lib -L$(prefix)/usr/lib -L/usr/lib
+
+ if CROSSCOMPILE
+-arc_be2le_LDFLAGS += $(prefix)/lib/crt1.o $(prefix)/lib/crti.o
$(prefix)/lib/crtn.o
+ endif
+
+--- a/utilities/archive-le2be/Makefile.am
++++ b/utilities/archive-le2be/Makefile.am
+@@ -8,7 +8,6 @@ INCLUDES = \
+ -I$(top_srcdir)/common \
+ -I$(top_srcdir)/stations/VantagePro \
+ -I$(top_srcdir)/utilities \
+- -I$(prefix)/include \
+ -DWV_CONFIG_DIR=\"$(sysconfdir)/wview\" \
+ -DWV_RUN_DIR=\"$(localstatedir)/wview\" \
+ -DBUILD_UTILITIES \
+@@ -31,9 +30,7 @@ arc_le2be_SOURCES = \
+ arc_le2be_LDADD =
+
+ # define library directories
+-arc_le2be_LDFLAGS = -L$(prefix)/lib -L$(prefix)/usr/lib -L/usr/lib
+
+ if CROSSCOMPILE
+-arc_le2be_LDFLAGS += $(prefix)/lib/crt1.o $(prefix)/lib/crti.o
$(prefix)/lib/crtn.o
+ endif
+
+--- a/utilities/hilowcreate/Makefile.am
++++ b/utilities/hilowcreate/Makefile.am
+@@ -6,7 +6,6 @@ bin_PROGRAMS = hilowcreate
+ # define include directories
+ INCLUDES = \
+ -I$(top_srcdir)/common \
+- -I$(prefix)/include \
+ -DWV_CONFIG_DIR=\"$(sysconfdir)/wview\" \
+ -DWV_RUN_DIR=\"$(localstatedir)/wview\" \
+ -DBUILD_UTILITIES=1 \
+@@ -28,9 +27,7 @@ hilowcreate_SOURCES = \
+ hilowcreate_LDADD =
+
+ # define library directories
+-hilowcreate_LDFLAGS = -L$(prefix)/lib -L$(prefix)/usr/lib -L/usr/lib
+
+ if CROSSCOMPILE
+-hilowcreate_LDFLAGS += $(prefix)/lib/crt1.o $(prefix)/lib/crti.o
$(prefix)/lib/crtn.o
+ endif
+
+--- a/utilities/sqlite2wlk/Makefile.am
++++ b/utilities/sqlite2wlk/Makefile.am
+@@ -8,7 +8,6 @@ INCLUDES = \
+ -I$(top_srcdir)/common \
+ -I$(top_srcdir)/stations/VantagePro \
+ -I$(top_srcdir)/utilities \
+- -I$(prefix)/include \
+ -DWV_CONFIG_DIR=\"$(sysconfdir)/wview\" \
+ -DWV_RUN_DIR=\"$(localstatedir)/wview\" \
+ -DBUILD_UTILITIES \
+@@ -29,9 +28,7 @@ sqlite2wlk_SOURCES = \
+ sqlite2wlk_LDADD =
+
+ # define library directories
+-sqlite2wlk_LDFLAGS = -L$(prefix)/lib -L$(prefix)/usr/lib -L/usr/lib
+
+ if CROSSCOMPILE
+-sqlite2wlk_LDFLAGS += $(prefix)/lib/crt1.o $(prefix)/lib/crti.o
$(prefix)/lib/crtn.o
+ endif
+
+--- a/utilities/wlk2sqlite/Makefile.am
++++ b/utilities/wlk2sqlite/Makefile.am
+@@ -8,7 +8,6 @@ INCLUDES = \
+ -I$(top_srcdir)/common \
+ -I$(top_srcdir)/stations/VantagePro \
+ -I$(top_srcdir)/utilities \
+- -I$(prefix)/include \
+ -DWV_CONFIG_DIR=\"$(sysconfdir)/wview\" \
+ -DWV_RUN_DIR=\"$(localstatedir)/wview\" \
+ -DBUILD_UTILITIES \
+@@ -29,9 +28,7 @@ wlk2sqlite_SOURCES = \
+ wlk2sqlite_LDADD =
+
+ # define library directories
+-wlk2sqlite_LDFLAGS = -L$(prefix)/lib -L$(prefix)/usr/lib -L/usr/lib
+
+ if CROSSCOMPILE
+-wlk2sqlite_LDFLAGS += $(prefix)/lib/crt1.o $(prefix)/lib/crti.o
$(prefix)/lib/crtn.o
+ endif
+
+--- a/stations/common/hidapi-linux.c
++++ b/stations/common/hidapi-linux.c
+@@ -79,7 +79,6 @@
+ #else
+ #include "libusb-1.0/libusb.h"
+ #endif
+-#include "iconv.h"
+
+ #include "hidapi.h"
+
diff --git a/utils/wview/patches/020-use-standard-awk.patch
b/utils/wview/patches/020-use-standard-awk.patch
new file mode 100644
index 0000000..10b835e
--- /dev/null
+++ b/utils/wview/patches/020-use-standard-awk.patch
@@ -0,0 +1,22 @@
+Index: wview-5.19.0-jgoerzen/wviewconfig/wviewconfig.sh
+===================================================================
+--- wview-5.19.0-jgoerzen.orig/wviewconfig/wviewconfig.sh 2012-07-29
13:13:25.000000000 +0100
++++ wview-5.19.0-jgoerzen/wviewconfig/wviewconfig.sh 2012-07-29
16:43:22.402524525 +0100
+@@ -206,7 +206,7 @@
+ cd $WVIEW_CONF_DIR
+
+ # Edit parms one at a time:
+- gawk -F"|" '{
++ awk -F"|" '{
+ sysstring=sprintf("./editparm \"%s\" \"%s\" \"%s\" \"%s\"", $1,
$2, $3, $4)
+ system(sysstring)
+ }' $WVIEW_CONF_DIR/parms.out
+@@ -234,7 +234,7 @@
+ cd $WVIEW_CONF_DIR
+
+ # Update parms one at a time:
+- gawk -F"=" '{
++ awk -F"=" '{
+ sysstring=sprintf("./updateparm \"%s\" \"%s\"", $1, $2)
+ system(sysstring)
+ }' $SET_FILE
--
1.7.9.5
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel