diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 0000000..f106ba5 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,5 @@ +rtl-wmbus (0.0-1) unstable; urgency=medium + + * Initial release (Closes: #998720) + + -- Petter Reinholdtsen Thu, 28 Apr 2022 07:17:49 +0200 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..b19a558 --- /dev/null +++ b/debian/control @@ -0,0 +1,18 @@ +Source: rtl-wmbus +Section: unknown +Priority: optional +Maintainer: Petter Reinholdtsen +Build-Depends: debhelper-compat (= 13) +Standards-Version: 4.5.1 +Homepage: https://github.com/xaelsouth/rtl-wmbus +Vcs-Browser: https://github.com/xaelsouth/rtl-wmbus +Vcs-Git: https://github.com/xaelsouth/rtl-wmbus.git +Rules-Requires-Root: no + +Package: rtl-wmbus +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} + , rtl-sdr +Description: software defined receiver for Wireless-M-Bus with RTL-SDR + Allow for receiving meter data via radio according to an European + standard for remote reading of smart meters. diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 0000000..215ec91 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,36 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: rtl-wmbus +Upstream-Contact: xael.south@yandex.com +Source: https://github.com/xaelsouth/rtl-wmbus + +Files: * +Copyright: 2010-2012 Ivan Voras + 2012 Tim Hartrick + 2017-2021 +License: BSD-2-Clause + +Files: debian/* +Copyright: 2022 Petter Reinholdtsen +License: BSD-2-Clause + +License: BSD-2-Clause + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + . + THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. diff --git a/debian/patches/1000-build-install-deb.patch b/debian/patches/1000-build-install-deb.patch new file mode 100644 index 0000000..238afc8 --- /dev/null +++ b/debian/patches/1000-build-install-deb.patch @@ -0,0 +1,27 @@ +Description: Adjust build system to work with Debian packagin +Author: Petter Reinholdtsen +Forwarded: https://github.com/xaelsouth/rtl-wmbus/pull/33 +Reviewed-By: Petter Reinholdtsen +Last-Update: 2022-04-28 + +--- rtl-wmbus-0.0.orig/Makefile ++++ rtl-wmbus-0.0/Makefile +@@ -5,7 +5,7 @@ STRIP=strip + + OUTDIR?=build + OUTFILE="$(OUTDIR)/rtl_wmbus" +-CFLAGS?=-Iinclude -std=gnu99 ++CFLAGS+=-Iinclude -std=gnu99 + CFLAGS_WARNINGS?=-Wall -W -Waggregate-return -Wbad-function-cast -Wcast-align -Wcast-qual -Wchar-subscripts -Wcomment -Wno-float-equal -Winline -Wmain -Wmissing-noreturn -Wno-missing-prototypes -Wparentheses -Wpointer-arith -Wredundant-decls -Wreturn-type -Wshadow -Wsign-compare -Wstrict-prototypes -Wswitch -Wunreachable-code -Wno-unused -Wuninitialized + LIB?=-lm + SRC=rtl_wmbus.c +@@ -62,7 +62,8 @@ pi1: + rebuild: clean all + + install: release +- cp -f $(OUTFILE) /usr/bin ++ install -d $(DESTDIR)/usr/bin ++ install $(OUTFILE) $(DESTDIR)/usr/bin + + clean: + $(RM) -rf "$(OUTDIR)" diff --git a/debian/patches/README b/debian/patches/README new file mode 100644 index 0000000..80c1584 --- /dev/null +++ b/debian/patches/README @@ -0,0 +1,3 @@ +0xxx: Grabbed from upstream development. +1xxx: Possibly relevant for upstream adoption. +2xxx: Only relevant for official Debian release. diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..d80ef37 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +1000-build-install-deb.patch diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..953dd56 --- /dev/null +++ b/debian/rules @@ -0,0 +1,16 @@ +#!/usr/bin/make -f +# See debhelper(7) (uncomment to enable) +# output every command that modifies files on the build system. +#export DH_VERBOSE = 1 + +# see FEATURE AREAS in dpkg-buildflags(1) +export DEB_BUILD_MAINT_OPTIONS = hardening=+all + +# see ENVIRONMENT in dpkg-buildflags(1) +# package maintainers to append CFLAGS +export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic +# package maintainers to append LDFLAGS +export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed + +%: + 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/watch b/debian/watch new file mode 100644 index 0000000..0908782 --- /dev/null +++ b/debian/watch @@ -0,0 +1,8 @@ +# See uscan(1) for format + +# Compulsory line, this is a version 4 file +version=4 + +opts="filenamemangle=s%(?:.*?)?v?(\d[\d.]*)\.tar\.gz%rtl-wmbus-$1.tar.gz%" \ + https://github.com/xaelsouth/rtl-wmbus/tags \ + (?:.*?/)?v?(\d[\d.]*)\.tar\.gz debian uupdate