[Debian-iot-packaging] [openzwave-controlpanel] 81/81: Initial Debian packaging

Dara Adib daradib-guest at moszumanska.debian.org
Thu Dec 22 16:57:57 UTC 2016


This is an automated email from the git hooks/post-receive script.

daradib-guest pushed a commit to branch debian/master
in repository openzwave-controlpanel.

commit 54933ab317d526d61ef8142c6fa4ad4863778dc6
Author: Dara Adib <daradib at ocf.berkeley.edu>
Date:   Wed Dec 21 16:47:19 2016 -0500

    Initial Debian packaging
---
 debian/TODO                        | 11 ++++++
 debian/changelog                   |  5 +++
 debian/compat                      |  1 +
 debian/control                     | 17 +++++++++
 debian/copyright                   | 33 ++++++++++++++++++
 debian/dirs                        |  1 +
 debian/docs                        |  1 +
 debian/gbp.conf                    |  3 ++
 debian/install                     |  2 ++
 debian/patches/0001-Makefile.patch | 70 ++++++++++++++++++++++++++++++++++++++
 debian/patches/0002-paths.patch    | 47 +++++++++++++++++++++++++
 debian/patches/series              |  2 ++
 debian/rules                       |  5 +++
 debian/source/format               |  1 +
 debian/source/lintian-overrides    |  2 ++
 15 files changed, 201 insertions(+)

