--- csync2-1.34.orig/configure
+++ csync2-1.34/configure
@@ -3836,7 +3836,7 @@
   else
     LIBGNUTLS_CFLAGS=`$LIBGNUTLS_CONFIG $libgnutls_config_args --cflags`
     LIBGNUTLS_LIBS=`$LIBGNUTLS_CONFIG $libgnutls_config_args --libs`
-    libgnutls_config_version=`$LIBGNUTLS_CONFIG $libgnutls_config_args --version`
+    libgnutls_config_version=`$LIBGNUTLS_CONFIG $libgnutls_config_args --modversion`
 
 
       ac_save_CFLAGS="$CFLAGS"
--- csync2-1.34.orig/debian/docs
+++ csync2-1.34/debian/docs
@@ -0,0 +1,4 @@
+NEWS
+README
+TODO
+paper.pdf
--- csync2-1.34.orig/debian/compat
+++ csync2-1.34/debian/compat
@@ -0,0 +1 @@
+4
--- csync2-1.34.orig/debian/dirs
+++ csync2-1.34/debian/dirs
@@ -0,0 +1,4 @@
+etc
+usr/sbin
+var/lib/csync2
+usr/share/csync2
--- csync2-1.34.orig/debian/README.Debian
+++ csync2-1.34/debian/README.Debian
@@ -0,0 +1,12 @@
+csync2 for Debian
+-----------------
+
+You need to create an SSL certificate for the local Csync2 server.
+You can create a certificate using the following commands:
+
+openssl genrsa -out /etc/csync2_ssl_key.pem 1024
+openssl req -new -key /etc/csync2_ssl_key.pem -out /etc/csync2_ssl_cert.csr
+openssl x509 -req -days 600 -in /etc/csync2_ssl_cert.csr \
+        -signkey /etc/csync2_ssl_key.pem -out /etc/csync2_ssl_cert.pem
+
+ -- Michael Prokop <mika@grml.org>, Fri, 23 Sep 2005 12:11:25 +0200
--- csync2-1.34.orig/debian/prerm
+++ csync2-1.34/debian/prerm
@@ -0,0 +1,41 @@
+#! /bin/sh
+# prerm script for csync2
+#
+# see: dh_installdeb(1)
+
+# set -e
+
+# summary of how this script can be called:
+#        * <prerm> `remove'
+#        * <old-prerm> `upgrade' <new-version>
+#        * <new-prerm> `failed-upgrade' <old-version>
+#        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
+#        * <deconfigured's-prerm> `deconfigure' `in-favour'
+#          <package-being-installed> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+
+case "$1" in
+    remove|upgrade|deconfigure)
+
+	update-inetd --remove '^csync2'
+        if [ -f /var/run/inetd.pid ] ; then
+            kill -s HUP cat /var/run/inetd.pid 2>/dev/null
+	fi
+        ;;
+    failed-upgrade)
+        ;;
+    *)
+        echo "prerm called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
--- csync2-1.34.orig/debian/copyright
+++ csync2-1.34/debian/copyright
@@ -0,0 +1,16 @@
+This package was debianized by Cyril Bouthors <cyril@bouthors.org> on
+Sat, 24 Dec 2005 15:46:13 +0300.
+
+It was downloaded from http://oss.linbit.com/csync2/
+
+Copyright Holder: Cliffor Wolf <clifford.wolf@linbit.com>
+
+License:
+
+Csync2 is free software; you can redistribute them and/or modify them
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 2 of the License, or (at your
+option) any later version.
+
+On Debian systems, the complete text of the GNU General Public
+License can be found in /usr/share/common-licenses/GPL file.
--- csync2-1.34.orig/debian/changelog
+++ csync2-1.34/debian/changelog
@@ -0,0 +1,101 @@
+csync2 (1.34-2.2.8.201403181702) ucs4-0-0-0; urgency=low
+
+  * UCS auto build. No patches were applied to the original source package
+
+ -- Univention builddaemon <buildd@univention.de>  Tue, 18 Mar 2014 17:02:44 +0100
+
+csync2 (1.34-2.2) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Fix erroneous distribution tag in changelog.
+
+ -- Kumar Appaiah <akumar@debian.org>  Mon, 31 Aug 2009 11:29:12 -0500
+
+csync2 (1.34-2.1) UNRELEASED; urgency=low
+
+  * Non-maintainer upload.
+  * Alter configure script and control to use pkg-config
+    to find the gnutls version. (Closes: #529819)
+
+ -- Kumar Appaiah <akumar@debian.org>  Sat, 22 Aug 2009 23:58:17 -0500
+
+csync2 (1.34-2) unstable; urgency=low
+
+  * New maintainers. (closes: #500351)
+  * Add inetd dependencies. (closes: #488279)
+
+ -- Norbert Tretkowski <nobse@debian.org>  Thu, 09 Apr 2009 12:37:36 +0200
+
+csync2 (1.34-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Cyril Bouthors <cyril@bouthors.org>  Sun, 12 Aug 2007 12:16:35 +0200
+
+csync2 (1.33-2) unstable; urgency=low
+
+  * put paper.pdf into /usr/share/doc/csync2/ (closes: 359260).
+
+ -- Cyril Bouthors <cyril@bouthors.org>  Sun, 20 Aug 2006 20:27:27 +0300
+
+csync2 (1.33-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Cyril Bouthors <cyril@bouthors.org>  Mon, 14 Aug 2006 15:00:26 +0300
+
+csync2 (1.32-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Cyril Bouthors <cyril@bouthors.org>  Wed, 26 Apr 2006 10:55:29 +0200
+
+csync2 (1.31-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Cyril Bouthors <cyril@bouthors.org>  Mon,  3 Apr 2006 23:40:41 +0200
+
+csync2 (1.30-3) unstable; urgency=low
+
+  * typo in debian/control
+
+ -- Cyril Bouthors <cyril@bouthors.org>  Tue, 28 Mar 2006 16:05:52 +0200
+
+csync2 (1.30-2) unstable; urgency=low
+
+  * Added dep on netbase>=4.25 to avoid spoiling /etc/services (closes:
+    351942).
+
+ -- Cyril Bouthors <cyril@bouthors.org>  Tue, 28 Mar 2006 15:15:06 +0200
+
+csync2 (1.30-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Cyril Bouthors <cyril@bouthors.org>  Sat,  4 Feb 2006 09:37:37 +0300
+
+csync2 (1.29-3) unstable; urgency=low
+
+  * debian/control: removed Build-Depends to libc6-dev (closes: #346025).
+
+ -- Cyril Bouthors <cyril@bouthors.org>  Thu,  5 Jan 2006 09:14:32 +0300
+
+csync2 (1.29-2) unstable; urgency=low
+
+  * debian/control: added missing Build-Depends to flex (closes: 345965).
+
+ -- Cyril Bouthors <cyril@bouthors.org>  Wed,  4 Jan 2006 18:15:59 +0300
+
+csync2 (1.29-1) unstable; urgency=low
+
+  * New upstream release : replaced OpenSSL library with GNU TLS library
+    in order to fix legal issues.
+
+ -- Cyril Bouthors <cyril@bouthors.org>  Mon,  2 Jan 2006 18:50:35 +0300
+
+csync2 (1.28-1) unstable; urgency=low
+
+  * Initial release (closes: #344532).
+
+ -- Cyril Bouthors <cyril@bouthors.org>  Sat, 24 Dec 2005 15:46:13 +0300
--- csync2-1.34.orig/debian/cron.d
+++ csync2-1.34/debian/cron.d
@@ -0,0 +1,23 @@
+#
+#  Test if this synchronization pair is in sync.
+#
+#  csync2 - cluster synchronization tool, 2nd generation
+#  LINBIT Information Technologies GmbH <http://www.linbit.com>
+#  Copyright (C) 2004, 2005  Clifford Wolf <clifford@clifford.at>
+#
+#  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 2 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 program; if not, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+#
+#
+# 0 4 * * * root csync2 -cr / ; csync2 -T <my-hostname> <peer-hostname>
--- csync2-1.34.orig/debian/postinst
+++ csync2-1.34/debian/postinst
@@ -0,0 +1,47 @@
+#! /bin/sh
+# postinst script for csync2
+#
+# see: dh_installdeb(1)
+
+# set -e
+
+# summary of how this script can be called:
+#        * <postinst> `configure' <most-recently-configured-version>
+#        * <old-postinst> `abort-upgrade' <new version>
+#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+#          <new-version>
+#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#          <failed-install-package> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+
+case "$1" in
+    configure)
+
+    if ! grep -q "^csync2" /etc/inetd.conf ; then
+	update-inetd --remove '^csync2'
+	update-inetd --group OTHER --add \
+                     'csync2\t\tstream\ttcp\tnowait\troot\t/usr/sbin/csync2\tcsync2 -i'
+    fi
+
+
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
--- csync2-1.34.orig/debian/control
+++ csync2-1.34/debian/control
@@ -0,0 +1,16 @@
+Source: csync2
+Section: admin
+Priority: optional
+Maintainer: Debian HA Maintainers <debian-ha-maintainers@lists.alioth.debian.org>
+Uploaders: Norbert Tretkowski <nobse@debian.org>
+Build-Depends: debhelper (>= 4.0.0), librsync-dev, libsqlite0-dev, libgnutls-dev, bison, flex, pkg-config
+Standards-Version: 3.8.0
+
+Package: csync2
+Architecture: any
+Depends: ${shlibs:Depends}, netbase (>=4.25), openbsd-inetd | inet-superserver
+Suggests: sqlite
+Description: cluster synchronization tool
+ CSYNC2 synchronizes files in a cluster using the rsync-algorithm.
+ It maintains a database of modified files so it is able to handle
+ deletion of files and file modification conflicts.
--- csync2-1.34.orig/debian/rules
+++ csync2-1.34/debian/rules
@@ -0,0 +1,74 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# GNU copyright 1997 to 1999 by Joey Hess.
+
+# Uncomment this to turn on verbose mode.
+export DH_VERBOSE=1
+
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+	CFLAGS += -O0
+else
+	CFLAGS += -O2
+endif
+ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
+	INSTALL_PROGRAM += -s
+endif
+
+configure: configure-stamp
+configure-stamp:
+	dh_testdir
+	LIBGNUTLS_CONFIG="/usr/bin/pkg-config gnutls" ./configure
+	touch configure-stamp
+
+build: build-stamp
+build-stamp: configure-stamp
+	dh_testdir
+	$(MAKE)
+	touch build-stamp
+
+clean:
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp configure-stamp
+	-$(MAKE) clean
+	$(RM) config.log
+	dh_clean
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs
+	install csync2 $(CURDIR)/debian/csync2/usr/sbin/csync2
+	install csync2_locheck.sh $(CURDIR)/debian/csync2/usr/share/csync2/csync2_locheck.sh
+	echo "# please see the REAMDE file how to configure csync2" >$(CURDIR)/debian/csync2/etc/csync2.cfg
+
+
+# Build architecture-independent files here.
+binary-indep: build install
+# We have nothing to do by default.
+
+# Build architecture-dependent files here.
+binary-arch: build install
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs
+	dh_installdocs
+	dh_installman csync2.1
+	dh_installcron
+	dh_link
+	dh_strip
+	dh_compress
+	dh_fixperms
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure
