--- treil-1.8.orig/ruby/Makefile.in
+++ treil-1.8/ruby/Makefile.in
@@ -325,7 +325,7 @@
 
 
 stamp-arch: $(top_builddir)/libtreil.la treil.c
-	mkdir -p $(RUBYARCH) && cd $(RUBYARCH) && $(RUBY) ../extconf.rb && $(MAKE)
+	mkdir -p $(RUBYARCH) && cd $(RUBYARCH) && $(RUBY) ../extconf.rb && $(MAKE) LIBS='-lruby1.8 -ltreil'
 	touch $@
 
 all-local: stamp-arch
--- treil-1.8.orig/ruby/Makefile.am
+++ treil-1.8/ruby/Makefile.am
@@ -4,7 +4,7 @@
 EXTRA_DIST = treil.c $(RB)
 
 stamp-arch: $(top_builddir)/libtreil.la treil.c
-	mkdir -p $(RUBYARCH) && cd $(RUBYARCH) && $(RUBY) ../extconf.rb && $(MAKE)
+	mkdir -p $(RUBYARCH) && cd $(RUBYARCH) && $(RUBY) ../extconf.rb && $(MAKE) LIBS='-lruby1.8 -ltreil'
 	touch $@
 
 all-local: stamp-arch
--- treil-1.8.orig/debian/dirs
+++ treil-1.8/debian/dirs
@@ -0,0 +1 @@
+usr/bin
--- treil-1.8.orig/debian/libtreil0.install
+++ treil-1.8/debian/libtreil0.install
@@ -0,0 +1 @@
+debian/tmp/usr/lib/libtreil.so.0*
--- treil-1.8.orig/debian/rules
+++ treil-1.8/debian/rules
@@ -0,0 +1,109 @@
+#!/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.
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+
+# These are used for cross-compiling and for saving the configure script
+# from having to guess our platform (since we know it already)
+DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
+DEB_BUILD_GNU_TYPE  ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+
+RUBY = ruby1.8
+RUBYLIBDIR = $(shell ruby1.8 -rrbconfig -e 'puts Config::CONFIG["rubylibdir"]')
+RUBYARCHDIR = $(shell ruby1.8 -rrbconfig -e 'puts Config::CONFIG["archdir"]')
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+	CFLAGS += -O0
+else
+	CFLAGS += -O2
+endif
+
+config.status: configure
+	dh_testdir
+	# Add here commands to configure the package.
+	./configure --host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) \
+	    --prefix=/usr --mandir=\$${prefix}/share/man \
+	    --infodir=\$${prefix}/share/info --libexecdir=\$${prefix}/lib \
+	    --with-ruby=$(RUBY) \
+	    --with-rubylibdir=$(RUBYLIBDIR) --with-rubyarchdir=$(RUBYARCHDIR) \
+		CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs"
+
+build: build-stamp
+
+build-stamp:  config.status
+	dh_testdir
+
+	# Add here commands to compile the package.
+	$(MAKE)
+	#docbook-to-man debian/treil.sgml > treil.1
+
+	touch $@
+
+clean:
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp 
+
+	# Add here commands to clean up after the build process.
+	if test -f Makefile; then $(MAKE) distclean; fi
+
+	dh_clean 
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k 
+	dh_installdirs
+	$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp \
+	   sitedir=$(CURDIR)/debian/tmp/usr/lib/ruby install
+	mkdir -p $(CURDIR)/debian/tmp/usr/share/man/man1
+	for m in treil; do \
+	  install $(CURDIR)/debian/$$m.1 \
+		$(CURDIR)/debian/tmp/usr/share/man/man1; done
+
+# 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_installexamples
+	dh_install
+#	dh_installmenu
+#	dh_installdebconf	
+#	dh_installlogrotate
+#	dh_installemacsen
+#	dh_installpam
+#	dh_installmime
+#	dh_python
+#	dh_installinit
+#	dh_installcron
+#	dh_installinfo
+	dh_installman
+	dh_link
+	dh_strip
+	dh_compress
+	dh_fixperms
+#	dh_perl
+	dh_makeshlibs
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install 
--- treil-1.8.orig/debian/watch
+++ treil-1.8/debian/watch
@@ -0,0 +1,2 @@
+version=3
+http://www.unixuser.org/~ueno/software/treil/treil-(.*)\.tar\.gz
--- treil-1.8.orig/debian/compat
+++ treil-1.8/debian/compat
@@ -0,0 +1 @@
+5
--- treil-1.8.orig/debian/libtreil-dev.install
+++ treil-1.8/debian/libtreil-dev.install
@@ -0,0 +1,4 @@
+debian/tmp/usr/include/*.h
+debian/tmp/usr/lib/libtreil.a
+debian/tmp/usr/lib/libtreil.la
+debian/tmp/usr/lib/libtreil.so
--- treil-1.8.orig/debian/control
+++ treil-1.8/debian/control
@@ -0,0 +1,31 @@
+Source: treil
+Section: utils
+Priority: extra
+Maintainer: NIIBE Yutaka <gniibe@fsij.org>
+Build-Depends: debhelper (>= 5), ruby, ruby1.8, ruby1.8-dev, libcairo-ruby1.8
+Standards-Version: 3.7.3
+
+Package: treil
+Architecture: any
+Depends: ruby1.8, libcairo-ruby1.8, ${shlibs:Depends}
+Description: tree structure into tiles
+ Treil is a utility which produces an image of tiles from tree structure.
+ For example, Linux directory tree can be shown as an image of tiles, 
+ by:
+     $ treil -o linux.png /usr/src/linux
+
+Package: libtreil0
+Section: libs
+Architecture: any
+Depends: ${shlibs:Depends}
+Description: A shared library for treil (tree structure into tiles) 
+ Treil is a utility which produces an image of tiles from tree structure.
+ This is a runtime shared library for treil.
+
+Package: libtreil-dev
+Section: libdevel
+Architecture: any
+Depends: libtreil0
+Description: Development library for treil (tree structure into tiles)
+ Treil is a utility which produces an image of tiles from tree structure.
+ This is a development library and a header file for treil.
--- treil-1.8.orig/debian/treil.install
+++ treil-1.8/debian/treil.install
@@ -0,0 +1,3 @@
+debian/tmp/usr/bin/*
+debian/tmp/usr/lib/ruby/*
+debian/tmp/usr/share/man/man1/*
--- treil-1.8.orig/debian/docs
+++ treil-1.8/debian/docs
@@ -0,0 +1 @@
+README
--- treil-1.8.orig/debian/changelog
+++ treil-1.8/debian/changelog
@@ -0,0 +1,102 @@
+treil (1.8-1.7.201411021103) ucs4-0-0-0; urgency=low
+
+  * UCS auto build. The following patches have been applied to the original source package
+    0001-bump-version-for-ucs400
+
+ -- Univention builddaemon <buildd@univention.de>  Sun, 02 Nov 2014 11:03:41 +0100
+
+treil (1.8-1) unstable; urgency=low
+
+  * Bump version, otherwise the build stamp in UCS 3.2 is higher than the 4.0
+    build (Bug #35387)
+
+ -- Sönke Schwardt-Krummrich <schwardt@univention.de>  Fri, 30 Oct 2014 14:43:23 +0200
+
+treil (1.8-1.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Specify use of ruby1.8 in debian/rules and add --with-ruby=ruby1.8 since
+    ruby is now 1.9 (Closes: #676120)
+  * Make treil specifically depend on ruby1.8
+
+ -- Scott Kitterman <scott@kitterman.com>  Tue, 10 Jul 2012 16:35:52 -0400
+
+treil (1.8-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- NIIBE Yutaka <gniibe@fsij.org>  Fri, 29 Feb 2008 15:51:34 +0900
+
+treil (1.7-1) unstable; urgency=low
+
+  * New upstream release.  Now, struct treil_tree has "long long" for size,
+  should fixes problems for large files.  (Closes: #415218, #459855).
+  Thanks to Daniel Roschka and A. Costa for their reports.
+  * debian/control (Build-Depends): Removed libexpat1-dev, no longer
+  required.
+
+ -- NIIBE Yutaka <gniibe@fsij.org>  Wed, 23 Jan 2008 12:56:16 +0900
+
+treil (1.6-1) unstable; urgency=low
+
+  * New upstream release.
+  * debian/control (Standards-Version): It comforms 3.7.3.
+  (Build-Depends): Added libexpat1-dev.
+  (Section): Moved to 'utils' (was: 'games').  Because lintian complains.
+  * configure.ac: Substitute lib_treil_la_LIBS, when libexpat will be found.
+  * Makefile.am: Use lib_treil_la_LIBADD for -lexpat (not generic LIBS).
+  * ruby/extconf.rb.in ($libs): Removed @LIBS@, and don't use +=.
+  * ruby/Makefile.am: Avoid linking non-needed libraries (Ruby's mkmf 
+  is not that precise), by supplying LIBS.
+
+ -- NIIBE Yutaka <gniibe@fsij.org>  Tue, 15 Jan 2008 13:22:47 +0900
+
+treil (1.3-1) unstable; urgency=low
+
+  * New upstream release (Closes: #433988).
+  * debian/treil.1: Updated.
+
+ -- NIIBE Yutaka <gniibe@fsij.org>  Wed, 01 Aug 2007 16:24:29 +0900
+
+treil (1.1-2) unstable; urgency=low
+
+  * debian/rules: Fix FTBFS.
+
+ -- NIIBE Yutaka <gniibe@fsij.org>  Wed, 18 Jul 2007 13:51:52 +0900
+
+treil (1.1-1) unstable; urgency=low
+
+  * New upstream release.
+  * debian/control (Priority): Down to extra (was: optional).
+  * treil.in, ruby/treil.rb: Don't touch LOAD_PATH (Closes: #428130).
+  * debian/treil.1: Remove duplicated text (Closes: #428129).
+    Thanks to A. Costa.
+
+ -- NIIBE Yutaka <gniibe@fsij.org>  Wed, 18 Jul 2007 11:10:18 +0900
+
+treil (1.0-2) unstable; urgency=low
+
+  * debian/control (Build-Depends): Added ruby1.8-dev (Closes: #424930).
+    Thanks to Kurt Roeckx <kurt@roeckx.be>.
+
+ -- NIIBE Yutaka <gniibe@fsij.org>  Fri, 18 May 2007 08:22:10 +0900
+
+treil (1.0-1) unstable; urgency=low
+
+  * New upstream release.
+  * Removed debian/{treil-draw.1,treil-rect.1}.
+  
+ -- NIIBE Yutaka <gniibe@fsij.org>  Thu, 17 May 2007 10:47:13 +0900
+
+treil (0.1-2) unstable; urgency=low
+
+  * debian/control (Build-Depends): Added ruby, ruby1.8 (Closes: #414659).
+  * treil-draw.in: Fix regexp for trailing slash (Closes: #414863).
+
+ -- NIIBE Yutaka <gniibe@fsij.org>  Fri, 16 Mar 2007 15:44:49 +0900
+
+treil (0.1-1) unstable; urgency=low
+
+  * Initial release (Closes: #406159).
+
+ -- NIIBE Yutaka <gniibe@fsij.org>  Wed, 10 Jan 2007 13:47:43 +0900
--- treil-1.8.orig/debian/treil.1
+++ treil-1.8/debian/treil.1
@@ -0,0 +1,39 @@
+.TH TREIL "1" "January 2007" "Tile image generator" "User Commands"
+.SH NAME
+treil \- Tile image generator
+.SH SYNOPSIS
+.B treil
+[\fIOPTIONS\fR]
+.SH DESCRIPTION
+.TP
+\fB\-g\fR, \fB\-\-geometry\fR=\fIWIDTHxHEIGHT\fR
+Specify size of the outermost rectangle.
+.TP
+\fB\-o\fR, \fB\-\-output\fR=\fIFILE\fR
+Store the output to FILE.
+.TP
+\fB\-c\fR, \fB\-\-config\fR=\fIFILE\fR
+Read configuration from FILE.
+.TP
+\fB\-h\fR, \fB\-\-help\fR
+Show this message.
+.TP
+\fB\-d\fR, \fB\-\-max-depth\fR=\fIDEPTH\fR
+Specify max depth of rectangles displayed.
+.TP
+\fB\-x\fR, \fB\-\-exclude\fR=\fIPAT\fR
+Exclude files that match PAT.
+.TP
+\fB\-R\fR, \fB\-\-reader\fR=\fICLASS\fR
+Specify reader class.
+Do not use if you unsure.
+.TP
+\fB\-W\fR, \fB\-\-writer\fR=\fICLASS\fR
+Specify writer class.
+Do not use if you unsure.
+.TP
+\fB\-v\fR, \fB\-\-verbose\fR
+Run verbosely.
+.TP
+\fB\-\-resolution=RES\fR
+Specify pixel width.
--- treil-1.8.orig/debian/copyright
+++ treil-1.8/debian/copyright
@@ -0,0 +1,30 @@
+This package was debianized by NIIBE Yutaka <gniibe@fsij.org> on
+Wed, 10 Jan 2007 13:47:43 +0900.
+
+It was downloaded from http://www.unixuser.org/~ueno/software/treil/
+
+Upstream Author: Daiki Ueno <ueno@unixuser.org>
+
+Copyright: Copyright (C) 2006,2007 Daiki Ueno <ueno@unixuser.org>
+
+License:
+
+   This package 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 package 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 complete text of the GNU General
+Public License can be found in `/usr/share/common-licenses/GPL'.
+
+The Debian packaging is (C) 2007, NIIBE Yutaka <gniibe@fsij.org> and
+is licensed under the GPL, see above.
