summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Hagström2016-10-05 21:31:32 +0200
committerLars Hagström2016-10-05 21:31:32 +0200
commit918d230818b74831bb8e9c2da1f767420bb394c0 (patch)
tree1fbdc8cc7fde9f03665dd76c88cdd0962db0d8be
downloadaur-open-zwave-control-panel-git.tar.gz
first version
-rw-r--r--.SRCINFO23
-rw-r--r--.gitignore6
-rw-r--r--Makefile64
-rw-r--r--PKGBUILD44
-rw-r--r--open-zwave-control-panel.service12
5 files changed, 149 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..4c070cb0c5c
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,23 @@
+# Generated by mksrcinfo v8
+# Wed Oct 5 19:18:51 UTC 2016
+pkgbase = open-zwave-control-panel-git
+ pkgdesc = TODO
+ pkgver = r77.2bfa075
+ pkgrel = 1
+ url = https://github.com/OpenZWave/open-zwave-control-panel
+ arch = any
+ license = TODO
+ depends = libmicrohttpd
+ depends = openzwave-git
+ depends = gnutls
+ source = open-zwave-control-panel-git::git+https://github.com/OpenZWave/open-zwave-control-panel.git
+ source = open-zwave::git+https://github.com/OpenZWave/open-zwave.git
+ source = Makefile
+ source = open-zwave-control-panel.service
+ sha1sums = SKIP
+ sha1sums = SKIP
+ sha1sums = cf11c507c2f70ade84df23907e37c2454f1df99a
+ sha1sums = 60cf35ece5593cfb6b48ffc17e8391a0e8d032ae
+
+pkgname = open-zwave-control-panel-git
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..01a4063c549
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,6 @@
+*.tar.xz
+pkg/
+src/
+open-zwave
+*~
+open-zwave-control-panel-git
diff --git a/Makefile b/Makefile
new file mode 100644
index 00000000000..1d6f5f4271e
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,64 @@
+#
+# Makefile for OpenzWave Control Panel application
+# Greg Satz
+
+# GNU make only
+
+.SUFFIXES: .cpp .o .a .s
+
+CC := $(CROSS_COMPILE)gcc
+CXX := $(CROSS_COMPILE)g++
+LD := $(CROSS_COMPILE)g++
+AR := $(CROSS_COMPILE)ar rc
+RANLIB := $(CROSS_COMPILE)ranlib
+
+DEBUG_CFLAGS := -Wall -Wno-unknown-pragmas -Wno-inline -Wno-format -g -DDEBUG -ggdb -O0
+RELEASE_CFLAGS := -Wall -Wno-unknown-pragmas -Werror -Wno-format -O3 -DNDEBUG
+
+DEBUG_LDFLAGS := -g
+
+# Change for DEBUG or RELEASE
+CFLAGS := -c $(DEBUG_CFLAGS)
+LDFLAGS := $(DEBUG_LDFLAGS)
+
+LIBMICROHTTPD := -L/usr/local/lib/ -lmicrohttpd
+
+INCLUDES := -I/usr/include/openzwave \
+ -I/usr/include/openzwave/platform \
+ -I/usr/include/openzwave/value_classes \
+ -I/usr/include/openzwave/unix \
+ -I../open-zwave/cpp/tinyxml
+
+GNUTLS := -lgnutls
+LIBZWAVE := -lopenzwave
+LIBUSB := -ludev
+LIBS := $(LIBZWAVE) $(GNUTLS) $(LIBMICROHTTPD) -pthread $(LIBUSB) -lresolv
+
+%.o : %.cpp
+ $(CXX) $(CFLAGS) $(INCLUDES) -o $@ $<
+
+%.o : %.c
+ $(CC) $(CFLAGS) $(INCLUDES) -o $@ $<
+
+all: defs ozwcp
+
+
+defs:
+ifeq ($(LIBZWAVE),)
+ @echo Please edit the Makefile to avoid this error message.
+ @exit 1
+endif
+
+ozwcp.o: ozwcp.h webserver.h
+
+webserver.o: webserver.h ozwcp.h
+
+ozwcp: ozwcp.o webserver.o zwavelib.o $(LIBZWAVE)
+ $(LD) -o $@ $(LDFLAGS) ozwcp.o webserver.o zwavelib.o $(LIBS)
+
+dist: ozwcp
+ rm -f ozwcp.tar.gz
+ tar -c --exclude=".svn" -hvzf ozwcp.tar.gz ozwcp config/ cp.html cp.js openzwavetinyicon.png README
+
+clean:
+ rm -f ozwcp *.o
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..432007fca3e
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,44 @@
+# Maintainer: Lars Hagström <lars@teg>
+pkgname=open-zwave-control-panel-git
+pkgver=r77.2bfa075
+pkgrel=1
+pkgdesc="TODO"
+arch=(any)
+url="https://github.com/OpenZWave/open-zwave-control-panel"
+license=(TODO)
+groups=()
+depends=("libmicrohttpd" "openzwave-git" "gnutls")
+makedepends=()
+backup=()
+options=()
+install=
+source=("$pkgname"::"git+https://github.com/OpenZWave/open-zwave-control-panel.git"
+ "open-zwave"::"git+https://github.com/OpenZWave/open-zwave.git"
+ "Makefile"
+ "open-zwave-control-panel.service")
+sha1sums=('SKIP'
+ 'SKIP'
+ 'cf11c507c2f70ade84df23907e37c2454f1df99a'
+ '60cf35ece5593cfb6b48ffc17e8391a0e8d032ae')
+
+pkgver() {
+ cd "$srcdir/$pkgname"
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+package() {
+ cp Makefile "$srcdir/$pkgname"
+ cd "$srcdir/$pkgname"
+ make
+
+ install -d -m 755 $pkgdir/usr/bin
+ install ozwcp $pkgdir/usr/bin
+
+ install -d -m 755 $pkgdir/usr/share/open-zwave-control-panel/
+ install -m 644 *.html $pkgdir/usr/share/open-zwave-control-panel/
+ install -m 644 *.js $pkgdir/usr/share/open-zwave-control-panel/
+
+ install -d -m 755 $pkgdir/usr/lib/systemd/user/
+ install -m 644 $srcdir/open-zwave-control-panel.service $pkgdir/usr/lib/systemd/user/
+}
+
diff --git a/open-zwave-control-panel.service b/open-zwave-control-panel.service
new file mode 100644
index 00000000000..969f0d2ca63
--- /dev/null
+++ b/open-zwave-control-panel.service
@@ -0,0 +1,12 @@
+[Unit]
+Description=OpenZWave Control Panel
+After=network.target
+
+[Service]
+WorkingDirectory=/usr/share/open-zwave-control-panel
+ExecStart=/usr/bin/ozwcp -p 8090
+Restart=always
+RestartSec=10
+
+[Install]
+WantedBy=default.target