From f0c41d90df42af4e60659b2b6e039f12332b83cd Mon Sep 17 00:00:00 2001 From: Serge Schneider Date: Mon, 11 Sep 2017 17:45:36 +0100 Subject: [PATCH] Add packaging files --- debian/changelog | 17 +++++++++++++++ debian/compat | 1 + debian/control | 39 ++++++++++++++++++++++++++++++++++ debian/copyright | 31 +++++++++++++++++++++++++++ debian/docs | 1 + debian/patches/01-destdir.diff | 28 ++++++++++++++++++++++++ debian/patches/series | 1 + debian/pigpio.install | 5 +++++ debian/pigpiod.service | 8 +++++++ debian/python-pigpio.install | 1 + debian/python3-pigpio.install | 1 + debian/rules | 20 +++++++++++++++++ debian/source/format | 1 + 13 files changed, 154 insertions(+) create mode 100644 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/copyright create mode 100644 debian/docs create mode 100644 debian/patches/01-destdir.diff create mode 100644 debian/patches/series create mode 100644 debian/pigpio.install create mode 100644 debian/pigpiod.service create mode 100644 debian/python-pigpio.install create mode 100644 debian/python3-pigpio.install create mode 100755 debian/rules create mode 100644 debian/source/format diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..8490ec6 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,17 @@ +pigpio (1.64-1) stretch; urgency=medium + + * Upstream release V64 + + -- Serge Schneider Mon, 11 Sep 2017 17:44:03 +0100 + +pigpio (1.60-1) jessie; urgency=medium + + * Upstream release V60 + + -- Serge Schneider Thu, 12 Jan 2017 14:35:43 +0000 + +pigpio (1.30-1) jessie; urgency=medium + + * Initial release + + -- Serge Schneider Wed, 13 Apr 2016 12:15:37 +0100 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..1e8da41 --- /dev/null +++ b/debian/control @@ -0,0 +1,39 @@ +Source: pigpio +Section: utils +Priority: optional +Maintainer: Serge Schneider +Build-Depends: debhelper (>= 9), dh-python, python-all, python-setuptools, + python3-all, python3-setuptools, dh-systemd +Standards-Version: 3.9.6 +Homepage: http://abyz.co.uk/rpi/pigpio/ +X-Python-Version: >= 2.6 +X-Python3-Version: >= 3.2 + +Package: pigpio +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Library for Raspberry Pi GPIO control + Library for the Raspberry which allows control of the General Purpose Input + Outputs (GPIO). + . + pigpio is written in C but may be used by other languages. + In particular the pigpio daemon offers a socket and pipe interface to the + underlying library. + +Package: python-pigpio +Section: python +Architecture: all +Depends: ${misc:Depends}, ${python:Depends} +Recommends: pigpio +Description: Python module which talks to the pigpio daemon (Python 2) + Library for the Raspberry which allows control of the General Purpose Input + Outputs (GPIO). + +Package: python3-pigpio +Section: python +Architecture: all +Depends: ${misc:Depends}, ${python3:Depends} +Recommends: pigpio +Description: Python module which talks to the pigpio daemon (Python 3) + Library for the Raspberry which allows control of the General Purpose Input + Outputs (GPIO). diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..15ff8e9 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,31 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: pigpio +Source: http://abyz.co.uk/rpi/pigpio/ + +Files: * +Copyright: 2013 Joan +License: unlicense + This is free and unencumbered software released into the public domain. + . + Anyone is free to copy, modify, publish, use, compile, sell, or + distribute this software, either in source code form or as a compiled + binary, for any purpose, commercial or non-commercial, and by any + means. + . + In jurisdictions that recognize copyright laws, the author or authors + of this software dedicate any and all copyright interest in the + software to the public domain. We make this dedication for the benefit + of the public at large and to the detriment of our heirs and + successors. We intend this dedication to be an overt act of + relinquishment in perpetuity of all present and future rights to this + software under copyright law. + . + 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 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. + . + For more information, please refer to 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/patches/01-destdir.diff b/debian/patches/01-destdir.diff new file mode 100644 index 0000000..c5a2276 --- /dev/null +++ b/debian/patches/01-destdir.diff @@ -0,0 +1,28 @@ +--- a/Makefile ++++ b/Makefile +@@ -31,7 +31,7 @@ + + LL3 = -L. -lpigpiod_if2 -pthread -lrt + +-prefix = /usr/local ++prefix = /usr + exec_prefix = $(prefix) + bindir = $(exec_prefix)/bin + includedir = $(prefix)/include +@@ -90,13 +90,13 @@ + install -m 0755 pig2vcd $(DESTDIR)$(bindir) + install -m 0755 pigpiod $(DESTDIR)$(bindir) + install -m 0755 pigs $(DESTDIR)$(bindir) +- if which python2; then python2 setup.py install; fi +- if which python3; then python3 setup.py install; fi ++ if which python2; then python2 setup.py install --install-layout=deb --root=$(DESTDIR); fi ++ if which python3; then python3 setup.py install --install-layout=deb --root=$(DESTDIR); fi + install -m 0755 -d $(DESTDIR)$(mandir)/man1 + install -m 0644 *.1 $(DESTDIR)$(mandir)/man1 + install -m 0755 -d $(DESTDIR)$(mandir)/man3 + install -m 0644 *.3 $(DESTDIR)$(mandir)/man3 +- ldconfig ++ #ldconfig + + uninstall: + rm -f $(DESTDIR)$(includedir)/pigpio.h diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..95bb36c --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +01-destdir.diff diff --git a/debian/pigpio.install b/debian/pigpio.install new file mode 100644 index 0000000..6e8709d --- /dev/null +++ b/debian/pigpio.install @@ -0,0 +1,5 @@ +debian/tmp/opt +debian/tmp/usr/lib/*.so* +debian/tmp/usr/include +debian/tmp/usr/man +debian/tmp/usr/bin diff --git a/debian/pigpiod.service b/debian/pigpiod.service new file mode 100644 index 0000000..3039e3e --- /dev/null +++ b/debian/pigpiod.service @@ -0,0 +1,8 @@ +[Unit] +Description=Daemon required to control GPIO pins via pigpio +[Service] +ExecStart=/usr/bin/pigpiod -l +ExecStop=/bin/systemctl kill pigpiod +Type=forking +[Install] +WantedBy=multi-user.target diff --git a/debian/python-pigpio.install b/debian/python-pigpio.install new file mode 100644 index 0000000..630d71b --- /dev/null +++ b/debian/python-pigpio.install @@ -0,0 +1 @@ +debian/tmp/usr/lib/python2.7 diff --git a/debian/python3-pigpio.install b/debian/python3-pigpio.install new file mode 100644 index 0000000..41b3092 --- /dev/null +++ b/debian/python3-pigpio.install @@ -0,0 +1 @@ +debian/tmp/usr/lib/python3 diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..4895da5 --- /dev/null +++ b/debian/rules @@ -0,0 +1,20 @@ +#!/usr/bin/make -f + +DPKG_EXPORT_BUILDFLAGS = 1 + +export DEB_BUILD_MAINT_OPTIONS = hardening=+all + +export DEB_CFLAGS_MAINT_APPEND = -Wno-format-security + +%: + dh $@ --with python2,python3,systemd + +override_dh_clean: + rm -rf build + dh_clean + +override_dh_systemd_start: + dh_systemd_start --name pigpiod --no-start + +override_dh_systemd_enable: + dh_systemd_enable --name pigpiod --no-enable 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) -- 2.30.2