From 09480e32df7a54597dd6b2891f1707a626be04e8 Mon Sep 17 00:00:00 2001
From: ale <ale@incal.net>
Date: Sun, 16 Nov 2014 10:30:29 +0000
Subject: [PATCH] add Debian package metadata

---
 debian/.gitignore |  4 ++++
 debian/changelog  |  6 ++++++
 debian/compat     |  1 +
 debian/control    | 14 ++++++++++++++
 debian/copyright  | 20 ++++++++++++++++++++
 debian/rules      | 23 +++++++++++++++++++++++
 6 files changed, 68 insertions(+)
 create mode 100644 debian/.gitignore
 create mode 100644 debian/changelog
 create mode 100644 debian/compat
 create mode 100644 debian/control
 create mode 100644 debian/copyright
 create mode 100755 debian/rules

diff --git a/debian/.gitignore b/debian/.gitignore
new file mode 100644
index 0000000..ceba5cb
--- /dev/null
+++ b/debian/.gitignore
@@ -0,0 +1,4 @@
+liber
+*.debhelper.log
+*.substvars
+files
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..9d37cfa
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,6 @@
+liber (0.1) unstable; urgency=low
+
+  * Initial Release.
+
+ -- ale <ale@incal.net>  Sun, 16 Nov 2014 09:10:34 +0000
+
diff --git a/debian/compat b/debian/compat
new file mode 100644
index 0000000..45a4fb7
--- /dev/null
+++ b/debian/compat
@@ -0,0 +1 @@
+8
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..6e77e8c
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,14 @@
+Source: liber
+Section: net
+Priority: extra
+Maintainer: ale <ale@incal.net>
+Build-Depends: debhelper (>= 8.0.0), libicu-dev, libleveldb-dev (>=1.15)
+Standards-Version: 3.9.4
+Homepage: https://git.autistici.org/ale/liber
+
+Package: liber
+Architecture: any
+Depends: libleveldb1 (>=1.15), ${shlibs:Depends}, ${misc:Depends}
+Description: Ebook collection indexer.
+ Index and search an ebook collection.
+
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..c7214aa
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,20 @@
+Copyright (c) 2014 <ale@incal.net>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+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 OR COPYRIGHT HOLDERS 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.
+
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..268071d
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,23 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+# This has to be exported to make some magic below work.
+export DH_OPTIONS
+
+DEBDIR = $(CURDIR)/debian
+PKGDIR = $(DEBDIR)/liber
+
+%:
+	dh $@ 
+
+override_dh_install:
+	# Build the sources using your locally-installed Go version.
+	# This is crazy, clearly, but it's a temporary workaround for wheezy.
+	install -m 755 -o root -g root -d $(PKGDIR)/usr/bin
+	install -m 755 -o root -g root -d $(PKGDIR)/usr/share/liber
+	go build -o $(PKGDIR)/usr/bin/liber cmd/liber/liber.go
+	(umask 022; cp -R --preserve=timestamps htdocs $(PKGDIR)/usr/share/liber/htdocs)
+
-- 
GitLab