diff --git a/debian/TODO b/debian/TODO
new file mode 100644
index 0000000..86ec0a1
--- /dev/null
+++ b/debian/TODO
@@ -0,0 +1,11 @@
+ - Use libjs-bootstrap and libjs-jquery packages instead of CDN
+   (lintian privacy-breach-uses-embedded-file).
+ - Add manpage for ozwcp binary
+   (lintian binary-without-manpage).
+ - Change CFLAGS and LDFLAGS in Makefile
+   (lintian hardening-no-bindnow, hardening-no-fortify-functions).
+ - Add pristine-tar branch if needed.
+ - Review debian/copyright. The W3C license looks slightly modified.
+ - Consider patching webserver.cpp to use mkstemp instead of mktemp
+   and forward change upstream. This would fix a gcc warning.
+ - Add a watch file if upstream starts making releases (GitHub #51).
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..37f482b
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+openzwave-controlpanel (0.2a+git20161006.a390f35-1) unstable; urgency=medium
+
+  * Initial release (Closes: #849010)
+
+ -- Dara Adib <daradib at ocf.berkeley.edu>  Wed, 21 Dec 2016 14:01:50 -0500
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..ec63514
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+9
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..b655371
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,17 @@
+Source: openzwave-controlpanel
+Section: comm
+Priority: optional
+Maintainer: Debian IoT Maintainers <debian-iot-maintainers at lists.alioth.debian.org>
+Uploaders: Dara Adib <daradib at ocf.berkeley.edu>
+Build-Depends: debhelper (>= 9), libopenzwave1.5-dev, libmicrohttpd-dev
+Standards-Version: 3.9.8
+Homepage: https://github.com/OpenZWave/open-zwave-control-panel
+Vcs-Git: https://anonscm.debian.org/git/debian-iot/openzwave-controlpanel.git
+Vcs-Browser: https://anonscm.debian.org/cgit/debian-iot/openzwave-controlpanel.git
+
+Package: openzwave-controlpanel
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: OpenZWave Control Panel
+ OpenZWave Control Panel (ozwcp) permits users to query, manage and
+ monitor Z-Wave nodes and networks. It provides a web-based user interface.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..60ea1b1
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,33 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: open-zwave-control-panel
+Upstream-Contact: Justin Hammond <justin at dynam.ac>
+Source: https://github.com/OpenZWave/open-zwave-control-panel
+
+Files: *
+Copyright: 2010 Greg Satz <satz at iranger.com>
+           2014 Justin Hammond <justin at dynam.ac>
+License: W3C
+ This work (including software, documents, or other related items) is being
+ provided by the copyright holders under the following license. By obtaining,
+ using and/or copying this work, you (the licensee) agree that you have read,
+ understood, and will comply with the following terms and conditions:
+ .
+ Permission to use, copy, and distribute this software and its documentation,
+ without modification, for any purpose and without fee or royalty is hereby
+ granted, provided that you include the full text of this NOTICE on ALL
+ copies of the software and documentation or portions thereof.
+ .
+ THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS
+ MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT
+ LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR
+ PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE
+ ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS.
+ .
+ COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR
+ CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR
+ DOCUMENTATION.
+ .
+ The name and trademarks of copyright holders may NOT be used in advertising
+ or publicity pertaining to the software without specific, written prior
+ permission.  Title to copyright in this software and any associated
+ documentation will at all times remain with copyright holders.
diff --git a/debian/dirs b/debian/dirs
new file mode 100644
index 0000000..29b2023
--- /dev/null
+++ b/debian/dirs
@@ -0,0 +1 @@
+usr/share/openzwave-controlpanel
diff --git a/debian/docs b/debian/docs
new file mode 100644
index 0000000..e845566
--- /dev/null
+++ b/debian/docs
@@ -0,0 +1 @@
+README
diff --git a/debian/gbp.conf b/debian/gbp.conf
new file mode 100644
index 0000000..a95b851
--- /dev/null
+++ b/debian/gbp.conf
@@ -0,0 +1,3 @@
+[DEFAULT]
+debian-branch = debian/master
+pristine-tar = False
diff --git a/debian/install b/debian/install
new file mode 100644
index 0000000..f4706da
--- /dev/null
+++ b/debian/install
@@ -0,0 +1,2 @@
+ozwcp usr/bin
+*.html *.js *.png usr/share/openzwave-controlpanel
diff --git a/debian/patches/0001-Makefile.patch b/debian/patches/0001-Makefile.patch
new file mode 100644
index 0000000..d0b935b
--- /dev/null
+++ b/debian/patches/0001-Makefile.patch
@@ -0,0 +1,70 @@
+From: Dara Adib <daradib at ocf.berkeley.edu>
+Date: Wed, 21 Dec 2016 16:55:01 -0500
+Subject: Makefile
+
+Upstream Makefile is configured to build on Mac OS X.
+Build against packaged Debian libraries instead.
+---
+ Makefile | 29 +++++++++++++----------------
+ 1 file changed, 13 insertions(+), 16 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index a2ac64d..387efca 100644
+--- a/Makefile
++++ b/Makefile
+@@ -21,28 +21,25 @@ DEBUG_LDFLAGS	:= -g
+ CFLAGS	:= -c $(DEBUG_CFLAGS)
+ LDFLAGS	:= $(DEBUG_LDFLAGS)
+ 
+-OPENZWAVE := ../open-zwave/
+-LIBMICROHTTPD := -L/usr/local/lib/ -lmicrohttpd
++OPENZWAVE := /usr/include/openzwave
++LIBMICROHTTPD := -lmicrohttpd
+ 
+-INCLUDES := -I $(OPENZWAVE)/cpp/src -I $(OPENZWAVE)/cpp/src/command_classes/ \
+-	-I $(OPENZWAVE)/cpp/src/value_classes/ -I $(OPENZWAVE)/cpp/src/platform/ \
+-	-I $(OPENZWAVE)/cpp/src/platform/unix -I $(OPENZWAVE)/cpp/tinyxml/ \
+-	-I /usr/local/include/
++INCLUDES := -I $(OPENZWAVE) -I $(OPENZWAVE)/command_classes \
++	-I $(OPENZWAVE)/value_classes -I $(OPENZWAVE)/platform \
++	-I $(OPENZWAVE)/platform/unix -I $(OPENZWAVE)/tinyxml
+ 
+ # Remove comment below for gnutls support
+ #GNUTLS := -lgnutls
+ 
+ # for Linux uncomment out next three lines
+-LIBZWAVE := $(wildcard $(OPENZWAVE)/*.a)
++LIBZWAVE := -lopenzwave
+ #LIBUSB := -ludev
+-#LIBS := $(LIBZWAVE) $(GNUTLS) $(LIBMICROHTTPD) -pthread $(LIBUSB) -lresolv
++LIBS := $(LIBZWAVE) $(LIBMICROHTTPD) -pthread
+ 
+ # for Mac OS X comment out above 2 lines and uncomment next 5 lines
+ #ARCH := -arch i386 -arch x86_64
+ #CFLAGS += $(ARCH)
+ #LIBZWAVE := $(wildcard $(OPENZWAVE)/cpp/lib/mac/*.a)
+-LIBUSB := -framework IOKit -framework CoreFoundation
+-LIBS := $(LIBZWAVE) $(GNUTLS) $(LIBMICROHTTPD) -pthread $(LIBUSB) $(ARCH) -lresolv
+ 
+ %.o : %.cpp
+ 	$(CXX) $(CFLAGS) $(INCLUDES) -o $@ $<
+@@ -59,13 +56,13 @@ ifeq ($(LIBZWAVE),)
+ 	@exit 1
+ endif
+ 
+-ozwcp.o: ozwcp.h webserver.h $(OPENZWAVE)/cpp/src/Options.h $(OPENZWAVE)/cpp/src/Manager.h \
+-	$(OPENZWAVE)/cpp/src/Node.h $(OPENZWAVE)/cpp/src/Group.h \
+-	$(OPENZWAVE)/cpp/src/Notification.h $(OPENZWAVE)/cpp/src/platform/Log.h
++ozwcp.o: ozwcp.h webserver.h $(OPENZWAVE)/Options.h $(OPENZWAVE)/Manager.h \
++	$(OPENZWAVE)/Node.h $(OPENZWAVE)/Group.h \
++	$(OPENZWAVE)/Notification.h $(OPENZWAVE)/platform/Log.h
+ 
+-webserver.o: webserver.h ozwcp.h $(OPENZWAVE)/cpp/src/Options.h $(OPENZWAVE)/cpp/src/Manager.h \
+-	$(OPENZWAVE)/cpp/src/Node.h $(OPENZWAVE)/cpp/src/Group.h \
+-	$(OPENZWAVE)/cpp/src/Notification.h $(OPENZWAVE)/cpp/src/platform/Log.h
++webserver.o: webserver.h ozwcp.h $(OPENZWAVE)/Options.h $(OPENZWAVE)/Manager.h \
++	$(OPENZWAVE)/Node.h $(OPENZWAVE)/Group.h \
++	$(OPENZWAVE)/Notification.h $(OPENZWAVE)/platform/Log.h
+ 
+ ozwcp:	ozwcp.o webserver.o zwavelib.o $(LIBZWAVE)
+ 	$(LD) -o $@ $(LDFLAGS) ozwcp.o webserver.o zwavelib.o $(LIBS)
diff --git a/debian/patches/0002-paths.patch b/debian/patches/0002-paths.patch
new file mode 100644
index 0000000..5a80ec9
--- /dev/null
+++ b/debian/patches/0002-paths.patch
@@ -0,0 +1,47 @@
+From: Dara Adib <daradib at ocf.berkeley.edu>
+Date: Wed, 21 Dec 2016 17:32:19 -0500
+Subject: paths
+
+Hard-code Debian paths:
+ - OpenZWave config in /etc/openzwave
+ - static web files in /usr/share/openzwave-controlpanel
+---
+ ozwcp.cpp     | 2 +-
+ webserver.cpp | 8 ++++----
+ 2 files changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/ozwcp.cpp b/ozwcp.cpp
+index 580d70f..55e0e6b 100644
+--- a/ozwcp.cpp
++++ b/ozwcp.cpp
+@@ -792,7 +792,7 @@ int32 main(int32 argc, char* argv[])
+ 	for (i = 0; i < MAX_NODES; i++)
+ 		nodes[i] = NULL;
+ 
+-	Options::Create("./config/", "", "--SaveConfiguration=true --DumpTriggerLevel=0");
++	Options::Create("/etc/openzwave/", "", "--SaveConfiguration=true --DumpTriggerLevel=0");
+ 	Options::Get()->Lock();
+ 
+ 	Manager::Create();
+diff --git a/webserver.cpp b/webserver.cpp
+index f6aa67b..e066f23 100644
+--- a/webserver.cpp
++++ b/webserver.cpp
+@@ -1126,13 +1126,13 @@ int Webserver::Handler (struct MHD_Connection *conn, const char *url,
+ 	if (strcmp(method, MHD_HTTP_METHOD_GET) == 0) {
+ 		if (strcmp(url, "/") == 0 ||
+ 				strcmp(url, "/index.html") == 0)
+-			ret = web_send_file(conn, "cp.html", MHD_HTTP_OK, false);
++			ret = web_send_file(conn, "/usr/share/openzwave-controlpanel/cp.html", MHD_HTTP_OK, false);
+ 		else if (strcmp(url, "/scenes.html") == 0)
+-			ret = web_send_file(conn, "scenes.html", MHD_HTTP_OK, false);
++			ret = web_send_file(conn, "/usr/share/openzwave-controlpanel/scenes.html", MHD_HTTP_OK, false);
+ 		else if (strcmp(url, "/cp.js") == 0)
+-			ret = web_send_file(conn, "cp.js", MHD_HTTP_OK, false);
++			ret = web_send_file(conn, "/usr/share/openzwave-controlpanel/cp.js", MHD_HTTP_OK, false);
+ 		else if (strcmp(url, "/favicon.png") == 0)
+-			ret = web_send_file(conn, "openzwavetinyicon.png", MHD_HTTP_OK, false);
++			ret = web_send_file(conn, "/usr/share/openzwave-controlpanel/openzwavetinyicon.png", MHD_HTTP_OK, false);
+ 		else if (strcmp(url, "/poll.xml") == 0 && (devname != NULL || usb))
+ 			ret = SendPollResponse(conn);
+ 		else if (strcmp(url, "/devices.xml") == 0 && (devname != NULL || usb))
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..1c8c1ee
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+0001-Makefile.patch
+0002-paths.patch
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..2467950
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,5 @@
+#!/usr/bin/make -f
+#DH_VERBOSE = 1
+
+%:
+	dh $@
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/source/lintian-overrides b/debian/source/lintian-overrides
new file mode 100644
index 0000000..3c69347
--- /dev/null
+++ b/debian/source/lintian-overrides
@@ -0,0 +1,2 @@
+# JavaScript contains a long line of HTML table elements, not minified code.
+openzwave-controlpanel source: source-is-missing cp.js line length*

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-iot/openzwave-controlpanel.git



More information about the Debian-iot-packaging mailing list