--- apvlv-0.1.1.orig/debian/apvlv.xpm
+++ apvlv-0.1.1/debian/apvlv.xpm
@@ -0,0 +1,302 @@
+/* XPM */
+static char * apvlv_xpm[] = {
+"32 32 267 2",
+"  	c None",
+". 	c #A8ABA4",
+"+ 	c #A6A9A3",
+"@ 	c #A6A9A2",
+"# 	c #A6A8A2",
+"$ 	c #A5A8A2",
+"% 	c #A5A8A1",
+"& 	c #A5A7A1",
+"* 	c #A4A7A1",
+"= 	c #A4A7A0",
+"- 	c #A4A6A0",
+"; 	c #A5A7A0",
+"> 	c #A7AAA4",
+", 	c #A4A8A1",
+"' 	c #A7A9A4",
+") 	c #FAFBFA",
+"! 	c #FFFFFF",
+"~ 	c #F5F6F4",
+"{ 	c #E8E9E5",
+"] 	c #C4C7C1",
+"^ 	c #A5A9A2",
+"/ 	c #E9EBE7",
+"( 	c #E8EBE7",
+"_ 	c #E8EAE6",
+": 	c #E7E9E5",
+"< 	c #E6E8E3",
+"[ 	c #E5E7E2",
+"} 	c #E4E6E2",
+"| 	c #E2E5E0",
+"1 	c #E1E4DF",
+"2 	c #E1E3DE",
+"3 	c #DFE2DC",
+"4 	c #DEE1DB",
+"5 	c #E1E2DE",
+"6 	c #F3F4F3",
+"7 	c #DEE0DB",
+"8 	c #AAABA5",
+"9 	c #A4A6A1",
+"0 	c #E9EAE6",
+"a 	c #E6E9E4",
+"b 	c #E5E8E3",
+"c 	c #E4E6E1",
+"d 	c #E3E5E0",
+"e 	c #E2E4DF",
+"f 	c #DFE2DD",
+"g 	c #DEE2DC",
+"h 	c #DDE1DB",
+"i 	c #DADED7",
+"j 	c #D8DBD6",
+"k 	c #ACADA8",
+"l 	c #A2A59F",
+"m 	c #A3A59F",
+"n 	c #E7E9E6",
+"o 	c #949594",
+"p 	c #8D8D8D",
+"q 	c #929392",
+"r 	c #DCDFD8",
+"s 	c #CED1CA",
+"t 	c #FCFCFC",
+"u 	c #F4F5F2",
+"v 	c #D7DAD4",
+"w 	c #AAADA7",
+"x 	c #A2A49E",
+"y 	c #E6E8E4",
+"z 	c #E5E7E3",
+"A 	c #E4E7E2",
+"B 	c #E0E3DE",
+"C 	c #DDE0DA",
+"D 	c #D0D3CD",
+"E 	c #F8F9F8",
+"F 	c #F8F8F8",
+"G 	c #A4A5A1",
+"H 	c #A1A39D",
+"I 	c #E6E7E3",
+"J 	c #E3E6E1",
+"K 	c #E2E3DE",
+"L 	c #E0E3DD",
+"M 	c #D3D5D0",
+"N 	c #C7CAC5",
+"O 	c #BCBFBA",
+"P 	c #B4B6B1",
+"Q 	c #C5C7C2",
+"R 	c #CED1CC",
+"S 	c #9FA19C",
+"T 	c #A0A29C",
+"U 	c #BEBFBC",
+"V 	c #B8B9B7",
+"W 	c #B8B9B6",
+"X 	c #B7B8B6",
+"Y 	c #BCBEBB",
+"Z 	c #E2E5DF",
+"` 	c #D5D8D2",
+" .	c #CACDC7",
+"..	c #C0C2BD",
+"+.	c #B4B7B2",
+"@.	c #A9ABA7",
+"#.	c #CACCC8",
+"$.	c #B2B4AE",
+"%.	c #9FA19B",
+"&.	c #E5E6E2",
+"*.	c #E3E6E0",
+"=.	c #E2E4E0",
+"-.	c #E0E2DE",
+";.	c #E0E2DD",
+">.	c #DFE1DC",
+",.	c #DCDEDA",
+"'.	c #D6D8D3",
+").	c #CBCDC8",
+"!.	c #C6C8C4",
+"~.	c #D7D8D3",
+"{.	c #9EA29A",
+"].	c #9EA09A",
+"^.	c #E3E5E1",
+"/.	c #F3F4F2",
+"(.	c #9A9D97",
+"_.	c #9D9F99",
+":.	c #616460",
+"<.	c #5E605C",
+"[.	c #5D5F5B",
+"}.	c #595B57",
+"|.	c #989A94",
+"1.	c #9B9E98",
+"2.	c #6F654F",
+"3.	c #645B47",
+"4.	c #544D3C",
+"5.	c #6C634D",
+"6.	c #685F4A",
+"7.	c #6B614C",
+"8.	c #BEBFBD",
+"9.	c #BDBEBC",
+"0.	c #979993",
+"a.	c #8D744B",
+"b.	c #8B724A",
+"c.	c #59492F",
+"d.	c #776240",
+"e.	c #6B5839",
+"f.	c #745F3D",
+"g.	c #876F48",
+"h.	c #969892",
+"i.	c #999C96",
+"j.	c #AC8548",
+"k.	c #AB8448",
+"l.	c #8B6B3A",
+"m.	c #725830",
+"n.	c #71582F",
+"o.	c #A27D44",
+"p.	c #C0C1BE",
+"q.	c #B9BAB8",
+"r.	c #BFC0BE",
+"s.	c #959791",
+"t.	c #989B95",
+"u.	c #CA9444",
+"v.	c #D09D45",
+"w.	c #CF9E44",
+"x.	c #CC9745",
+"y.	c #6B4E24",
+"z.	c #B9883E",
+"A.	c #B5843D",
+"B.	c #A67A38",
+"C.	c #E9EAE7",
+"D.	c #939690",
+"E.	c #E9A540",
+"F.	c #EDB545",
+"G.	c #F8DB75",
+"H.	c #FAE388",
+"I.	c #F1C251",
+"J.	c #E4A63F",
+"K.	c #684A1D",
+"L.	c #A1722C",
+"M.	c #EBECE9",
+"N.	c #C2C2C1",
+"O.	c #BBBCBA",
+"P.	c #C0C1BF",
+"Q.	c #EAEBE8",
+"R.	c #92958F",
+"S.	c #969993",
+"T.	c #FCB43F",
+"U.	c #FDD664",
+"V.	c #FEF7BA",
+"W.	c #FFF8BE",
+"X.	c #FDEE97",
+"Y.	c #FCBC42",
+"Z.	c #78531D",
+"`.	c #DA9836",
+" +	c #FCAF3E",
+".+	c #ECEDEA",
+"++	c #91948E",
+"@+	c #959892",
+"#+	c #94713B",
+"$+	c #897344",
+"%+	c #A2915D",
+"&+	c #9A8654",
+"*+	c #7D6439",
+"=+	c #594729",
+"-+	c #6F5833",
+";+	c #7D6339",
+">+	c #EEEEEC",
+",+	c #C3C3C2",
+"'+	c #BDBDBC",
+")+	c #BCBDBC",
+"!+	c #C2C3C1",
+"~+	c #EDEEEB",
+"{+	c #90938D",
+"]+	c #949791",
+"^+	c #EAECE8",
+"/+	c #ECE9E1",
+"(+	c #EDE9DE",
+"_+	c #EEEADF",
+":+	c #EFEBE0",
+"<+	c #EFEBE1",
+"[+	c #F0EBE1",
+"}+	c #F0ECE1",
+"|+	c #F0EDE6",
+"1+	c #EFF0EE",
+"2+	c #EFF0ED",
+"3+	c #EFEFED",
+"4+	c #EEEFED",
+"5+	c #EEEFEC",
+"6+	c #90928C",
+"7+	c #BCBDBB",
+"8+	c #BDBEBD",
+"9+	c #BEBEBD",
+"0+	c #C4C4C3",
+"a+	c #F0F0EE",
+"b+	c #8E908B",
+"c+	c #EDEEEC",
+"d+	c #F0F1EE",
+"e+	c #F0F1EF",
+"f+	c #F1F2F0",
+"g+	c #F2F2F0",
+"h+	c #F2F2F1",
+"i+	c #F2F3F1",
+"j+	c #F1F1EF",
+"k+	c #8D8F8A",
+"l+	c #91938E",
+"m+	c #ECEDEB",
+"n+	c #BEBFBE",
+"o+	c #BFBFBE",
+"p+	c #BFBFBF",
+"q+	c #BFC0BF",
+"r+	c #C0C0BF",
+"s+	c #C5C5C4",
+"t+	c #8C8E89",
+"u+	c #90928D",
+"v+	c #ECEEEB",
+"w+	c #F3F3F2",
+"x+	c #F4F4F3",
+"y+	c #F5F5F3",
+"z+	c #F5F5F4",
+"A+	c #F4F4F2",
+"B+	c #8B8D88",
+"C+	c #8F918C",
+"D+	c #C6C6C6",
+"E+	c #8A8C87",
+"F+	c #EBEDEA",
+"G+	c #F3F3F1",
+"H+	c #898B86",
+"I+	c #888A85",
+"J+	c #8D908A",
+"K+	c #F6F7F6",
+"L+	c #FEFEFE",
+"M+	c #F7F7F7",
+"N+	c #8A8D87",
+"O+	c #5B5D59",
+"P+	c #8B8E89",
+"Q+	c #898A86",
+"R+	c #5D5D5B",
+"                                                                ",
+"                                                                ",
+"          . + @ # # $ $ % & & * = - ; > ,                       ",
+"        ' ) ! ! ! ! ! ! ! ! ! ! ! ! ~ { ] ^                     ",
+"        & ! / ( _ : < [ } | 1 2 3 4 3 5 6 7 8 9                 ",
+"        - ! 0 _ : a b [ c d e 2 f g h i j ) 4 k l               ",
+"        m ! n : o p p p p p p p p q 4 r s t u v w x             ",
+"        x ! a y y z A A c d e 1 B 3 4 C D E F / v G             ",
+"        H ! y z I [ [ c J | 1 K 2 L 3 4 M N O P Q R S           ",
+"        T ! z [ U V W W X Y Z 1 B L 3 4 `  ...+.@.#.$.          ",
+"        %.! &.A c } c J *.| =.e 2 -.;.;.;.>.,.'.).!.~.{.        ",
+"        ].! c } c c J J ^.d e e 1 1 1 1 1 1 1 1 2 d /.(.        ",
+"        _.! J c :.<.[.}.<.<.<.<.<.<.:.d d d d d d | ! |.        ",
+"        1.! ^.^.2.2.2.3.4.5.6.2.2.7.2.} 8.V V 9.} } ! 0.        ",
+"        (.! ^.c a.a.a.a.b.c.d.b.e.f.g.y y y y < I z ! h.        ",
+"        i.! } [ j.j.j.k.l.m.j.j.n.o.j.{ p.q.q.r.: : ! s.        ",
+"        t.! I y u.u.v.w.x.y.z.A.B.u.u.C.C.C.C.C.0 _ ! D.        ",
+"        |.! : : E.F.G.H.I.J.K.L.E.E.E.M.N.O.O.P.Q.Q.! R.        ",
+"        S.! _ _ T.U.V.W.X.Y.Z.`. + + +.+.+.+.+.+.+M.! ++        ",
+"        @+! C./ #+$+%+%+&+*+=+-+;+;+#+>+,+'+)+!+~+~+! {+        ",
+"        ]+! Q.^+/+(+(+_+_+:+:+<+[+}+|+1+1+1+2+3+4+5+! 6+        ",
+"        D.! M.M.!+7+7+'+'+9.8+9+9+9+9+9+9+9+9+0+a+1+! b+        ",
+"        R.! M..+~+c+5+3+1+d+e+f+f+g+h+i+i+h+g+f+j+e+! k+        ",
+"        l+! .+m+,+'+'+8+9+9+n+o+o+p+q+r+r+q+p+s+g+f+! t+        ",
+"        u+! .+v+~+5+3+1+e+j+g+i+w+x+y+z+z+x+A+w+h+f+! B+        ",
+"        C+! .+m+,+'+'+8+9+9+o+o+D+/.x+x+x+x+w+i+g+f+! E+        ",
+"        b+! F+.+~+c+5+2+1+e+j+f+h+i+G+w+w+i+i+g+f+j+! H+        ",
+"        k+! .+~+~+5+4+2+a+e+j+f+g+i+i+i+i+i+g+f+f+e+! I+        ",
+"        J+K+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+L+M+N+        ",
+"        O+P+B+B+E+E+E+E+H+H+H+H+H+I+I+I+I+I+I+I+I+I+Q+R+        ",
+"                                                                ",
+"                                                                "};
--- apvlv-0.1.1.orig/debian/changelog
+++ apvlv-0.1.1/debian/changelog
@@ -0,0 +1,151 @@
+apvlv (0.1.1-1.2b1) staging; urgency=high
+
+  * No-change rebuild against libstdc++6
+
+ -- Philip Muškovac <yofel@kubuntu.org>  Thu, 03 Sep 2015 09:58:12 +0000
+
+apvlv (0.1.1-1.2) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Add support for poppler >= 0.18. (Closes: #651851)
+
+ -- Pino Toscano <pino@debian.org>  Tue, 20 Mar 2012 23:11:31 +0100
+
+apvlv (0.1.1-1.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Add support for poppler >= 0.15. Patch by Pino Toscano. (Closes: #627609)
+
+ -- Michael Biebl <biebl@debian.org>  Wed, 01 Jun 2011 22:18:49 +0200
+
+apvlv (0.1.1-1) unstable; urgency=low
+
+  * Suggest poppler-data
+  * Change CMAKE_INSTALL_PREFIX to "/usr"
+  * Add cmake to build dependencies
+  * Imported Upstream version 0.1.1 (Closes: #558893)
+  * Fix debian/watch
+
+ -- Lukas Gaertner <lukas.gaertner@credativ.de>  Mon, 14 Feb 2011 16:29:02 +0100
+
+apvlv (0.0.9.8-1) unstable; urgency=low
+
+  [Lukas Gaertner]
+  * Adopt package (Closes: #607320)
+
+  [Stefan Ritter]
+  * Add libdjvulibre-dev to build dependencies (Closes: #602010)
+  * Bump Standards-Version to 3.9.1
+  * Imported Upstream version 0.0.9.8
+
+ -- Lukas Gaertner <lukas.gaertner@credativ.de>  Thu, 23 Dec 2010 15:28:02 +0100
+
+apvlv (0.0.9.7-1) unstable; urgency=low
+
+  * New upstream release
+  * Bump Standards-Version to 3.9.0
+  * Update debian/desktop, thanks to the gentoo maintainer of apvlv
+  * Fix debian/watch
+
+ -- Stefan Ritter <xeno@thehappy.de>  Sun, 04 Jul 2010 22:39:00 +0200
+
+apvlv (0.0.9.6-1) unstable; urgency=low
+
+  * New upstream release
+  * Add debian/source/format (source 1.0)
+
+ -- Stefan Ritter <xeno@thehappy.de>  Tue, 20 Apr 2010 13:53:00 +0200
+
+apvlv (0.0.9.5-1) unstable; urgency=low
+
+  * New upstream release (Closes: #576081, #576082)
+
+ -- Stefan Ritter <xeno@thehappy.de>  Wed, 07 Apr 2010 11:13:08 +0200
+
+apvlv (0.0.9.3-1) unstable; urgency=low
+
+  * New upstream release
+  * Bumped Standards-Version to 3.8.4, no changes needed
+
+ -- Stefan Ritter <xeno@thehappy.de>  Thu, 04 Feb 2010 15:11:57 +0200
+
+apvlv (0.0.9.2-1) unstable; urgency=low
+
+  * New upstream release (Closes: #558893)
+
+ -- Stefan Ritter <xeno@thehappy.de>  Wed, 20 Jan 2010 13:54:00 +0200
+
+apvlv (0.0.9-1) unstable; urgency=low
+
+  * New upstream release (Closes: #562495)
+    Thanks to Daniel Friesel for the manpage
+
+ -- Stefan Ritter <xeno@thehappy.de>  Thu, 07 Jan 2010 09:17:00 +0200
+
+apvlv (0.0.8.1-1) unstable; urgency=low
+
+  * New upstream release (Closes: #558833, #558894)
+
+ -- Stefan Ritter <xeno@thehappy.de>  Fri, 11 Dec 2009 12:50:00 +0200
+
+apvlv (0.0.8.0-1) unstable; urgency=low
+
+  * New upstream release
+  * Removed patchsystem and using a debhelper 5 compatible rules file
+  * Removed encoding from desktop file since it is deprecated by the 
+    FreeDesktop standard
+  * Removed apvlvrc.example from /usr/share/doc/apvlv/ since it is in
+    /etc/apvlvrc
+
+ -- Stefan Ritter <xeno@thehappy.de>  Wed, 09 Dec 2009 16:28:00 +0200
+
+apvlv (0.0.7.5-1) unstable; urgency=low
+
+  * New upstream release
+  * Switched from dpatch to quilt
+
+ -- Stefan Ritter <xeno@thehappy.de>  Thu, 19 Nov 2009 23:56:43 +0200
+
+apvlv (0.0.7.4-1) unstable; urgency=low
+
+  * New upstream release
+  * Removed debian/conffiles
+
+ -- Stefan Ritter <xeno@thehappy.de>  Wed, 07 Oct 2009 20:11:00 +0200
+
+apvlv (0.0.7.3-1) unstable; urgency=low
+
+  * New upstream release
+  * Added apvlvrc to conffiles
+
+ -- Stefan Ritter <xeno@thehappy.de>  Sun, 19 Sep 2009 19:31:00 +0200
+
+apvlv (0.0.7.2-1) unstable; urgency=low
+
+  * New upstream release
+  * Improved the long description
+  * Added patch that fixes a makefile path problem
+    (02-fix-path-in-makefile.dpatch)
+
+ -- Stefan Ritter <xeno@thehappy.de>  Wed, 09 Sep 2009 13:13:13 +0200
+
+apvlv (0.0.6.11-1) unstable; urgency=low
+
+  * New upstream release (Closes: #542231)
+  * Added README.source
+  * Improved the long description
+  * Bumped Standards-Version to 3.8.3, no changes needed
+
+ -- Stefan Ritter <xeno@thehappy.de>  Sun, 30 Aug 2009 19:29:02 +0200
+
+apvlv (0.0.6.10-1) unstable; urgency=low
+
+  * New upstream release
+
+ -- Stefan Ritter <xeno@thehappy.de>  Wed, 29 Jul 2009 10:12:19 +0200
+
+apvlv (0.0.6.8-1) unstable; urgency=low
+
+  * Initial release (Closes: #537230)
+
+ -- Stefan Ritter <xeno@thehappy.de>  Wed, 15 Jul 2009 14:48:33 +0200
--- apvlv-0.1.1.orig/debian/compat
+++ apvlv-0.1.1/debian/compat
@@ -0,0 +1 @@
+5
--- apvlv-0.1.1.orig/debian/control
+++ apvlv-0.1.1/debian/control
@@ -0,0 +1,18 @@
+Source: apvlv
+Section: text
+Priority: extra
+Maintainer: Lukas Gaertner <lukas.gaertner@credativ.de>
+Homepage: http://code.google.com/p/apvlv/
+Build-Depends: debhelper (>= 7), libgtk2.0-dev (>= 2.6.0), libpoppler-glib-dev (>= 0.5.0), libdjvulibre-dev, cmake (>= 2.6)
+Standards-Version: 3.9.1
+
+Package: apvlv
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Suggests: poppler-data (>= 0.2.0-2)
+Description: PDF viewer with Vim-like behaviour
+ apvlv (Alf's PDF Viewer Like Vim) is a small and fast PDF viewer, that uses
+ poppler for rendering. Its interface aims to users who like vim behaviour.
+ For example opening a PDF file can be done with ':o filename'. apvlv can also
+ work with tabs, so you can open multiple files at the same time in one
+ program.
--- apvlv-0.1.1.orig/debian/copyright
+++ apvlv-0.1.1/debian/copyright
@@ -0,0 +1,50 @@
+This package was debianized by Stefan Ritter <xeno@thehappy.de> on Wed, 15 Jul
+2009 16:51:17 +0200.
+
+The source can be downloaded from http://code.google.com/p/apvlv/.
+
+Author: Alf <naihe2010@gmail.com>
+
+Files: *
+Copyright: © 2008 by Alf <naihe2010@gmail.com>
+License: GPL-2
+ apvlv is published under the GNU Public License v2 without any
+ warranty implied or otherwise, with no suitability for any purpose.
+ Use this software at your own risk.
+ .
+ On Debian systems, the complete text of the GNU General Public
+ License, version 2, can be found in 
+ /usr/share/common-licenses/GPL-2.
+
+Files: aclocal.m4, configure, scripts/*
+Copyright: © 1992 - 2008 Free Software Foundation, Inc.
+License: FSF
+ This file is free software; the Free Software Foundation
+ gives unlimited permission to copy and/or distribute it,
+ with or without modifications, as long as this notice is preserved.
+ .
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+ even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+ PARTICULAR PURPOSE.
+
+Files: debian/*
+Copyright: © 2010 by Lukas Gaertner <lukas.gaertner@credativ.de>
+Copyright: © 2009 by Stefan Ritter <xeno@thehappy.de>
+License: GPL-2+
+ 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., 51 Franklin Street, 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-2 file.
--- apvlv-0.1.1.orig/debian/desktop
+++ apvlv-0.1.1/debian/desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Name=apvlv
+Type=Application
+Comment=Alf's PDF Viewer Like Vim
+Exec=apvlv
+TryExec=apvlv
+Icon=/usr/share/pixmaps/apvlv/apvlv.xpm
+Categories=Graphics;Viewer;
--- apvlv-0.1.1.orig/debian/dirs
+++ apvlv-0.1.1/debian/dirs
@@ -0,0 +1,4 @@
+etc
+usr/bin
+usr/share/pixmaps/apvlv
+usr/share/applications
--- apvlv-0.1.1.orig/debian/docs
+++ apvlv-0.1.1/debian/docs
@@ -0,0 +1,5 @@
+README
+AUTHORS
+THANKS
+TODO
+Startup.pdf
--- apvlv-0.1.1.orig/debian/manpages
+++ apvlv-0.1.1/debian/manpages
@@ -0,0 +1 @@
+apvlv.1
--- apvlv-0.1.1.orig/debian/menu
+++ apvlv-0.1.1/debian/menu
@@ -0,0 +1,7 @@
+?package(apvlv):\
+	needs="x11" \
+	section="Applications/Viewers" \
+	command="/usr/bin/apvlv" \
+	title="apvlv" \
+	icon="/usr/share/pixmaps/apvlv/apvlv.xpm" \
+	longtitle="apvlv: PDF viewer with Vim-like behaviour"
--- apvlv-0.1.1.orig/debian/mime
+++ apvlv-0.1.1/debian/mime
@@ -0,0 +1,2 @@
+application/pdf; apvlv %s; test=test -n "$DISPLAY"; nametemplate=%s.pdf; priority=5
+application/x-pdf; apvlv %s; test=test -n "$DISPLAY"; nametemplate=%s.pdf;priority=5
--- apvlv-0.1.1.orig/debian/rules
+++ apvlv-0.1.1/debian/rules
@@ -0,0 +1,56 @@
+#!/usr/bin/make -f
+
+build: build-stamp
+build-stamp:
+	dh_testdir
+	cmake -DCMAKE_INSTALL_PREFIX="/usr" -DAPVLV_WITH_UMD=OFF .
+	make
+	touch build-stamp
+
+clean:
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp
+	[ ! -f Makefile ] || $(MAKE) distclean
+	dh_clean
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_prep
+	dh_installdirs
+	# Binary
+	install -m 0755 src/apvlv debian/apvlv/usr/bin/
+	# Icons
+	install -m 0644 icons/* debian/apvlv/usr/share/pixmaps/apvlv/
+	install -m 0644 debian/apvlv.xpm debian/apvlv/usr/share/pixmaps/apvlv/
+	# Desktop
+	install -m 0644 debian/desktop debian/apvlv/usr/share/applications/apvlv.desktop
+	# Config
+	install -m 0644 apvlvrc.example debian/apvlv/etc/apvlvrc
+
+# 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 NEWS
+	dh_installdocs
+	dh_installexamples
+	dh_installmenu
+	dh_installmime
+	dh_installman
+	dh_strip
+	dh_compress -XStartup.pdf
+	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
--- apvlv-0.1.1.orig/debian/source/format
+++ apvlv-0.1.1/debian/source/format
@@ -0,0 +1 @@
+1.0
--- apvlv-0.1.1.orig/debian/watch
+++ apvlv-0.1.1/debian/watch
@@ -0,0 +1,5 @@
+version = 3
+opts=\
+downloadurlmangle=s|.*[?]name=(.*?)&.*|http://apvlv.googlecode.com/files/$1|,\
+filenamemangle=s|[^/]+[?]name=(.*?)&.*|$1| \
+http://code.google.com/p/apvlv/downloads/detail[?]name=apvlv-([0-9.]+)-Source.tar.gz&.*
--- apvlv-0.1.1.orig/src/ApvlvFile.cpp
+++ apvlv-0.1.1/src/ApvlvFile.cpp
@@ -29,6 +29,140 @@
 #include "ApvlvUtil.hpp"
 #include "ApvlvView.hpp"
 
+#ifndef POPPLER_WITH_GDK
+
+static void
+copy_cairo_surface_to_pixbuf (cairo_surface_t *surface,
+			      GdkPixbuf       *pixbuf)
+{
+  int cairo_width, cairo_height, cairo_rowstride;
+  unsigned char *pixbuf_data, *dst, *cairo_data;
+  int pixbuf_rowstride, pixbuf_n_channels;
+  unsigned int *src;
+  int x, y;
+
+  cairo_width = cairo_image_surface_get_width (surface);
+  cairo_height = cairo_image_surface_get_height (surface);
+  cairo_rowstride = cairo_image_surface_get_stride (surface);
+  cairo_data = cairo_image_surface_get_data (surface);
+
+  pixbuf_data = gdk_pixbuf_get_pixels (pixbuf);
+  pixbuf_rowstride = gdk_pixbuf_get_rowstride (pixbuf);
+  pixbuf_n_channels = gdk_pixbuf_get_n_channels (pixbuf);
+
+  if (cairo_width > gdk_pixbuf_get_width (pixbuf))
+    cairo_width = gdk_pixbuf_get_width (pixbuf);
+  if (cairo_height > gdk_pixbuf_get_height (pixbuf))
+    cairo_height = gdk_pixbuf_get_height (pixbuf);
+  for (y = 0; y < cairo_height; y++)
+    {
+      src = (unsigned int *) (cairo_data + y * cairo_rowstride);
+      dst = pixbuf_data + y * pixbuf_rowstride;
+      for (x = 0; x < cairo_width; x++) 
+	{
+	  dst[0] = (*src >> 16) & 0xff;
+	  dst[1] = (*src >> 8) & 0xff; 
+	  dst[2] = (*src >> 0) & 0xff;
+	  if (pixbuf_n_channels == 4)
+	      dst[3] = (*src >> 24) & 0xff;
+	  dst += pixbuf_n_channels;
+	  src++;
+	}
+    }
+}
+
+static void
+_poppler_page_render_to_pixbuf (PopplerPage *page,
+				int src_x, int src_y,
+				int src_width, int src_height,
+				double scale,
+				int rotation,
+				gboolean printing,
+				GdkPixbuf *pixbuf)
+{
+  cairo_t *cr;
+  cairo_surface_t *surface;
+
+  surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32,
+					src_width, src_height);
+  cr = cairo_create (surface);
+  cairo_save (cr);
+  switch (rotation) {
+  case 90:
+	  cairo_translate (cr, src_x + src_width, -src_y);
+	  break;
+  case 180:
+	  cairo_translate (cr, src_x + src_width, src_y + src_height);
+	  break;
+  case 270:
+	  cairo_translate (cr, -src_x, src_y + src_height);
+	  break;
+  default:
+	  cairo_translate (cr, -src_x, -src_y);
+  }
+
+  if (scale != 1.0)
+	  cairo_scale (cr, scale, scale);
+
+  if (rotation != 0)
+	  cairo_rotate (cr, rotation * G_PI / 180.0);
+
+  if (printing)
+	  poppler_page_render_for_printing (page, cr);
+  else
+	  poppler_page_render (page, cr);
+  cairo_restore (cr);
+
+  cairo_set_operator (cr, CAIRO_OPERATOR_DEST_OVER);
+  cairo_set_source_rgb (cr, 1., 1., 1.);
+  cairo_paint (cr);
+
+  cairo_destroy (cr);
+
+  copy_cairo_surface_to_pixbuf (surface, pixbuf);
+  cairo_surface_destroy (surface);
+}
+
+/**
+ * poppler_page_render_to_pixbuf:
+ * @page: the page to render from
+ * @src_x: x coordinate of upper left corner  
+ * @src_y: y coordinate of upper left corner  
+ * @src_width: width of rectangle to render  
+ * @src_height: height of rectangle to render
+ * @scale: scale specified as pixels per point
+ * @rotation: rotate the document by the specified degree
+ * @pixbuf: pixbuf to render into
+ *
+ * First scale the document to match the specified pixels per point,
+ * then render the rectangle given by the upper left corner at
+ * (src_x, src_y) and src_width and src_height.
+ * This function is for rendering a page that will be displayed.
+ * If you want to render a page that will be printed use
+ * poppler_page_render_to_pixbuf_for_printing() instead
+ *
+ * Deprecated: 0.16
+ **/
+void
+poppler_page_render_to_pixbuf (PopplerPage *page,
+			       int src_x, int src_y,
+			       int src_width, int src_height,
+			       double scale,
+			       int rotation,
+			       GdkPixbuf *pixbuf)
+{
+  g_return_if_fail (POPPLER_IS_PAGE (page));
+  g_return_if_fail (scale > 0.0);
+  g_return_if_fail (pixbuf != NULL);
+
+  _poppler_page_render_to_pixbuf (page, src_x, src_y,
+				  src_width, src_height,
+				  scale, rotation,
+				  FALSE,
+				  pixbuf);
+}
+#endif
+
 #ifdef HAVE_LIBUMD
 #define LIBUMD_ENABLE_GTK
 #include <umd.h>
@@ -302,9 +436,14 @@
 
   bool ApvlvPDF::pagetext (int pn, int x1, int y1, int x2, int y2, char **out)
   {
-    PopplerRectangle rect = { x1, y1, x2, y2 };
     PopplerPage *page = poppler_document_get_page (mDoc, pn);
+#if POPPLER_CHECK_VERSION(0, 15, 1)
+    PopplerRectangle rect = { x1, y2, x2, y1 };
+    *out = poppler_page_get_selected_text (page, POPPLER_SELECTION_WORD, &rect);
+#else
+    PopplerRectangle rect = { x1, y1, x2, y2 };
     *out = poppler_page_get_text (page, POPPLER_SELECTION_WORD, &rect);
+#endif
     if (*out != NULL)
       {
         return true;
