Browse Source

ykush-control 1.1.0+ds-1

Christoph Biedl 7 years ago
parent
commit
c537d43249

+ 5 - 0
debian/changelog

@@ -0,0 +1,5 @@
+ykush-control (1.1.0+ds-1) unstable; urgency=medium
+
+  * Initial release. Closes: #849842
+
+ -- Christoph Biedl <debian.axhn@manchmal.in-ulm.de>  Fri, 13 Jan 2017 07:26:28 +0100

+ 1 - 0
debian/compat

@@ -0,0 +1 @@
+10

+ 18 - 0
debian/control

@@ -0,0 +1,18 @@
+Source: ykush-control
+Maintainer: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
+Homepage: https://github.com/Yepkit/ykush
+Standards-Version: 3.9.8
+Build-Depends: debhelper (>= 10~),
+    pandoc,
+    libhidapi-dev,
+Priority: extra
+Section: utils
+
+Package: ykush-control
+Architecture: any
+Depends: ${misc:Depends}, ${shlibs:Depends},
+Description: control application for Yepkit YKUSH Switchable USB Hub board
+ The Yepkit USB Switchable Hub (YKUSH) boards allow the user to
+ selectively switch ON and OFF each of the USB devices connected to the
+ hub downstream ports. This package provides the ykushcmd program to
+ control the switches of all connected boards.

+ 33 - 0
debian/copyright

