--- polyml-5.2.1.orig/debian/watch
+++ polyml-5.2.1/debian/watch
@@ -0,0 +1,5 @@
+# Run "uscan" to check for upstream updates and more.
+# See uscan(1) for format
+version=3
+# SourceForge magic, needs devscripts >= 2.9
+http://sf.net/polyml/polyml\.(.*)\.tar\.gz
--- polyml-5.2.1.orig/debian/rules
+++ polyml-5.2.1/debian/rules
@@ -0,0 +1,122 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+# Derived from the sample in sample in dh-make by Joey Hess, Craig
+# Small and Bill Allombert.
+
+
+# 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
+
+# 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)
+ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
+CROSS= --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE)
+else
+CROSS= --build $(DEB_BUILD_GNU_TYPE)
+endif
+
+
+
+
+
+config.status: configure
+	dh_testdir
+ifneq "$(wildcard /usr/share/misc/config.sub)" ""
+	cp -f /usr/share/misc/config.sub config.sub
+endif
+ifneq "$(wildcard /usr/share/misc/config.guess)" ""
+	cp -f /usr/share/misc/config.guess config.guess
+endif
+	./configure $(CROSS) --prefix=/usr --mandir=\$${prefix}/share/man --infodir=\$${prefix}/share/info CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs" CCASFLAGS="$(CCASFLAGS) -Wa,--noexecstack"
+
+
+build: build-arch build-indep
+
+build-arch: build-arch-stamp
+build-arch-stamp:  config.status 
+
+	$(MAKE) 
+	touch $@
+
+build-indep: build-indep-stamp
+build-indep-stamp:  config.status 
+
+	touch $@
+
+clean: 
+	dh_testdir
+	dh_testroot
+	rm -f build-arch-stamp build-indep-stamp 
+
+	[ ! -f Makefile ] || $(MAKE) distclean
+	rm -f config.sub config.guess
+
+	dh_clean 
+
+install: install-indep install-arch
+install-indep: build-indep-stamp
+	dh_testdir
+	dh_testroot
+#	dh_clean -k -i 
+#	dh_installdirs -i
+
+
+install-arch: build-arch-stamp
+	dh_testdir
+	dh_testroot
+	dh_clean -k -s 
+	dh_installdirs -s
+
+	# Add here commands to install the arch part of the package into 
+	# debian/tmp.
+	$(MAKE) DESTDIR=$(CURDIR)/debian/tmp install
+
+	# dh_install -s
+
+# Must not depend on anything. This is to be called by
+# binary-arch/binary-indep
+# in another 'make' thread.
+binary-common:
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs 
+	dh_installdocs
+	dh_installexamples
+	dh_install --autodest --sourcedir=debian/tmp
+#	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-indep: install-indep
+	$(MAKE) -f debian/rules DH_OPTIONS=-i binary-common
+
+binary-arch: install-arch
+	$(MAKE) -f debian/rules DH_OPTIONS=-s binary-common
+
+binary: binary-arch binary-indep
+.PHONY: build clean binary-indep binary-arch binary install install-indep install-arch 
--- polyml-5.2.1.orig/debian/libpolyml-dev.install
+++ polyml-5.2.1/debian/libpolyml-dev.install
@@ -0,0 +1,3 @@
+usr/lib/libpolyml.a
+usr/lib/libpolyml.so
+usr/lib/libpolyml.la
--- polyml-5.2.1.orig/debian/changelog
+++ polyml-5.2.1/debian/changelog
@@ -0,0 +1,30 @@
+polyml (5.2.1-1) unstable; urgency=low
+
+  [ Achim D. Brucker ]
+  * Initial upload to Debian (Closes: #494488)
+  * new upstream version
+
+  [ Lionel Elie Mamane ]
+  * Various packaging fixes
+  * Bump up Standards-Version to 3.8.2
+
+ -- Lionel Elie Mamane <lmamane@debian.org>  Thu, 03 Sep 2009 15:08:33 +0200
+
+polyml (5.2-3) unstable; urgency=low
+
+  * Fixed copyright
+
+ -- Achim D. Brucker <brucker@member.fsf.org>  Mon, 16 Jun 2008 15:03:57 +0200
+
+polyml (5.2-2) unstable; urgency=low
+
+  * Fixed lintian warnings
+
+ -- Achim D. Brucker <brucker@member.fsf.org>  Sun, 15 Jun 2008 21:05:42 +0200
+
+polyml (5.2-1) unstable; urgency=low
+
+  * Initial release
+
+ -- Achim D. Brucker <brucker@member.fsf.org>  Sun, 15 Jun 2008 11:06:07 +0200
+
--- polyml-5.2.1.orig/debian/shlibs.local
+++ polyml-5.2.1/debian/shlibs.local
@@ -0,0 +1 @@
+libpolyml 1 libpolyml1 (>= 5.2)
--- polyml-5.2.1.orig/debian/polyml.install
+++ polyml-5.2.1/debian/polyml.install
@@ -0,0 +1,3 @@
+usr/bin/*
+usr/share/man/man1/*
+usr/lib/libpolymain.*
--- polyml-5.2.1.orig/debian/copyright
+++ polyml-5.2.1/debian/copyright
@@ -0,0 +1,14 @@
+Files: debian/*
+Author: Achim D. Brucker <brucker@member.fsf.org> 
+Copyright: Copyright 2008  Achim D. Brucker <brucker@member.fsf.org> 
+License: LGPL-2.1+
+ The Debian packaging is licensed under the LGPL, version 2.1 or later,
+ On Debian systems the full text of the GNU General Public License can be found
+ in the `/usr/share/common-licenses/LGPL-2.1' file.
+
+Files: *
+Author: David Matthews <polyml@polyml.org>
+Copyright: Copyright  1999-2008 David Matthews <polyml@polyml.org>
+License: LGPL-2.1+
+ On Debian systems the full text of the GNU General Public License can be found
+ in the `/usr/share/common-licenses/LGPL-2.1' file.
--- polyml-5.2.1.orig/debian/control
+++ polyml-5.2.1/debian/control
@@ -0,0 +1,51 @@
+Source: polyml
+Section: interpreters
+Priority: extra
+Maintainer: Debian Science Maintainers <debian-science-maintainers@lists.alioth.debian.org>
+Uploaders: Achim D. Brucker <brucker@member.fsf.org>, Lionel Elie Mamane <lmamane@debian.org>
+Vcs-Git: git://git.debian.org/git/debian-science/packages/polyml.git
+Vcs-Browser: http://git.debian.org/?p=debian-science/packages/polyml.git
+Homepage: http://www.polyml.org
+Build-Depends: debhelper (>= 6), autotools-dev
+Standards-Version: 3.8.2
+
+Package: polyml
+Architecture: i386 sparc powerpc amd64 armel
+Depends: ${shlibs:Depends}
+Description: interpreter and interactive compiler for the Standard ML programming language
+ Poly/ML is an implementation of the Standard ML programming language
+ Standard ML is a general-purpose, modular, type-safe, strict,
+ functional programming language. Poly/ML is SML 97 compliant
+ interpreter and compiler that supports the generation of stand-alone
+ executables with an interactive toplevel (REPL).
+ .
+ This package provides the toplevel interpreter.
+
+
+Package: libpolyml-dev
+Section: libdevel
+Architecture: i386 sparc powerpc amd64 armel
+Depends: libpolyml1 (= ${binary:Version})
+Description: development files for Poly/ML, a compiler for the Standard ML 
+ Poly/ML is an implementation of the Standard ML programming language
+ Standard ML is a general-purpose, modular, type-safe, strict,
+ functional programming language. Poly/ML is SML 97 compliant
+ interpreter and compiler that supports the generation of stand-alone
+ executables with an interactive toplevel (REPL).
+ .
+ This package provides the files needed to compile stand-alone executables
+ with Poly/ML.
+
+Package: libpolyml1
+Section: libs
+Architecture: i386 sparc powerpc amd64 armel
+Depends: ${shlibs:Depends}
+Description: runtime files for Poly/ML, a compiler for the Standard ML 
+ Poly/ML is an implementation of the Standard ML programming language
+ Standard ML is a general-purpose, modular, type-safe, strict,
+ functional programming language. Poly/ML is SML 97 compliant
+ interpreter and compiler that supports the generation of stand-alone
+ executables with an interactive toplevel (REPL).
+ .
+ This package provides the files needed to run stand-alone executables
+ built with Poly/ML.
--- polyml-5.2.1.orig/debian/compat
+++ polyml-5.2.1/debian/compat
@@ -0,0 +1 @@
+6
--- polyml-5.2.1.orig/debian/libpolyml1.install
+++ polyml-5.2.1/debian/libpolyml1.install
@@ -0,0 +1 @@
+usr/lib/libpolyml.so.*
--- polyml-5.2.1.orig/debian/libpolyml1.postinst
+++ polyml-5.2.1/debian/libpolyml1.postinst
@@ -0,0 +1,41 @@
+#!/bin/sh
+# postinst script for polyml
+#
+# 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>
+#        * <postinst> `abort-remove'
+#        * <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)
+    ;;
+
+    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
+
+
--- polyml-5.2.1.orig/debian/menu
+++ polyml-5.2.1/debian/menu
@@ -0,0 +1,2 @@
+?package(polyml):needs="text" section="Applications/Programming"\
+  title="polyml" command="/usr/bin/poly"
