--- lmms-0.4.7.orig/debian/compat
+++ lmms-0.4.7/debian/compat
@@ -0,0 +1 @@
+5
--- lmms-0.4.7.orig/debian/menu
+++ lmms-0.4.7/debian/menu
@@ -0,0 +1,4 @@
+?package(lmms):needs="X11" section="Applications/Sound" \
+  title="LMMS" hints="Audio" command="/usr/bin/lmms" \
+  longtitle="Linux MultiMedia Studio" \
+  icon32x32="/usr/share/pixmaps/lmms.xpm"
--- lmms-0.4.7.orig/debian/copyright
+++ lmms-0.4.7/debian/copyright
@@ -0,0 +1,76 @@
+This package was debianized by Florian Ragwitz <florian@mookooh.org> on
+Thu, 14 Apr 2005 13:24:57 +0200.
+
+It was downloaded from http://lmms.sf.net/
+
+Copyright Holder: 
+        Copyright (c) 2004-2007 Tobias Doerffel <tobydox@users.sf.net>
+        Copyright: (c) 2006-2007 Javier Serrano Polo <jasp00@users.sf.net>
+        Copyright: (c) 2005-2007 Danny McRae <khjklujn@yahoo.com>
+
+
+License:
+
+All files not listed excplizitly in this file are licensed under the GPLv2 or later.
+
+This program is free software; you can redistribute it and/or modify it under
+the terms of the GNU General Public License version 2 or later as published by the Free
+Software Foundation.
+
+Files listed here are licensed under GPLv2 or later but not copyrighted by one of the 3 
+authors above:
+
+./plugins/flp_import/unrtf/
+        Copyright: 2000,2001,2004 by Zachary Smith
+
+./plugins/bit_invader/
+./plugins/vibed/
+./plugins/organic/
+        Copyright: (c) 2006-2007 Andreas Brandmaier <andy/at/brandmaier/dot/de>
+
+./plugins/ladspa_effect/caps/
+        Copyright: 2002-5 Tim Goetze <tim@quitte.de>
+
+./plugins/lb302/
+        Copyright: (c) 2006-2007 Paul Giblock <pgib/at/users.sourceforge.net>
+
+./src/3rdparty/samplerate/
+        Copyright: 2002-2004 Erik de Castro Lopo <erikd@mega-nerd.com>
+
+Additional to this these copyrights apply:
+
+ - Zolo
+        <the-zolo/at/gmx/dot/de>
+        theme "Blue Scene"
+
+ - Sebastian Tilsch
+        <djcompilation/at/gmx/dot/de>
+        recording of many samples
+
+ - gabriel
+        <kryos1/at/shaw/dot/ca>
+        additional artwork
+
+On Debian GNU/Linux systems, the complete text of the GNU General Public License
+can be found in `/usr/share/common-licenses/GPL-2'.
+
+=================================================================================
+Files listed here are licens under the LGPL-2:
+
+
+./include/ladspa-1.1.h
+        Copyright: 2000-2002 Richard W.E. Furse, Paul Barton-Davis
+
+./include/kmultitabbar.h
+./include/kmultitabbar-qt3.h
+        Copyright: : 2001,2002,2003 by Joseph Wenninger <jowenn@kde.org>
+
+./include/qxembed.h
+./src/widgets/qxembed.cpp
+        Copyright: 1999-2000 Troll Tech AS
+
+./ltmain.sh
+        Copyright: 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 Free Software Foundation, Inc.
+
+On Debian GNU/Linux systems, the complete text of the GNU Lesser General Public License
+can be found in `/usr/share/common-licenses/LGPL-2'.
--- lmms-0.4.7.orig/debian/lmms.install
+++ lmms-0.4.7/debian/lmms.install
@@ -0,0 +1,3 @@
+usr/bin/lmms
+usr/lib/lmms
+usr/share/man/*
--- lmms-0.4.7.orig/debian/watch
+++ lmms-0.4.7/debian/watch
@@ -0,0 +1,2 @@
+version=3
+http://sf.net/lmms/lmms-(.*)\.tar\.bz2
--- lmms-0.4.7.orig/debian/rules
+++ lmms-0.4.7/debian/rules
@@ -0,0 +1,95 @@
+#!/usr/bin/make -f
+
+# 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)
+
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+	CFLAGS += -O0
+else
+	CFLAGS += -O2
+endif
+
+debian/lmms.xpm: data/themes/default/icon.png
+	convert -resize 32 $< $@
+
+
+config.status: configure patch-stamp
+	dh_testdir
+	touch ./configure
+	
+build: build-stamp
+build-stamp: patch-stamp config.status
+	dh_testdir
+	cmake . -DCMAKE_INSTALL_PREFIX=/usr
+	touch build-stamp
+
+clean: unpatch
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp 
+	[ ! -f Makefile ] || $(MAKE) distclean
+	rm -f config.log
+	dh_clean 
+
+
+install: build debian/lmms.xpm
+	dh_testdir
+	dh_testroot
+	dh_clean -k 
+	dh_installdirs
+	$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
+	install -D -m 644 debian/lmms.xpm debian/lmms-common/usr/share/pixmaps/lmms.xpm
+	install -D -m 644 debian/menu debian/lmms-common/usr/share/menu/lmms
+	dh_install --sourcedir=$(CURDIR)/debian/tmp
+	dh_installdirs
+
+# Build architecture-independent files here.
+binary-indep: build install
+	dh_testdir -i 
+	dh_testroot -i
+	dh_installchangelogs -i 
+	dh_installdocs -i
+	dh_compress -i
+	dh_fixperms -i
+	dh_installdeb -i
+	dh_shlibdeps -i
+	dh_gencontrol -i
+	dh_md5sums -i
+	dh_builddeb -i
+
+# Build architecture-dependent files here.
+binary-arch: build install
+	dh_testdir -a
+	dh_testroot -a
+	dh_installchangelogs -a
+	dh_installdocs -a
+	dh_installman -a
+	dh_strip -a
+	dh_compress -a
+	dh_fixperms -a
+	dh_installdeb -a
+	dh_shlibdeps -a
+	dh_gencontrol -a
+	dh_md5sums -a
+	dh_builddeb -a
+
+patch: patch-stamp
+patch-stamp:
+
+
+patch: patch-stamp
+patch-stamp:
+	dpatch apply-all
+	touch $@
+
+unpatch:
+	dpatch deapply-all
+	rm -rf debian/patched patch-stamp
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install 
--- lmms-0.4.7.orig/debian/lmms-common.postinst
+++ lmms-0.4.7/debian/lmms-common.postinst
@@ -0,0 +1,8 @@
+#!/bin/sh
+set -e
+
+if [ "$1" = "configure" ] && [ -x "`which update-menus 2>/dev/null`" ]; then
+	update-menus
+fi
+
+#DEBHELPER#
--- lmms-0.4.7.orig/debian/changelog
+++ lmms-0.4.7/debian/changelog
@@ -0,0 +1,178 @@
+lmms (0.4.7-2) unstable; urgency=low
+  
+  [ Reinhard Tartler ]
+  * Depend on wine only on i386 and amd64 (Closes: #590950)
+
+  [ Patrick Winnertz ]
+  * Uploading patch from siretart, thanks for helping.
+
+ -- Patrick Winnertz <winnie@debian.org>  Mon, 02 Aug 2010 10:13:28 +0200
+
+lmms (0.4.7-1) unstable; urgency=low
+
+  * New upstream version
+
+ -- Patrick Winnertz <winnie@debian.org>  Thu, 29 Jul 2010 16:24:00 +0200
+
+lmms (0.4.6-2) unstable; urgency=low
+
+  * Build-depend on libestools2.0-dev (Closes: #589882)
+
+ -- Patrick Winnertz <winnie@debian.org>  Wed, 28 Jul 2010 11:55:16 +0200
+
+lmms (0.4.6-1) unstable; urgency=low
+
+  * New upstream version (Closes: #565733)
+  * Bumped standards version to 3.8.3, no further changes needed
+
+ -- Patrick Winnertz <winnie@debian.org>  Sun, 24 Jan 2010 16:40:39 +0100
+
+lmms (0.4.5-1) unstable; urgency=low
+
+  * New upstream version (Closes: #543645)
+  * Fix FTBFS on amd64 (Closes: #540671 #543017)
+
+ -- Patrick Winnertz <winnie@debian.org>  Fri, 11 Sep 2009 09:56:45 +0200
+
+lmms (0.4.4-1) unstable; urgency=low
+
+  * New upstream version (Closes: #511363)
+  * Provide menu file (Closes: #514905)
+    - The menufile is included in lmms-common and not in lmms 
+      as it is not arch specific
+  * Bumped standards version to 3.8.2 no further changes needed
+
+ -- Patrick Winnertz <winnie@debian.org>  Wed, 05 Aug 2009 20:46:40 +0200
+
+lmms (0.3.2-1) unstable; urgency=low
+
+  * Decrease wine dependency to wine-bin as suggested. (Closes: #446163)
+  * Acknowlegded NMU from Pierre Habouzit <madcoder@debian.org> in order to
+    fix FTBFS with gcc-4.3 which (Closes: #462202)
+  * Now including the singerbot plugin. (Closes: #443224)
+  * Add patch to prevent lmms from crashing.
+
+ -- Patrick Winnertz <winnie@debian.org>  Mon, 17 Mar 2008 10:56:12 +0100
+
+lmms (0.3.1-1.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Add g++-4.3.patch to fix g++-4.3 FTBFS (Closes: 462202).
+
+ -- Pierre Habouzit <madcoder@debian.org>  Sun, 16 Mar 2008 23:21:56 +0000
+
+lmms (0.3.1-1) unstable; urgency=low
+
+  * Packaging new upstream release.
+  * Install Upstream Changelog (Closes: #441477)
+    Thanks to Felipe Sateler
+  * Lowered the caps dependency to Recommends (Closes: #446163)
+  * Added -i/-a to the build targets in rules in order to make sure that only
+    (in)dep packages are build.
+  * Changed my maintainer address
+  * Added patch to remove stereo_enhancer plugin which has a ftbfs with gcc
+    4.2.3
+  * Added imagemagick as build-dep since we have to convert a .png to a .xpm
+    via convert
+  * Doesn't install upstreams menu file, since it's outdated.. instead use
+    our own.
+  * Standard-Version bump to 3.7.3
+  * Remove Homepage field from Description and create a own Header
+  * Added postinst and postrm for lmms-common to call update-menu if available
+    (this has to be done manually, since we doesn't use dh_installmenu to install
+    the menu file)
+
+ -- Patrick Winnertz <winnie@debian.org>  Thu, 06 Dec 2007 07:08:04 +0100
+
+lmms (0.3.0-1) unstable; urgency=low
+
+  [ Tobias Doerffel ]
+  * New upstream release. (Closes: #439301)
+  * Removed patch from Thomas Girard as upstream merged changes
+
+  [ Patrick Winnertz ]
+  * Moved manpage into correct package (lmms)
+  * Removed manuall installation of Upstream Changelog, thanks to the power of
+    debhelper ;-)
+  * FTBFS with gcc 4.2 is fixed by upstream (Closes: #383295)
+  * lmms has now a proper menu entry (Closes: #383406)
+  * lmms depends now on the same version of lmms-common (Closes: #389037)
+  * fixed by upstream: arpeggio status is now saved (Closes: #433262)
+  * Added build-depends libqt3-i18n (Closes: #384406)
+  * Added watch file for lmms (Closes: #439302)
+    Thanks to Raphael Geissert
+  * Improved copyright file
+  * Doesn't build libsingerbot since it is experimental and doesn't work
+    correct yet
+  * Added several build-dependencys (libstk0-dev, libestools1.2-dev, ladspa-sdk,
+    libflac-dev, libwine-dev [i386], libqt3-i18n, libasound2-dev, 
+    festival-dev, dpatch )
+  * Take over this package from Florian Ragwitz, so set myself as maintainer
+  * Add a depends on a specific version of lmms-common
+  * Added several new dependencys to lmms
+  * Improved description of lmms and lmms-common
+  * Die on errors of clean, but don't die if the makefile doesn't exist
+  * Added watch file
+
+ -- Patrick Winnertz <patrick.winnertz@skolelinux.org>  Fri, 24 Aug 2007 08:23:34 +0200
+
+lmms (0.2.1-1.1) unstable; urgency=high
+
+  * Non-maintainer Upload
+  * Add Patch by Thomas Girard for segfault right after
+    lmms starting up (Closes: 382491)
+
+ -- Michael Ablassmeier <abi@debian.org>  Tue,  5 Sep 2006 12:00:40 +0200
+
+lmms (0.2.1-1) unstable; urgency=low
+
+  * New upstream release.
+  * Bump up Standards-Version to 3.7.2 (no changes).
+  * Use DH_COMPAT 5.
+
+ -- Florian Ragwitz <rafl@debian.org>  Sun, 13 Aug 2006 14:40:13 +0200
+
+lmms (0.1.4-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Florian Ragwitz <rafl@debian.org>  Sat,  4 Feb 2006 07:16:47 +0100
+
+lmms (0.1.3-1) unstable; urgency=low
+
+  * New upstream release.
+  * debian/lmms.1 was included by upstream. Removed it from debian/.
+  * Install lmms.1 in lmms-common instead of lmms to safe some mirror space.
+  * Added a lintian override for the above, as lintian is not smart enough to
+    check for manpages in other packages from the same source package on which
+    a package with a missing manpage depends. 
+
+ -- Florian Ragwitz <rafl@debian.org>  Wed,  1 Feb 2006 18:28:42 +0100
+
+lmms (0.1.2-1) unstable; urgency=low
+
+  * New upstream release.
+
+ -- Florian Ragwitz <rafl@debian.org>  Thu, 22 Dec 2005 16:22:50 +0100
+
+lmms (0.1.1-2) unstable; urgency=low
+
+  * lmms-common doesn't depend on lmms anymore to remove a circular
+    dependencies (Closes: #339906).
+
+ -- Florian Ragwitz <rafl@debian.org>  Sun, 20 Nov 2005 12:27:08 +0100
+
+lmms (0.1.1-1) unstable; urgency=low
+
+  * New upstream release.
+  * Changed Maintainer address.
+  * Added libjack-dev to Build-Depends.
+
+ -- Florian Ragwitz <rafl@debian.org>  Mon, 31 Oct 2005 10:48:36 +0100
+
+lmms (0.0.9+0.1.0rc1-1) unstable; urgency=low
+
+  * Initial Release (Closes: #315976).
+
+ -- Florian Ragwitz <rafl@debianforum.de>  Fri, 22 Jul 2005 16:33:17 +0200
+
--- lmms-0.4.7.orig/debian/lmms-common.postrm
+++ lmms-0.4.7/debian/lmms-common.postrm
@@ -0,0 +1,6 @@
+#!/bin/sh
+set -e
+
+if [ -x "`which update-menus 2>/dev/null`" ]; then update-menus ; fi
+
+#DEBHELPER#
--- lmms-0.4.7.orig/debian/lmms-common.install
+++ lmms-0.4.7/debian/lmms-common.install
@@ -0,0 +1 @@
+usr/share/lmms/*
--- lmms-0.4.7.orig/debian/control
+++ lmms-0.4.7/debian/control
@@ -0,0 +1,40 @@
+Source: lmms
+Section: sound
+Priority: optional
+Maintainer: Patrick Winnertz <winnie@debian.org>
+Build-Depends: debhelper (>= 5.0.0), libsdl-sound1.2-dev, libsamplerate0-dev, libsndfile1-dev, libvorbis-dev, libjack-dev, libstk0-dev, libestools2.0-dev, ladspa-sdk, libflac-dev, libwine-dev [i386 amd64], libasound2-dev, festival-dev, imagemagick, cmake, qt4-qmake, libqt4-dev, libpulse-dev, libfluidsynth-dev, libfftw3-dev, libfreetype6-dev, libxft-dev, dpatch, libxinerama-dev, gcc-multilib [amd64], g++-multilib [amd64]
+Standards-Version: 3.8.3
+Homepage: http://lmms.sf.net/
+
+Package: lmms
+Architecture: any
+Depends: lmms-common (= ${source:Version}) , ${shlibs:Depends}, ${misc:Depends}, stk, wine-bin [i386 amd64]
+Recommends: tap-plugins, caps
+Suggests: fil-plugins, mcp-plugins, omins, vcf, freepats
+Description: Linux Multimedia Studio
+ LMMS aims to be a free alternative to popular (but commercial and closed-
+ source) programs like FruityLoops, Cubase and Logic giving you the ability of
+ producing music with your computer by creating cool loops, synthesizing and
+ mixing sounds, arranging samples, having more fun with your MIDI-keyboard
+ and much more...
+ .
+ LMMS combines the features of a tracker-/sequencer-program (pattern-/channel-/
+ sample-/song-/effect-management) and those of powerful synthesizers and
+ samplers in a modern, user-friendly and easy to use graphical user-interface.
+
+Package: lmms-common
+Architecture: all
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: Linux Multimedia Studio - common files
+ LMMS aims to be a free alternative to popular (but commercial and closed-
+ source) programs like FruityLoops, Cubase and Logic giving you the ability of
+ producing music with your computer by creating cool loops, synthesizing and
+ mixing sounds, arranging samples, having more fun with your MIDI-keyboard
+ and much more...
+ .
+ LMMS combines the features of a tracker-/sequencer-program (pattern-/channel-/
+ sample-/song-/effect-management) and those of powerful synthesizers and
+ samplers in a modern, user-friendly and easy to use graphical user-interface.
+ .
+ This package contains the platform independent files such as samples, presets
+ and some example projects.
--- lmms-0.4.7.orig/debian/patches/00list
+++ lmms-0.4.7/debian/patches/00list
@@ -0,0 +1 @@
+lib64-builddir.dpatch
--- lmms-0.4.7.orig/debian/patches/lib64-builddir.dpatch
+++ lmms-0.4.7/debian/patches/lib64-builddir.dpatch
@@ -0,0 +1,21 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: always build into lib even on x86_64, prevent a FTBFS there
+
+@DPATCH@
+diff -Nurwd lmms-0.4.5.orig/cmake/modules/DetectMachine.cmake lmms-0.4.5/cmake/modules/DetectMachine.cmake
+--- lmms-0.4.5.orig/cmake/modules/DetectMachine.cmake	2009-09-11 10:03:20.000000000 +0200
++++ lmms-0.4.5/cmake/modules/DetectMachine.cmake	2009-09-11 10:05:10.000000000 +0200
+@@ -31,11 +31,7 @@
+ IF(CMAKE_INSTALL_LIBDIR)
+ 	SET(LIB_DIR "${CMAKE_INSTALL_LIBDIR}")
+ ELSE(CMAKE_INSTALL_LIBDIR)
+-	IF(LMMS_HOST_X86_64)
+-		SET(LIB_DIR lib64)
+-	ELSE(LMMS_HOST_X86_64)
+ 		SET(LIB_DIR lib)
+-	ENDIF(LMMS_HOST_X86_64)
+ ENDIF(CMAKE_INSTALL_LIBDIR)
+ 
+ 
