From 1c00214ac3ad7f697782e84da767fb55575051be Mon Sep 17 00:00:00 2001
From: ale <ale@incal.net>
Date: Wed, 27 Nov 2013 20:11:27 +0000
Subject: [PATCH] add Debian package metadata

---
 debian/README                    |  6 ++++++
 debian/authserv-doc.install      |  1 +
 debian/changelog                 |  5 +++++
 debian/compat                    |  1 +
 debian/control                   | 19 +++++++++++++++++
 debian/copyright                 | 36 ++++++++++++++++++++++++++++++++
 debian/docs                      |  0
 debian/libpam-authclient.install |  3 +++
 debian/python-authserv.install   |  2 ++
 debian/rules                     | 36 ++++++++++++++++++++++++++++++++
 debian/source/format             |  1 +
 pam/autogen.sh                   | 17 +++++++++++++++
 setup.py                         |  4 ++--
 13 files changed, 129 insertions(+), 2 deletions(-)
 create mode 100644 debian/README
 create mode 100644 debian/authserv-doc.install
 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/libpam-authclient.install
 create mode 100644 debian/python-authserv.install
 create mode 100755 debian/rules
 create mode 100644 debian/source/format
 create mode 100755 pam/autogen.sh

diff --git a/debian/README b/debian/README
new file mode 100644
index 0000000..495710c
--- /dev/null
+++ b/debian/README
@@ -0,0 +1,6 @@
+The Debian Package authserv
+----------------------------
+
+Comments regarding the Package
+
+ -- ale <debian@autistici.org>  Wed, 27 Nov 2013 09:06:49 +0000
diff --git a/debian/authserv-doc.install b/debian/authserv-doc.install
new file mode 100644
index 0000000..d4f4542
--- /dev/null
+++ b/debian/authserv-doc.install
@@ -0,0 +1 @@
+#DOCS#
diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..a325f5c
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+authserv (0.1) unstable; urgency=low
+
+  * Initial Release.
+
+ -- Autistici/Inventati <debian@autistici.org>  Wed, 27 Nov 2013 09:06:49 +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..8b22387
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,19 @@
+Source: authserv
+Section: net
+Priority: extra
+Maintainer: Autistici/Inventati <debian@autistici.org>
+Build-Depends: debhelper (>= 8.0.0), build-essential,
+ python (>= 2.6.6-3~), python-setuptools
+Standards-Version: 3.9.4
+
+Package: libpam-authclient
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: PAM module for authserv.
+ PAM module for authserv.
+
+Package: python-authserv
+Architecture: all
+Depends: ${python:Depends}, ${misc:Depends}
+Description: Auth server package.
+ Centralized authentication server with OTP support.
diff --git a/debian/copyright b/debian/copyright
new file mode 100644
index 0000000..dd888d9
--- /dev/null
+++ b/debian/copyright
@@ -0,0 +1,36 @@
+Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
+Upstream-Name: authserv
+Source: <url://example.com>
+
+Files: *
+Copyright: <years> <put author's name and email here>
+           <years> <likewise for another author>
+License: MIT
+
+Files: debian/*
+Copyright: 2013 ale <debian@autistici.org>
+License: MIT
+
+License: MIT
+ 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.
+
+# Please also look if there are files or directories which have a
+# different copyright/license attached and list them here.
+# Please avoid to pick license terms that are more restrictive than the
+# packaged work, as it may make Debian's contributions unacceptable upstream.
diff --git a/debian/docs b/debian/docs
new file mode 100644
index 0000000..e69de29
diff --git a/debian/libpam-authclient.install b/debian/libpam-authclient.install
new file mode 100644
index 0000000..a25fff4
--- /dev/null
+++ b/debian/libpam-authclient.install
@@ -0,0 +1,3 @@
+debian/tmp/lib/security/pam_authclient.so*
+debian/tmp/usr/include/authclient
+debian/tmp/usr/lib/libauthclient.so*
diff --git a/debian/python-authserv.install b/debian/python-authserv.install
new file mode 100644
index 0000000..d9dda32
--- /dev/null
+++ b/debian/python-authserv.install
@@ -0,0 +1,2 @@
+debian/tmp/usr/bin
+debian/tmp/usr/lib
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..69ff95c
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,36 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+#
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+#
+# Modified to make a template file for a multi-binary package with separated
+# build-arch and build-indep targets  by Bill Allombert 2001
+
+# 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
+
+export PYBUILD_NAME=authserv
+
+
+%:
+	dh $@ --with python2 --buildsystem=pybuild
+
+override_dh_auto_build:
+	(cd pam && ./autogen.sh && ./configure --prefix=/usr && make)
+	dh_auto_build
+
+override_dh_install:
+	(cd pam && make install DESTDIR=$(CURDIR)/debian/tmp)
+	rm -f $(CURDIR)/debian/tmp/lib/security/pam_authclient.so{,.0}
+	mv $(CURDIR)/debian/tmp/lib/security/pam_authclient.so.0.0.0 \
+	   $(CURDIR)/debian/tmp/lib/security/pam_authclient.so
+	dh_auto_install
+	dh_install
+
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..89ae9db
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (native)
diff --git a/pam/autogen.sh b/pam/autogen.sh
new file mode 100755
index 0000000..7f1bedf
--- /dev/null
+++ b/pam/autogen.sh
@@ -0,0 +1,17 @@
+#! /bin/sh
+
+if [ -x "`which autoreconf 2>/dev/null`" ] ; then
+  exec autoreconf -ivf
+fi
+
+if glibtoolize --version > /dev/null 2>&1; then
+  LIBTOOLIZE='glibtoolize'
+else
+  LIBTOOLIZE='libtoolize'
+fi
+
+$LIBTOOLIZE && \
+aclocal -I m4 && \
+autoheader && \
+automake --add-missing --foreign && \
+autoconf
diff --git a/setup.py b/setup.py
index 9322abf..32c31f0 100644
--- a/setup.py
+++ b/setup.py
@@ -9,14 +9,14 @@ setup(
     author="Autistici/Inventati",
     author_email="info@autistici.org",
     url="https://git.autistici.org/ai/authserv",
-    install_requires=["Flask", "python-memcached", "oath", "nose"],
+    install_requires=["Flask", "python-memcached", "nose"],
     setup_requires=[],
     zip_safe=False,
     packages=find_packages(),
     package_data={},
     entry_points={
         'console_scripts': [
-          'tapd = tap.server:main',
+          'authserv = authserv.server:main',
           ],
         }
     )
-- 
GitLab