--- mailtrace-2.0.orig/debian/rules
+++ mailtrace-2.0/debian/rules
@@ -0,0 +1,121 @@
+#!/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
+
+# This is the debhelper compatibility version to use.
+export DH_COMPAT=5
+
+# installations paths
+BUILD_ROOT_DAEMON=debian/mailtrace-daemon
+BUILD_ROOT_GUI=debian/mailtrace-gui
+
+ABS_ELEMENTS_PATH=/opt/heinlein/mailtrace
+DAEMON_PATH=$(BUILD_ROOT_DAEMON)/usr/bin
+CFG_PATH=$(BUILD_ROOT_DAEMON)/etc/mailtrace
+INIT_PATH=$(BUILD_ROOT_DAEMON)/etc/init.d
+CRON_PATH=$(BUILD_ROOT_DAEMON)/etc/cron.daily
+DOC_PATH_DAEMON=$(BUILD_ROOT_DAEMON)/usr/share/doc/mailtrace
+# http://www.debian.org/doc/packaging-manuals/perl-policy/ch-perl.html
+PERL_VENDOR_PATH=$(BUILD_ROOT_DAEMON)/usr/share/perl5
+PERL_MT_DAEMON_PATH=$(PERL_VENDOR_PATH)/Mailtrace/Daemon
+PERL_MT_DATABASE_PATH=$(PERL_VENDOR_PATH)/Mailtrace/Database
+PERL_MT_SYSTEM_PATH=$(PERL_VENDOR_PATH)/Mailtrace/System
+
+ELEMENTS_PATH=$(BUILD_ROOT_GUI)/$(ABS_ELEMENTS_PATH)
+APACHE_SYSCONFDIR=$(BUILD_ROOT_GUI)/etc/apache2
+DOC_PATH_GUI=$(BUILD_ROOT_GUI)/usr/share/doc/mailtrace
+
+
+#%:
+#	dh $@
+
+clean:
+	dh_testdir
+	dh_testroot
+	dh_clean 
+				
+build:
+	#dh_gencontrol
+
+binary: 
+
+#binary-indep: install
+#	dh_gencontrol
+#	#dpkg-gencontrol -isp\
+
+binary-indep: build install
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs
+	dh_installdocs
+	dh_install
+	dh_compress 
+	dh_fixperms
+	dh_installdeb
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+
+
+install: 
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+	dh_installdirs
+
+	# daemon installation
+	install -D -m 0755 daemon/bin/mailtraced $(DAEMON_PATH)/mailtraced
+	install -D -m 600 daemon/etc/mailtrace/mailtraced.cfg \
+		$(CFG_PATH)/mailtraced.cfg
+	install -D -m 755 daemon/doc/init.d/DEBIAN/mailtraced \
+		$(INIT_PATH)/mailtraced
+	install -d $(DOC_PATH_DAEMON)
+	cp -r daemon/doc/* $(DOC_PATH_DAEMON)
+	install -d $(PERL_MT_DAEMON_PATH)
+	install daemon/lib/Mailtrace/Daemon/* $(PERL_MT_DAEMON_PATH)
+	install -d $(PERL_MT_DATABASE_PATH)
+	install daemon/lib/Mailtrace/Database/* $(PERL_MT_DATABASE_PATH)
+	install -d $(PERL_MT_SYSTEM_PATH)
+	install daemon/lib/Mailtrace/System/* $(PERL_MT_SYSTEM_PATH)
+
+	# webgui installation
+	install -d $(DOC_PATH_GUI)
+	cp -r webgui/frontend/configs/HMT/SQL $(DOC_PATH_GUI)
+#	cp Heinlein-Mailtrace-Admin-Handbuch.pdf $(DOC_PATH_GUI)
+	install -d $(ELEMENTS_PATH)
+	cp -r webgui/frontend $(ELEMENTS_PATH)
+	#mv webgui/frontend $(ELEMENTS_PATH)
+	cp -r webgui/libs $(ELEMENTS_PATH)
+	cp -r webgui/api $(ELEMENTS_PATH)
+	#mv webgui/libs $(ELEMENTS_PATH)
+	install -d $(ELEMENTS_PATH)/frontend/data/update
+	install -d $(APACHE_SYSCONFDIR)/conf.d
+	sed -e "s#__MAILTRACEGUIPATH__#$(ABS_ELEMENTS_PATH)#g" \
+		mailtrace-gui-httpd.conf >$(APACHE_SYSCONFDIR)/conf.d/mailtrace.conf
+
+	install -d $(CRON_PATH)
+	cp -r etc/cron.daily/mailtraced  $(CRON_PATH)
+
+# Irgendwie weggefallen? phei 1.6.2012
+#	rm $(ELEMENTS_PATH)/frontend/etc/HMT/component.ini.appliance
+ 	
+	# --- end custom part for installing
+
+# Build architecture-independent files here.
+binary-dep: build install
+
+# Build architecture-independent files here.
+binary-indep: build install
+
+
+binary-arch:
+
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary install configure
+
--- mailtrace-2.0.orig/debian/mailtrace-daemon.postrm
+++ mailtrace-2.0/debian/mailtrace-daemon.postrm
@@ -0,0 +1,9 @@
+#!/bin/bash
+# mailtrace-daemon postrm script
+
+set -e
+
+# insserv works that way on debian, but not on ubuntu
+if [ ! -f /etc/lsb-release  ];then
+	insserv --remove /etc/init.d/mailtraced 
+fi
--- mailtrace-2.0.orig/debian/changelog
+++ mailtrace-2.0/debian/changelog
@@ -0,0 +1,31 @@
+mailtrace (2.1) experimental; urgency=low
+
+  * version number update by debtransform
+
+ -- debtransform <build@opensuse.org>  Thu, 21 Aug 2014 11:55:13 +0000
+
+mailtrace (2.1-0) experimental; urgency=low
+
+  * replaced search engine with poc
+
+ -- D Mohn <d.mohn@heinlein-support.de>  Wed, 19 Aug 2012 11:23:59 +0200
+
+
+mailtrace (2.0-3) experimental; urgency=low
+
+  * got Debian rules working
+
+ -- Isaac Hailperin <i.hailperin@heinlein-support.de>  Fri, 05 May 2012 15:03:59 +0200
+
+mailtrace (2.0-2) experimental; urgency=low
+
+  * Fixed Debian rules
+
+ -- Robert Sander <r.sander@heinlein-support.de>  Mon, 30 Apr 2012 16:53:59 +0200
+
+
+mailtrace-gui (2.0-1) unstable; urgency=low
+
+   * Initial release
+
+ -- Stefan Neben <s.neben@heinlein-support.de>  Mon, 29 Aug 2011 15:02:03 +0000
--- mailtrace-2.0.orig/debian/control
+++ mailtrace-2.0/debian/control
@@ -0,0 +1,21 @@
+Source: mailtrace
+Section: mail
+Priority: extra
+Maintainer: Isaac Hailperin <i.hailperin@heinlein-support.de>
+Build-Depends: debhelper
+Standards-Version: 3.8.3
+Homepage: http://heinlein-support.de/heinlein-elements/mailtrace
+
+Package: mailtrace-gui
+Architecture: all
+#Depends:  ${misc:Depends}, php5-mysql | php5-pgsql, libzend-framework-php, smarty3, php-auth-sasl
+#Depends:  ${misc:Depends}, php5-mysql | php5-pgsql, zendframework, smarty3, php-auth-sasl
+Depends:  ${misc:Depends}, php5-mysql | php5-pgsql, libzend-framework-php | zendframework, smarty3 | smarty, php-auth-sasl, php5-sqlite
+Description: E-Mail-Recherche für Helpdesks
+ Heinlein Mailtrace bringt Licht ins Dunkel Ihrer Logfiles. Lassen Sie die Logdaten Ihres Postfix-Mailservers in Echtzeit zur Auswertung bereithalten. So lässt sich sofort nachvollziehen, was aus einer versandten E-Mail geworden ist. Dieses Paket enthält die Bedienungsoberfläche.
+ 
+Package: mailtrace-daemon
+Architecture: all
+Depends: ${misc:Depends}, libreadonly-perl, libcache-memcached-perl, libconfig-inifiles-perl, libdate-manip-perl, libdbd-mysql-perl | libdbd-pg-perl, libdatetime-perl, mysql-client, libdbd-pg-perl, libpq5, memcached
+Description: Logfile information collector daemon
+ Heinlein Mailtrace bringt Licht ins Dunkel Ihrer Logfiles. Lassen Sie die Logdaten Ihres Postfix-Mailservers in Echtzeit zur Auswertung bereithalten. So lässt sich sofort nachvollziehen, was aus einer versandten E-Mail geworden ist. Dies ist der information collector, der auf den Mailservern installiert wird.
--- mailtrace-2.0.orig/debian/copyright
+++ mailtrace-2.0/debian/copyright
@@ -0,0 +1,7 @@
+This work was packaged for Debian by:
+
+    Stefan Neben <s.neben@heinlein-support.de> on Mon, 29 Aug 2011 15:02:03 +0000
+
+Copyright:
+
+    <Copyright (C) 2011 Heinlein Professional Linux Support GmbH>
--- mailtrace-2.0.orig/debian/mailtrace-gui.postinst
+++ mailtrace-2.0/debian/mailtrace-gui.postinst
@@ -0,0 +1,35 @@
+#!/bin/bash
+# postinstall script for the mailtrace-gui package
+
+set -e
+
+# enable mod rewrite for apache2
+if [ -f /etc/apache2/mods-available/rewrite.load ];then
+	if [ -d /etc/apache2/mods-enabled ];then
+		cd /etc/apache2/mods-enabled
+		[ -L rewrite.load ] || ln -s ../mods-available/rewrite.load
+	else
+		echo mailtrace_gui could not enable apache2 mod rewrite.
+		echo Please enable it.
+	fi
+else
+	echo mailtrace_gui needs apache2 mod rewrite, but could not find it.
+	echo Please make sure you have apache2 with mod rewrite enabled.
+fi
+
+if [ -f /etc/init.d/apache2 ];then
+	/etc/init.d/apache2 restart
+fi
+
+# change access rights for certains directories
+chown www-data:root /opt/heinlein/mailtrace/frontend/etc
+chown www-data:root /opt/heinlein/mailtrace/frontend/etc/AC
+chown www-data:root /opt/heinlein/mailtrace/frontend/etc/HMT
+chown www-data:root /opt/heinlein/mailtrace/frontend/data/cache
+chown www-data:root /opt/heinlein/mailtrace/frontend/data/cache/templates
+chown www-data:root /opt/heinlein/mailtrace/frontend/data/cache/zend
+chown www-data:root /opt/heinlein/mailtrace/frontend/data/cache/updates
+chown www-data:root /opt/heinlein/mailtrace/frontend/data/cache/updates/export
+chown www-data:root /opt/heinlein/mailtrace/frontend/data/cache/updates/import
+chown www-data:root /opt/heinlein/mailtrace/frontend/data/session
+chown www-data:root /opt/heinlein/mailtrace/frontend/logs
--- mailtrace-2.0.orig/debian/mailtrace-daemon.postinst
+++ mailtrace-2.0/debian/mailtrace-daemon.postinst
@@ -0,0 +1,11 @@
+#!/bin/bash
+# mailtrace-daemon postinstall script
+
+set -e
+
+# insserv works like this on debian, but not on ubuntu
+if [ ! -f /etc/lsb-release ];then
+	insserv /etc/init.d/mailtraced 
+fi
+
+#sed -i "s/database=mysql/database=mysql\ndbtype=mysql/" /etc/mailtrace/mailtraced.cfg
