Add support for packaging debian (deb) packages

Message ID 20191125175229.3364-1-stefan.schantl@ipfire.org
State Accepted
Commit 3da6e70c4dd63590bab8e8b43f70600c6d91472b
Headers
Series Add support for packaging debian (deb) packages |

Commit Message

Stefan Schantl Nov. 25, 2019, 5:52 p.m. UTC
  Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
---
 debian/changelog                |  5 ++++
 debian/compat                   |  1 +
 debian/control                  | 52 +++++++++++++++++++++++++++++++++
 debian/copyright                | 26 +++++++++++++++++
 debian/libloc-dev.install       |  3 ++
 debian/libloc-perl.install      |  1 +
 debian/libloc.install           |  6 ++++
 debian/libloc.lintian-overrides |  1 +
 debian/libloc.manpages          |  2 ++
 debian/rules                    | 13 +++++++++
 debian/source/format            |  1 +
 11 files changed, 111 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/libloc-dev.install
 create mode 100644 debian/libloc-perl.install
 create mode 100644 debian/libloc.install
 create mode 100644 debian/libloc.lintian-overrides
 create mode 100644 debian/libloc.manpages
 create mode 100755 debian/rules
 create mode 100644 debian/source/format
  

Patch

diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..0a47a3d
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@ 
+libloc (0.9.0-1) UNRELEASED; urgency=medium
+
+  * Initial release. (Closes: #XXXXXX)
+
+ -- Stefan Schantl <stefan.schantl@ipfire.org>  Sun, 27 Oct 2019 18:55:44 +0100
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..85e2f04
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,52 @@ 
+Source: libloc
+Maintainer: Stefan Schantl <stefan.schantl@ipfire.org>
+Section: misc
+Priority: optional
+Standards-Version: 4.3.0
+Build-Depends:
+ debhelper (>= 11),
+ dh-python <!nopython>,
+ libpython3-all-dev <!nopython>,
+ libsystemd-dev,
+ python3-all-dev:any <!nopython>,
+Rules-Requires-Root: no
+Homepage: https://location.ipfire.org/
+Vcs-Git: https://git.ipfire.org/pub/git/location/libloc.git
+Vcs-Browser: https://git.ipfire.org/pub/git/location/libloc.git
+
+Package: libloc
+Architecture: any
+Pre-Depends:
+ ${misc:Pre-Depends}
+Depends:
+ perl,
+ ${shlibs:Depends},
+ ${misc:Depends},
+ ${python3:Depends},
+Multi-Arch: same
+Description: Location library
+ A library to determine the location of someone on the Internet
+
+Package: libloc-dev
+Architecture: any
+Section: libdevel
+Depends:
+ libloc (= ${binary:Version}),
+ ${misc:Depends},
+Suggests:
+ pkg-config,
+Multi-Arch: same
+Description: Development files for libloc.
+ Install this package if you wish to develop your own programs using
+ libloc.
+
+Package: libloc-perl
+Architecture: any
+Section: perl
+Depends:
+ ${misc:Depends},
+ ${perl:Depends},
+ ${shlibs:Depends}
+Multi-Arch: same
+Description: Perl bindings for libloc
+ This package contains simple perl bindings for libloc.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..151d53a
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,26 @@ 
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: libloc
+Upstream-Contact: Michael Tremer <michael.tremer@ipfire.org>
+Source: https://location.ipfire.org/download
+
+Files: *
+Copyright: 2017-2019 IPFire Development team <info@ipfire.org>
+License: LGPL-2.1
+
+Files: debian/*
+Copyright: 2019 Stefan Schantl stefan.schantl@ipfire.org>
+License: LGPL-2.1
+
+License: LGPL-2.1
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as published by the
+ Free Software Foundation; version 2.1 of the License, or (at
+ your option) any later version.
+ .
+ You should have received a copy of the GNU Lesser 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.
+ .
+ The complete text of the GNU General Public License
+ can be found in /usr/share/common-licenses/LGPL-2.1 file.
+ .
diff --git a/debian/libloc-dev.install b/debian/libloc-dev.install
new file mode 100644
index 0000000..d93d217
--- /dev/null
+++ b/debian/libloc-dev.install
@@ -0,0 +1,3 @@ 
+usr/include/libloc
+usr/lib/*/libloc.so
+usr/lib/*/pkgconfig
diff --git a/debian/libloc-perl.install b/debian/libloc-perl.install
new file mode 100644
index 0000000..08e8cc4
--- /dev/null
+++ b/debian/libloc-perl.install
@@ -0,0 +1 @@ 
+usr/lib/*/perl/
diff --git a/debian/libloc.install b/debian/libloc.install
new file mode 100644
index 0000000..55567b1
--- /dev/null
+++ b/debian/libloc.install
@@ -0,0 +1,6 @@ 
+usr/bin/location-downloader
+usr/bin/location-query
+usr/lib/*/libloc.so.*
+usr/lib/python3*/*-packages/*.so
+src/systemd/*.service		/lib/systemd/system/
+src/systemd/*.timer		/lib/systemd/system/
diff --git a/debian/libloc.lintian-overrides b/debian/libloc.lintian-overrides
new file mode 100644
index 0000000..ca2589e
--- /dev/null
+++ b/debian/libloc.lintian-overrides
@@ -0,0 +1 @@ 
+libloc: package-name-doesnt-match-sonames libloc0
diff --git a/debian/libloc.manpages b/debian/libloc.manpages
new file mode 100644
index 0000000..c2f1630
--- /dev/null
+++ b/debian/libloc.manpages
@@ -0,0 +1,2 @@ 
+man/location-downloader.8
+man/location-query.8
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..55d4334
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,13 @@ 
+#!/usr/bin/make -f
+
+# enable verbose mode
+#export DH_VERBOSE=1
+
+# enable all hardening build flags
+export DEB_BUILD_MAINT_OPTIONS=hardening=+all
+
+%:
+	dh $@ --with python3 --with-systemd
+
+override_dh_perl:
+	dh_perl -d
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)