From b19405c94d277d05269fb390aac230f0956c2312 Mon Sep 17 00:00:00 2001
From: Alexandre Iooss <erdnaxe@crans.org>
Date: Wed, 15 Apr 2020 17:19:49 +0200
Subject: [PATCH] Working Debian package build

---
 .gitignore       |  6 ++++++
 README.rst       |  7 +++++++
 debian/copyright | 28 ++++++++++++++++++++++++++++
 debian/watch     |  1 -
 4 files changed, 41 insertions(+), 1 deletion(-)
 create mode 100644 debian/copyright
 delete mode 100644 debian/watch

diff --git a/.gitignore b/.gitignore
index 44031fa..305a974 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,6 +7,12 @@ __pycache__
 _build
 *.mo
 .pybuild
+
+# Debian package
+debian/cranspasswords.substvars
+debian/cranspasswords
+debian/debhelper-build-stamp
+debian/files
 *.debhelper
 
 # Virtualenvs
diff --git a/README.rst b/README.rst
index 7d1067a..ac2b4d8 100644
--- a/README.rst
+++ b/README.rst
@@ -80,6 +80,13 @@ where is his configuration :
 
    export CRANSPASSWORDS_CLIENT_CONFIG_DIR=/path/to/config/dir/
 
+Build Debian package
+~~~~~~~~~~~~~~~~~~~~
+
+You need to install ``debmake dh-python debhelper python3-all``.
+Then in the repository root you can run ``dpkg-buildpackage``.
+The build files will be in ``../``.
+
 Install completion
 ------------------
 
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..f29b478
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,28 @@
+Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: Les Nounous
+Upstream-Contact: Les Nounous <nounous@crans.org>
+Source: https://gitlab.crans.org/nounous/cranspasswords
+
+Files: *
+Copyright: 2015-2020 Cr@ns <roots@crans.org>
+License: GPL-3+
+ 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; either
+ version 3 of the License, or (at your option) any later
+ version.
+ .
+ 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 package; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+ Boston, MA  02110-1301 USA
+ .
+ On Debian systems, the full text of the GNU General Public
+ License version 3 can be found in the file
+ `/usr/share/common-licenses/GPL-3'.
diff --git a/debian/watch b/debian/watch
deleted file mode 100644
index 9e7c0da..0000000
--- a/debian/watch
+++ /dev/null
@@ -1 +0,0 @@
-version=3
-- 
GitLab