summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgustavo panizzo <gfa@zumbi.com.ar>2018-03-11 22:34:43 +0800
committergustavo panizzo <gfa@zumbi.com.ar>2018-03-11 22:34:43 +0800
commit1aa7584d2fd635fb418626107a54a851e30f2a1a (patch)
tree5e848dff71eeee4555bee0c800025753e0e8291f
parente45d72486b6bfb08a8e6e2f4c789a6186ffa4e73 (diff)
parentb72d50c2b2fd39f97807c5600ffc859975eae1c0 (diff)
uhubctl (2.0.0-1) unstable; urgency=medium
* Initial release. (Closes: #892424) [dgit import unpatched uhubctl 2.0.0-1]
-rw-r--r--debian/changelog5
-rw-r--r--debian/compat1
-rw-r--r--debian/control17
-rw-r--r--debian/copyright32
-rw-r--r--debian/gbp.conf6
-rw-r--r--debian/patches/debian-ways24
-rw-r--r--debian/patches/series1
-rwxr-xr-xdebian/rules4
-rw-r--r--debian/source/format1
-rw-r--r--debian/tests/control1
-rw-r--r--debian/tests/run-uhubctl-v7
-rw-r--r--debian/uhubctl.docs1
-rw-r--r--debian/watch3
13 files changed, 103 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..d1d49b5
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+uhubctl (2.0.0-1) unstable; urgency=medium
+
+ * Initial release. (Closes: #892424)
+
+ -- gustavo panizzo <gfa@zumbi.com.ar> Sun, 11 Mar 2018 14:34:43 +0000
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..f599e28
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+10
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..ff1943c
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,17 @@
+Source: uhubctl
+Section: electronics
+Priority: optional
+Maintainer: gustavo panizzo <gfa@zumbi.com.ar>
+Build-Depends: debhelper (>= 10.0.0), libusb-1.0-0-dev, autopkgtest
+Standards-Version: 4.1.3
+Homepage: https://github.com/mvp/uhubctl
+
+Package: uhubctl
+Architecture: any
+Depends: ${misc:Depends}, ${shlibs:Depends}
+Description: USB hub per-port power control
+ Utility to control USB power per-port on smart USB hubs.
+ Smart hub is defined as one that implements per-port power switching.
+ .
+ Original idea for this code was inspired by hub-ctrl.c by Niibe Yutaka:
+ http://www.gniibe.org/development/ac-power-control-by-USB-hub
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..73566a6
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,32 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: uhubctl
+Source: <https://github.com/mvp/uhubctl>
+
+Files: *
+Copyright: <2015-2018> Vadim Mikhailov <vadim.mikhailov@gmail.com>
+License: GPL-2
+
+License: GPL-2
+ uhubctl – USB hub per-port power control.
+ .
+ Copyright (c) 2009-2018, Vadim Mikhailov
+ .
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, version 2.
+ .
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+ .
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation, Inc.,
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+ .
+ On Debian systems, the complete text of the GNU General
+ Public License version 2 can be found in "/usr/share/common-licenses/GPL-2".
+
+Files: debian/*
+Copyright: <2018> gustavo panizzo <gfa@zumbi.com.ar>
+License: GPL-2
diff --git a/debian/gbp.conf b/debian/gbp.conf
new file mode 100644
index 0000000..f3a2d52
--- /dev/null
+++ b/debian/gbp.conf
@@ -0,0 +1,6 @@
+[DEFAULT]
+upstream-branch = master
+debian-branch = debian/unstable
+upstream-tag = v%(version)s
+compression = gz
+pristine-tar = True
diff --git a/debian/patches/debian-ways b/debian/patches/debian-ways
new file mode 100644
index 0000000..0aec10b
--- /dev/null
+++ b/debian/patches/debian-ways
@@ -0,0 +1,24 @@
+Description:
+ This patch overrides upstream's method to detect the release
+ version
+Forwarded: no
+Author: gustavo panizzo <gfa@zumbi.com.ar>
+Last-Update: 2018-03-11
+--- a/Makefile
++++ b/Makefile
+@@ -15,7 +15,14 @@ CC ?= gcc
+ CFLAGS ?= -g -O0
+ CFLAGS += -Wall -Wextra -std=c99 -pedantic
+ GIT_VERSION := $(shell git describe --abbrev=4 --dirty --always --tags)
+-CFLAGS += -DPROGRAM_VERSION=\"$(GIT_VERSION)\"
++
++# Gets the full version of the source package including debian version
++DEB_VERSION := $(shell dpkg-parsechangelog | egrep '^Version:' | cut -f 2 -d ' ')
++DEB_NOEPOCH_VERSION := $(shell echo $(DEB_VERSION) | cut -d: -f2-)
++# # Gets only the upstream version of the package
++DEB_UPSTREAM_VERSION := $(shell echo $(DEB_NOEPOCH_VERSION) | sed 's/-[^-]*$$//')
++
++CFLAGS += -DPROGRAM_VERSION=\"$(DEB_UPSTREAM_VERSION)\"
+
+ ifeq ($(UNAME_S),Linux)
+ LDFLAGS += -Wl,-z,relro -lusb-1.0
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..b2e9488
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+debian-ways
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..2d33f6a
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,4 @@
+#!/usr/bin/make -f
+
+%:
+ 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/tests/control b/debian/tests/control
new file mode 100644
index 0000000..5d678f8
--- /dev/null
+++ b/debian/tests/control
@@ -0,0 +1 @@
+Tests: run-uhubctl-v
diff --git a/debian/tests/run-uhubctl-v b/debian/tests/run-uhubctl-v
new file mode 100644
index 0000000..ad9ad39
--- /dev/null
+++ b/debian/tests/run-uhubctl-v
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+exec 2>&1
+
+set -e
+
+uhubctl -v
diff --git a/debian/uhubctl.docs b/debian/uhubctl.docs
new file mode 100644
index 0000000..b43bf86
--- /dev/null
+++ b/debian/uhubctl.docs
@@ -0,0 +1 @@
+README.md
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..11ee23f
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,3 @@
+version=3
+opts=filenamemangle=s/.+\/v?(\d\S*)\.tar\.gz/uhubctl-$1\.tar\.gz/ \
+ https://github.com/mvp/uhubctl/releases .*/v?(\d\S*)\.tar\.gz