@@ -0,0 +1,33 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Source: https://github.com/Yepkit/ykush
+Files-Excluded:
+    ykushcmd/linux
+    ykushcmd/windows
+
+Files: *
+Copyright: 2015-2017 Yepkit Lda
+License: MIT
+
+Files:
+ debian/*
+Copyright: 2017 Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
+License: MIT
+
+License: MIT
+ Permission is hereby granted, free of charge, to any person obtaining a
+ copy of this software and associated documentation files (the "Software"),
+ to deal in the Software without restriction, including without limitation
+ the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ and/or sell copies of the Software, and to permit persons to whom the
+ Software is furnished to do so, subject to the following conditions:
+ .
+ The above copyright notice and this permission notice shall be included
+ in all copies or substantial portions of the Software.
+ .
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

+ 56 - 0
debian/patches/fix-build.patch

@@ -0,0 +1,56 @@
+Description: Several changes to make the build succeed
+Author: Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
+
+    * Use hidapi-libusb provided by Debian
+    * Use the build flags to make hardening build succeed
+    * Provide an install target
+    * Don't abort from failing "make clean"
+
+--- a/Makefile
++++ b/Makefile
+@@ -1,23 +1,21 @@
+-CUR_PATH = $(shell echo $(PWD))
+ OBJS = $(addprefix ykushcmd/objs/,ykushcmd.o commandParser.o usbcom.o)
+-LIBS = -lhidapi-libusb -lusb-1.0 -ludev
+-LOADPATHS = -L$(CUR_PATH)/ykushcmd/linux
+-PREPROCESSOR_DEFS = -DLINUX
+-CPP = g++
++LIBS = -lhidapi-libusb
+ 
+-ykushcmd : $(OBJS)
+-	$(CPP) $(LOADPATHS) -o bin/ykushcmd $(OBJS) $(LIBS)
++bin/ykushcmd : $(OBJS)
++	$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -o bin/ykushcmd $(OBJS) $(LIBS)
+ 
+ 
+ ykushcmd/objs/ykushcmd.o : ykushcmd/ykushcmd.cpp ykushcmd/commandParser.h
+-	$(CPP) $(PREPROCESSOR_DEFS) -c ykushcmd/ykushcmd.cpp -o ykushcmd/objs/ykushcmd.o
++	$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -c ykushcmd/ykushcmd.cpp -o ykushcmd/objs/ykushcmd.o
+ 
+-ykushcmd/objs/commandParser.o : ykushcmd/commandParser.cpp ykushcmd/commandParser.h ykushcmd/usbcom.h 
+-	$(CPP) $(PREPROCESSOR_DEFS) -c ykushcmd/commandParser.cpp -o ykushcmd/objs/commandParser.o
++ykushcmd/objs/commandParser.o : ykushcmd/commandParser.cpp ykushcmd/commandParser.h ykushcmd/usbcom.h
++	$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -c ykushcmd/commandParser.cpp -o ykushcmd/objs/commandParser.o
+ 
+-ykushcmd/objs/usbcom.o : ykushcmd/usbcom.cpp ykushcmd/linux/hidapi.h ykushcmd/usbcom.h
+-	$(CPP) $(PREPROCESSOR_DEFS) -c ykushcmd/usbcom.cpp -o ykushcmd/objs/usbcom.o
++ykushcmd/objs/usbcom.o : ykushcmd/usbcom.cpp ykushcmd/usbcom.h
++	$(CXX) $(CXXFLAGS) $(CPPFLAGS) $(LDFLAGS) -c ykushcmd/usbcom.cpp -o ykushcmd/objs/usbcom.o
+ 
+ clean :
+-	rm -f bin/ykushcmd $(OBJS)
++	-rm -f bin/ykushcmd $(OBJS)
+ 
++install:
++	install -D bin/ykushcmd $(DESTDIR)/usr/bin/ykushcmd
+--- a/ykushcmd/usbcom.cpp
++++ b/ykushcmd/usbcom.cpp
+@@ -59,7 +59,7 @@
+ #ifndef LINUX
+ 	#include "windows\hidapi.h"
+ #else
+-	#include "linux/hidapi.h"
++	#include <hidapi/hidapi.h>
+ #endif
+ 
+ #include "usbcom.h"

+ 1 - 0
debian/patches/series

@@ -0,0 +1 @@
+fix-build.patch

+ 14 - 0
debian/rules

@@ -0,0 +1,14 @@
+#!/usr/bin/make -f
+
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+
+%:
+	dh $@
+
+override_dh_installman:
+	pandoc --standalone --to man debian/ykushcmd.md -o debian/ykushcmd.1
+	dh_installman
+
+override_dh_auto_clean:
+	dh_auto_clean
+	-rm debian/ykushcmd.1

+ 1 - 0
debian/source/format

@@ -0,0 +1 @@
+3.0 (quilt)

+ 4 - 0
debian/watch

@@ -0,0 +1,4 @@
+version=4
+opts="repacksuffix=+ds,dversionmangle=s/\+ds$//,compression=xz" \
+    https://github.com/Yepkit/ykush/releases \
+    /Yepkit/ykush/archive/v?([0-9.]+)\.zip

+ 1 - 0
debian/ykush-control.manpages

@@ -0,0 +1 @@
+debian/ykushcmd.1

+ 54 - 0
debian/ykushcmd.md

@@ -0,0 +1,54 @@
+% YKUSHCMD(1) ykushcmd User Manual | ykushcmd
+
+# NAME
+
+**ykushcmd** - Control application for Yepkit YKUSH Switchable USB Hub board
+
+# SYNOPSIS
+
+| **ykushcmd** [**-l**] [**-d** _port_] [**-u** _port_] [**-g** _port_] [**-s** _serial_]
+
+# DESCRIPTION
+
+**ykushcmd** allows you to control the ports of a Yepkit YKUSH
+Switchable USB Hub board.
+
+## Options
+
+**-l**
+  ~ List all currently attached YKUSH boards.
+
+**-d** _port_
+
+  ~ Turn the given port down/off.
+
+**-u** _port_
+
+  ~ Turn the given port up/on.
+
+**-d** _port_
+
+  ~ Get the switching status of the given port.
+
+**-s** _serial_
+
+  ~ Select the board by serial number. Needed if there's more than
+  one board connected.
+
+
+Using "a" as _port_ will affect all ports.
+
+# BUGS
+
+See GitHub Issues: <https://github.com/Yepkit/ykush/issues>
+
+If no board is detected, **ykushcmd -g a** will show one board with all
+three ports in status **UNKNOWN**.
+
+# COPYRIGHT & LICENSE
+
+**ykush** is Copyright (c) 2016 Yepkit Lda and is licensed under MIT
+license.
+
+This manpage was written by Christoph Biedl <debian.axhn@manchmal.in-ulm.de>
+for the Debian project but may be used by others.