From d2af82a6f599f781b17e0c6c3967572242caed00 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Sun, 7 Jul 2019 13:33:48 -0700 Subject: [PATCH] open2300: Switch to GitHub fork It applies the single patch here as well as adding some fixes. The upstream project is dead. Signed-off-by: Rosen Penev --- utils/open2300/Makefile | 23 ++- utils/open2300/patches/001-crosscompile.patch | 139 ------------------ 2 files changed, 9 insertions(+), 153 deletions(-) delete mode 100644 utils/open2300/patches/001-crosscompile.patch diff --git a/utils/open2300/Makefile b/utils/open2300/Makefile index 235461036..41da7bab0 100644 --- a/utils/open2300/Makefile +++ b/utils/open2300/Makefile @@ -1,4 +1,4 @@ -# +# # Copyright (C) 2010 segal.ubi.pt # Copyright (C) 2014 nunojpg@gmail.com # Copyright (C) 2015 dev@localnet.hu @@ -10,19 +10,17 @@ include $(TOPDIR)/rules.mk PKG_NAME:=open2300 -PKG_VERSION:=1.12 -PKG_RELEASE:=5 -PKG_LICENSE:=GPL-2.0+ -PKG_LICENSE_FILES:=COPYING +PKG_SOURCE_DATE:=2014-03-04 +PKG_SOURCE_VERSION:=1af8ae609da66f8e1b745533c19095c9758bfb0b +PKG_RELEASE:=1 -PKG_SOURCE_PROTO:=svn -PKG_SOURCE_URL:=http://www.lavrsen.dk/svn/open2300/trunk -PKG_SOURCE_VERSION:=r12 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz -PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) -PKG_CHECK_FORMAT_SECURITY:=0 +PKG_SOURCE_PROTO:=git +PKG_SOURCE_URL:=https://github.com/wezm/open2300 +PKG_MIRROR_HASH:=3287ca1c70e736dd1c6c3abb01e0d986f91573c7c54b9adabdc437309dc4fd56 PKG_MAINTAINER:=Gabor SZOLLOSI +PKG_LICENSE:=GPL-2.0-or-later +PKG_LICENSE_FILES:=COPYING include $(INCLUDE_DIR)/package.mk @@ -37,9 +35,6 @@ define Package/open2300/description This is an utility suite used to communicate with and collect data from a WS23XX wheather station. endef -MAKE_FLAGS += \ - CFLAGS="$(TARGET_CFLAGS) -DVERSION=\"$(PKG_VERSION)\"" - define Package/open2300/install $(INSTALL_DIR) $(1)/usr/bin $(INSTALL_BIN) $(PKG_BUILD_DIR)/bin2300 $(1)/usr/bin/ diff --git a/utils/open2300/patches/001-crosscompile.patch b/utils/open2300/patches/001-crosscompile.patch deleted file mode 100644 index 09530470a..000000000 --- a/utils/open2300/patches/001-crosscompile.patch +++ /dev/null @@ -1,139 +0,0 @@ ---- a/Makefile -+++ b/Makefile -@@ -15,87 +15,82 @@ - prefix = /usr/local - exec_prefix = ${prefix} - bindir = ${exec_prefix}/bin -+libdir = ${prefix}/lib - - ######################################### - - CC = gcc --OBJ = open2300.o rw2300.o linux2300.o win2300.o --LOGOBJ = log2300.o rw2300.o linux2300.o win2300.o --FETCHOBJ = fetch2300.o rw2300.o linux2300.o win2300.o --WUOBJ = wu2300.o rw2300.o linux2300.o win2300.o --CWOBJ = cw2300.o rw2300.o linux2300.o win2300.o --DUMPOBJ = dump2300.o rw2300.o linux2300.o win2300.o --HISTOBJ = history2300.o rw2300.o linux2300.o win2300.o --HISTLOGOBJ = histlog2300.o rw2300.o linux2300.o win2300.o --DUMPBINOBJ = bin2300.o rw2300.o linux2300.o win2300.o --XMLOBJ = xml2300.o rw2300.o linux2300.o win2300.o --PGSQLOBJ = pgsql2300.o rw2300.o linux2300.o win2300.o --LIGHTOBJ = light2300.o rw2300.o linux2300.o win2300.o --INTERVALOBJ = interval2300.o rw2300.o linux2300.o win2300.o --MINMAXOBJ = minmax2300.o rw2300.o linux2300.o win2300.o --MYSQLHISTLOGOBJ = mysqlhistlog2300.o rw2300.o linux2300.o win2300.o -+LIB = lib2300 -+LIB_C = rw2300.c linux2300.c -+LIBOBJ = rw2300.o linux2300.o - - VERSION = 1.11 - - CFLAGS = -Wall -O3 -DVERSION=\"$(VERSION)\" --CC_LDFLAGS = -lm --CC_WINFLAG = --# For Windows - comment the two line above and un-comment the two lines below. --#CC_LDFLAGS = -lm -lwsock32 --#CC_WINFLAG = -mwindows -+CC_LDFLAGS = -L. -lm -l2300 -+LFLAGS = -shared -Wl,-soname - INSTALL = install -+MAKE_EXEC = $(CC) $(CFLAGS) $@.c -o $@ $(CC_LDFLAGS) - - ####### Build rules - --all: open2300 dump2300 log2300 fetch2300 wu2300 cw2300 history2300 histlog2300 bin2300 xml2300 light2300 interval2300 minmax2300 mysql2300 mysqlhistlog2300 -+all: open2300 dump2300 log2300 fetch2300 wu2300 cw2300 history2300 histlog2300 bin2300 xml2300 light2300 interval2300 minmax2300 #mysql2300 mysqlhistlog2300 - --open2300 : $(OBJ) -- $(CC) $(CFLAGS) -o $@ $(OBJ) $(CC_LDFLAGS) -- --dump2300 : $(DUMPOBJ) -- $(CC) $(CFLAGS) -o $@ $(DUMPOBJ) $(CC_LDFLAGS) -+lib2300 : -+ $(CC) -c -fPIC $(CFLAGS) $(LIB_C) -+ $(CC) $(LFLAGS),$@.so -o $@.so.$(VERSION) $(LIBOBJ) -+ ln -sf $@.so.$(VERSION) $@.so -+ -+open2300 : $(LIB) -+ $(MAKE_EXEC) - --log2300 : $(LOGOBJ) -- $(CC) $(CFLAGS) -o $@ $(LOGOBJ) $(CC_LDFLAGS) $(CC_WINFLAG) -+dump2300 : $(LIB) -+ $(MAKE_EXEC) - --fetch2300 : $(FETCHOBJ) -- $(CC) $(CFLAGS) -o $@ $(FETCHOBJ) $(CC_LDFLAGS) -+log2300 : $(LIB) -+ $(MAKE_EXEC) - --wu2300 : $(WUOBJ) -- $(CC) $(CFLAGS) -o $@ $(WUOBJ) $(CC_LDFLAGS) $(CC_WINFLAG) -+fetch2300 : $(LIB) -+ $(MAKE_EXEC) -+ -+srv2300 : $(LIB) -+ $(MAKE_EXEC) -+ -+wu2300 : $(LIB) -+ $(MAKE_EXEC) - --cw2300 : $(CWOBJ) -- $(CC) $(CFLAGS) -o $@ $(CWOBJ) $(CC_LDFLAGS) $(CC_WINFLAG) -+cw2300 : $(LIB) -+ $(MAKE_EXEC) - --history2300 : $(HISTOBJ) -- $(CC) $(CFLAGS) -o $@ $(HISTOBJ) $(CC_LDFLAGS) -+history2300 : $(LIB) -+ $(MAKE_EXEC) - --histlog2300 : $(HISTLOGOBJ) -- $(CC) $(CFLAGS) -o $@ $(HISTLOGOBJ) $(CC_LDFLAGS) $(CC_WINFLAG) -+histlog2300 : $(LIB) -+ $(MAKE_EXEC) - --bin2300 : $(DUMPBINOBJ) -- $(CC) $(CFLAGS) -o $@ $(DUMPBINOBJ) $(CC_LDFLAGS) -+bin2300 : $(LIB) -+ $(MAKE_EXEC) - --xml2300 : $(XMLOBJ) -- $(CC) $(CFLAGS) -o $@ $(XMLOBJ) $(CC_LDFLAGS) $(CC_WINFLAG) -+xml2300 : $(LIB) -+ $(MAKE_EXEC) - --mysql2300: -- $(CC) $(CFLAGS) -o mysql2300 mysql2300.c rw2300.c linux2300.c $(CC_LDFLAGS) $(CC_WINFLAG) -I/usr/include/mysql -L/usr/lib/mysql -lmysqlclient -+mysql2300: $(LIB) -+ $(CC) $(CFLAGS) $@.c -o $@ -I/usr/include/mysql -L/usr/lib/mysql $(CC_LDFLAGS) -lmysqlclient - --pgsql2300: $(PGSQLOBJ) -- $(CC) $(CFLAGS) -o $@ $(PGSQLOBJ) $(CC_LDFLAGS) $(CC_WINFLAG) -I/usr/include/pgsql -L/usr/lib/pgsql -lpq -+pgsql2300: $(LIB) -+ $(CC) $(CFLAGS) $@.c -o $@ -I/usr/include/pgsql -L/usr/lib/pgsql $(CC_LDFLAGS) -lpq - --light2300: $(LIGHTOBJ) -- $(CC) $(CFLAGS) -o $@ $(LIGHTOBJ) $(CC_LDFLAGS) -+light2300: $(LIB) -+ $(MAKE_EXEC) - --interval2300: $(INTERVALOBJ) -- $(CC) $(CFLAGS) -o $@ $(INTERVALOBJ) $(CC_LDFLAGS) -+interval2300: $(LIB) -+ $(MAKE_EXEC) - --minmax2300: $(MINMAXOBJ) -- $(CC) $(CFLAGS) -o $@ $(MINMAXOBJ) $(CC_LDFLAGS) $(CC_WINFLAG) -+minmax2300: $(LIB) -+ $(MAKE_EXEC) - --mysqlhistlog2300 : -- $(CC) $(CFLAGS) -o mysqlhistlog2300 mysqlhistlog2300.c rw2300.c linux2300.c $(CC_LDFLAGS) $(CC_WINFLAG) -I/usr/include/mysql -L/usr/lib/mysql -lmysqlclient -+mysqlhistlog2300 : $(LIB) -+ $(CC) $(CFLAGS) $@.c -o $@ -I/usr/include/mysql -L/usr/lib/mysql $(CC_LDFLAGS) -lmysqlclient - - - install: