--- serf-1.3.6.orig/debian/libserf-1-1.symbols
+++ serf-1.3.6/debian/libserf-1-1.symbols
@@ -0,0 +1,143 @@
+libserf-1.so.1 libserf-1-1 #MINVER#
+| libserf-private
+* Build-Depends-Package: libserf-dev
+ (regex)__ 0 1
+ serf_bmemdup@Base 1.0
+ serf_bstrcatv@Base 1.3
+ serf_bstrdup@Base 1.0
+ serf_bstrmemdup@Base 1.0
+ serf_bucket_aggregate_append@Base 1.0
+ serf_bucket_aggregate_append_iovec@Base 1.0
+ serf_bucket_aggregate_become@Base 1.0
+ serf_bucket_aggregate_cleanup@Base 1.0
+ serf_bucket_aggregate_create@Base 1.0
+ serf_bucket_aggregate_hold_open@Base 1.0
+ serf_bucket_aggregate_prepend@Base 1.0
+ serf_bucket_aggregate_prepend_iovec@Base 1.0
+ serf_bucket_allocator_create@Base 1.0
+ serf_bucket_allocator_get_pool@Base 1.0
+ serf_bucket_barrier_create@Base 1.0
+ serf_bucket_bwtp_channel_close@Base 1.0
+ serf_bucket_bwtp_channel_open@Base 1.0
+ serf_bucket_bwtp_frame_get_channel@Base 1.0
+ serf_bucket_bwtp_frame_get_headers@Base 1.0
+ serf_bucket_bwtp_frame_get_phrase@Base 1.0
+ serf_bucket_bwtp_frame_get_type@Base 1.0
+ serf_bucket_bwtp_header_create@Base 1.0
+ serf_bucket_bwtp_incoming_frame_create@Base 1.0
+ serf_bucket_bwtp_incoming_frame_wait_for_headers@Base 1.0
+ serf_bucket_bwtp_message_create@Base 1.0
+ serf_bucket_chunk_create@Base 1.0
+ serf_bucket_create@Base 1.0
+ serf_bucket_dechunk_create@Base 1.0
+ serf_bucket_deflate_create@Base 1.0
+ serf_bucket_file_create@Base 1.0
+ serf_bucket_headers_create@Base 1.0
+ serf_bucket_headers_do@Base 1.0
+ serf_bucket_headers_get@Base 1.0
+ serf_bucket_headers_set@Base 1.0
+ serf_bucket_headers_setc@Base 1.0
+ serf_bucket_headers_setn@Base 1.0
+ serf_bucket_headers_setx@Base 1.0
+ serf_bucket_iovec_create@Base 1.0
+ serf_bucket_limit_create@Base 1.0
+ serf_bucket_mem_alloc@Base 1.0
+ serf_bucket_mem_calloc@Base 1.0
+ serf_bucket_mem_free@Base 1.0
+ serf_bucket_mmap_create@Base 1.0
+ serf_bucket_request_become@Base 1.0
+ serf_bucket_request_create@Base 1.0
+ serf_bucket_request_get_headers@Base 1.0
+ serf_bucket_request_set_CL@Base 1.1
+ serf_bucket_request_set_root@Base 1.0
+ serf_bucket_response_body_create@Base 1.2
+ serf_bucket_response_create@Base 1.0
+ serf_bucket_response_get_headers@Base 1.0
+ serf_bucket_response_set_head@Base 1.0
+ serf_bucket_response_status@Base 1.0
+ serf_bucket_response_wait_for_headers@Base 1.0
+ serf_bucket_simple_copy_create@Base 1.0
+ serf_bucket_simple_create@Base 1.0
+ serf_bucket_simple_own_create@Base 1.3
+ serf_bucket_socket_create@Base 1.0
+ serf_bucket_socket_set_read_progress_cb@Base 1.0
+ serf_bucket_ssl_decrypt_context_get@Base 1.0
+ serf_bucket_ssl_decrypt_create@Base 1.0
+ serf_bucket_ssl_encrypt_context_get@Base 1.0
+ serf_bucket_ssl_encrypt_create@Base 1.0
+ serf_bucket_type_aggregate@Base 1.0
+ serf_bucket_type_barrier@Base 1.0
+ serf_bucket_type_bwtp_frame@Base 1.0
+ serf_bucket_type_bwtp_incoming_frame@Base 1.0
+ serf_bucket_type_chunk@Base 1.0
+ serf_bucket_type_dechunk@Base 1.0
+ serf_bucket_type_deflate@Base 1.0
+ serf_bucket_type_file@Base 1.0
+ serf_bucket_type_headers@Base 1.0
+ serf_bucket_type_iovec@Base 1.0
+ serf_bucket_type_limit@Base 1.0
+ serf_bucket_type_mmap@Base 1.0
+ serf_bucket_type_request@Base 1.0
+ serf_bucket_type_response@Base 1.0
+ serf_bucket_type_response_body@Base 1.2
+ serf_bucket_type_simple@Base 1.0
+ serf_bucket_type_socket@Base 1.0
+ serf_bucket_type_ssl_decrypt@Base 1.0
+ serf_bucket_type_ssl_encrypt@Base 1.0
+ serf_config_authn_types@Base 1.0
+ serf_config_credentials_callback@Base 1.0
+ serf_config_proxy@Base 1.0
+ serf_connection_close@Base 1.0
+ serf_connection_create2@Base 1.0
+ serf_connection_create@Base 1.0
+ serf_connection_get_latency@Base 1.2
+ serf_connection_priority_request_create@Base 1.0
+ serf_connection_request_create@Base 1.0
+ serf_connection_reset@Base 1.0
+ serf_connection_set_async_responses@Base 1.0
+ serf_connection_set_max_outstanding_requests@Base 1.0
+ serf_context_bucket_socket_create@Base 1.0
+ serf_context_create@Base 1.0
+ serf_context_create_ex@Base 1.0
+ serf_context_prerun@Base 1.0
+ serf_context_run@Base 1.0
+ serf_context_set_progress_cb@Base 1.0
+ serf_databuf_init@Base 1.0
+ serf_databuf_peek@Base 1.0
+ serf_databuf_read@Base 1.0
+ serf_databuf_readline@Base 1.0
+ serf_default_destroy@Base 1.0
+ serf_default_destroy_and_data@Base 1.0
+ serf_default_read_bucket@Base 1.0
+ serf_default_read_for_sendfile@Base 1.0
+ serf_default_read_iovec@Base 1.0
+ serf_error_string@Base 1.0
+ serf_event_trigger@Base 1.0
+ serf_incoming_create@Base 1.0
+ serf_lib_version@Base 1.0
+ serf_linebuf_fetch@Base 1.0
+ serf_linebuf_init@Base 1.0
+ serf_listener_create@Base 1.0
+ serf_request_bucket_request_create@Base 1.0
+ serf_request_cancel@Base 1.0
+ serf_request_get_alloc@Base 1.0
+ serf_request_get_conn@Base 1.0
+ serf_request_get_pool@Base 1.0
+ serf_request_is_written@Base 1.2
+ serf_request_set_handler@Base 1.0
+ serf_response_full_become_aggregate@Base 1.2
+ serf_ssl_cert_certificate@Base 1.0
+ serf_ssl_cert_depth@Base 1.0
+ serf_ssl_cert_export@Base 1.0
+ serf_ssl_cert_issuer@Base 1.0
+ serf_ssl_cert_subject@Base 1.0
+ serf_ssl_client_cert_password_set@Base 1.0
+ serf_ssl_client_cert_provider_set@Base 1.0
+ serf_ssl_load_cert_file@Base 1.0
+ serf_ssl_server_cert_callback_set@Base 1.0
+ serf_ssl_server_cert_chain_callback_set@Base 1.1
+ serf_ssl_set_hostname@Base 1.0
+ serf_ssl_trust_cert@Base 1.0
+ serf_ssl_use_compression@Base 1.2
+ serf_ssl_use_default_certificates@Base 1.0
+ serf_util_readline@Base 1.0
--- serf-1.3.6.orig/debian/copyright
+++ serf-1.3.6/debian/copyright
@@ -0,0 +1,55 @@
+This package was debianized by:
+  Noritada Kobayashi <nori1@dolphin.c.u-tokyo.ac.jp> on 2006-12-21
+The current maintainer is Peter Samuelson <peters@p12n.org>.
+
+It was downloaded from:
+  http://code.google.com/p/serf/
+
+Upstream Authors:
+  Justin Erenkrantz and Greg Stein
+  (To contact them, use Serf Development Mailing List in
+  http://groups.google.com/group/serf-dev .)
+
+Most of the code is:
+
+  Copyright 2002-2011 by Justin Erenkrantz and Greg Stein
+  Copyright 2005 The Apache Software Foundation or its licensors, as
+  applicable.
+
+  Licensed under the Apache License, Version 2.0 (the "License");
+  you may not use this file except in compliance with the License.
+  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+
+On Debian systems, the Apache License can be found in
+/usr/share/common-licenses/Apache-2.0.
+
+The CuTest framework (test/CuTest.c, test/CuTest.h) is:
+
+  Copyright (c) 2003 Asim Jalis
+
+  This software is provided 'as-is', without any express or implied
+  warranty. In no event will the authors be held liable for any
+  damages arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any
+  purpose, including commercial applications, and to alter it and
+  redistribute it freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you
+  must not claim that you wrote the original software. If you use
+  this software in a product, an acknowledgment in the product
+  documentation would be appreciated but is not required.
+
+  2. Altered source versions must be plainly marked as such, and
+  must not be misrepresented as being the original software.
+
+  3. This notice may not be removed or altered from any source
+  distribution.
--- serf-1.3.6.orig/debian/control
+++ serf-1.3.6/debian/control
@@ -0,0 +1,50 @@
+Source: serf
+Section: libs
+Priority: optional
+Maintainer: Peter Samuelson <peter@p12n.org>
+Uploaders: James McCoy <jamessan@debian.org>
+Build-Depends: dpkg-dev (>= 1.16.0~), debhelper, scons (>= 2.3.0),
+    quilt, libapr1-dev, libaprutil1-dev, chrpath, libkrb5-dev
+Standards-Version: 3.9.5
+Homepage: http://code.google.com/p/serf/
+
+Package: libserf-1-1
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Pre-Depends: multiarch-support
+Multi-Arch: same
+Description: high-performance asynchronous HTTP client library
+ serf library is a C-based HTTP client library built upon the Apache
+ Portable Runtime (APR) library.  It multiplexes connections, running the
+ read/write communication asynchronously.  Memory copies and
+ transformations are kept to a minimum to provide high performance
+ operation.
+
+Package: libserf-dev
+Section: libdevel
+Architecture: any
+Depends: libserf-1-1 (= ${binary:Version}), ${misc:Depends}, libapr1-dev, libaprutil1-dev
+Description: high-performance asynchronous HTTP client library headers
+ serf library is a C-based HTTP client library built upon the Apache
+ Portable Runtime (APR) library.  It multiplexes connections, running the
+ read/write communication asynchronously.  Memory copies and
+ transformations are kept to a minimum to provide high performance
+ operation.
+ .
+ This package contains development headers for serf.
+
+Package: libserf1-dbg
+Section: debug
+Priority: extra
+Architecture: any
+Multi-Arch: same
+Depends: libserf-1-1 (= ${binary:Version}), ${misc:Depends}
+Provides: libserf-dbg
+Description: high-performance asynchronous HTTP client library debugging symbols
+ serf library is a C-based HTTP client library built upon the Apache
+ Portable Runtime (APR) library.  It multiplexes connections, running the
+ read/write communication asynchronously.  Memory copies and
+ transformations are kept to a minimum to provide high performance
+ operation.
+ .
+ This package contains the debugging symbols for serf.
--- serf-1.3.6.orig/debian/compat
+++ serf-1.3.6/debian/compat
@@ -0,0 +1 @@
+5
--- serf-1.3.6.orig/debian/libserf-dev.examples
+++ serf-1.3.6/debian/libserf-dev.examples
@@ -0,0 +1 @@
+test/serf_*.c
--- serf-1.3.6.orig/debian/changelog
+++ serf-1.3.6/debian/changelog
@@ -0,0 +1,218 @@
+serf (1.3.6-1~wheezy) wheezy; urgency=medium
+
+  * Backport to Wheezy
+
+ -- Timothy Pearson <kb9vqf@pearsoncomputing.net>  Fri, 20 Jun 2014 17:03:00 -0600
+
+serf (1.3.6-1) unstable; urgency=medium
+
+  * New upstream release
+
+ -- James McCoy <jamessan@debian.org>  Fri, 13 Jun 2014 23:46:01 -0400
+
+serf (1.3.5-1) unstable; urgency=medium
+
+  * New upstream release
+    + Update test certificates.  Fixes FTBFS.  (Closes: #746129)
+  * debian/rules: Specify PREFIX/LIBDIR only when running “scons install”.
+    They're unnecessary for the other scons calls, but mandatory for the
+    install target, otherwise the install tries to use upstream defaults.
+  * debian/watch: Scrape https://code.google.com/p/serf/ instead of the
+    download page since the download page isn't being updated.
+
+ -- James McCoy <jamessan@debian.org>  Mon, 28 Apr 2014 20:23:40 -0400
+
+serf (1.3.4-2) unstable; urgency=medium
+
+  * Enable Kerberos/GSSAPI support (Closes: #740717)
+    + d/control: Add libkrb5-dev
+    + d/rules: Tell scons where to find GSSAPI
+  * Link with -Wl,--as-needed to avoid unnecessary dependencies
+
+ -- James McCoy <jamessan@debian.org>  Tue, 04 Mar 2014 23:06:00 -0500
+
+serf (1.3.4-1) unstable; urgency=medium
+
+  * New upstream version
+  * Bump Standards-Version to 3.9.5
+
+ -- James McCoy <jamessan@debian.org>  Sun, 09 Feb 2014 22:53:33 -0500
+
+serf (1.3.3-1) unstable; urgency=low
+
+  * Add myself to Uploaders.
+  * Change the watch file to better handle code.google.com.
+  * New upstream release.  (Closes: #716793)
+    + Refresh patches/libtool
+    + Update symbols
+  * Adapt packaging for the upstream switch to SCons.
+    + control: + scons, - autotools-dev, autoconf
+    + rules: Change configure/make calls to scons
+  * Rename libserf1 to libserf-1-1, following standard naming conventions.
+  * Enable hardening flags.
+  * Strip unnecessary RPATH from libserf.
+  * Honor DEB_BUILD_OPTIONS=parallel=X
+
+ -- James McCoy <jamessan@debian.org>  Tue, 31 Dec 2013 13:17:16 -0500
+
+serf (1.1.0-2) unstable; urgency=low
+
+  * Upload to unstable.
+  * Add another lintian override.
+  * Make libserf1-dbg M-A: same as well.
+
+ -- Peter Samuelson <peter@p12n.org>  Sat, 09 Jun 2012 14:26:56 -0500
+
+serf (1.1.0-1) experimental; urgency=low
+
+  * New upstream version.
+  * Policy 3.9.3 (no changes).
+
+ -- Peter Samuelson <peter@p12n.org>  Fri, 08 Jun 2012 00:18:56 -0500
+
+serf (1.0.1-1) experimental; urgency=low
+
+  * New upstream release.
+    - patches/bind_address_family: Delete, applied upstream.
+  * Delete obsolete lintian override (workaround for an old lintian).
+
+ -- Peter Samuelson <peter@p12n.org>  Sat, 25 Feb 2012 14:43:53 -0600
+
+serf (1.0.0-2) experimental; urgency=low
+
+  * patches/bind_address_family: New patch from Anders Kaseorg to replace
+    patches/ip6-localhost.  We'll see if it addresses #632573.
+  * Policy 3.9.2 (no changes).
+
+ -- Peter Samuelson <peter@p12n.org>  Wed, 17 Aug 2011 17:12:21 -0500
+
+serf (1.0.0-1) experimental; urgency=low
+
+  * New upstream release.
+    - patches/out-of-tree, patches/kqueue: Remove, accepted upstream.
+    - Now ships pkgconfig file serf-1.pc.
+
+ -- Peter Samuelson <peter@p12n.org>  Fri, 15 Jul 2011 17:49:29 -0500
+
+serf (1.0.0~0+svn1514-1) experimental; urgency=low
+
+  * New upstream snapshot.
+    - patches/abi-0.x: Remove as obsolete.
+    - patches/kqueue: Forward-port.
+    - Bump ABI: libserf0.7{,-dbg} -> libserf1{,-dbg}
+    - patches/ip6-localhost: New patch: temporary (I hope) workaround for
+      IPv4 / IPv6 confusion in testsuite.
+  * Implement Multi-Arch: same.
+  * libserf-dev Conflicts: libserf-0-0-dev, not Breaks.  Thanks, lintian.
+
+ -- Peter Samuelson <peter@p12n.org>  Mon, 27 Jun 2011 18:09:28 -0500
+
+serf (0.7.2-1) experimental; urgency=low
+
+  * New upstream release.
+    - patches/no-export-vars: delete, now upstream.
+  * New ABI:
+    - patches/abi-0.x: New patch to change upstream SONAME.
+    - Rename libserf-0-0 to libserf0.7.
+    - Rename libserf-0-0-dev to libserf-dev while we're at it.
+  * Policy 3.9.1: one instance of s/Conflicts/Breaks/.
+  * "Upgrade" to source format 1.0.
+  * Add some Depends: ${misc:Depends}; thanks, Lintian.
+
+ -- Peter Samuelson <peter@p12n.org>  Fri, 03 Jun 2011 03:18:07 -0500
+
+serf (0.3.1-1) unstable; urgency=low
+
+  * New upstream release.
+    - patches/libtool: update.
+
+ -- Peter Samuelson <peter@p12n.org>  Sun, 14 Feb 2010 23:04:17 -0600
+
+serf (0.3.0-2) unstable; urgency=low
+
+  * Make libserf-0-0-dev Replace older libserf-0-0.  (Closes: #557889)
+
+ -- Peter Samuelson <peter@p12n.org>  Tue, 24 Nov 2009 21:55:31 -0600
+
+serf (0.3.0-1) unstable; urgency=low
+
+  * New maintainer.  (Closes: #554068)  Ack my NMUs.
+  * Repackage, without cdbs.
+  * Install headers to /usr/include/serf-0 (upstream default), not /usr/include.
+  * Do not ship .la file; pretty sure nobody needs it anymore.
+  * patches/out-of-tree: New patch, for building outside the source tree.
+  * Fix Section of libserf-0-0-dbg to 'debug'.  Thanks, Lintian.
+
+ -- Peter Samuelson <peter@p12n.org>  Mon, 23 Nov 2009 03:25:24 -0600
+
+serf (0.3.0-0.3) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * patches/kqueue: New patch: fix FTBFS due to testsuite bug on BSD kernels.
+    Thanks Aurelien Jarno.  (Closes: #542063)
+
+ -- Peter Samuelson <peter@p12n.org>  Thu, 20 Aug 2009 08:36:44 -0500
+
+serf (0.3.0-0.2) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Add symbols file.
+  * patches/no-export-vars: New patch: do not export variables outside the
+    serf_ namespace.
+
+ -- Peter Samuelson <peter@p12n.org>  Sat, 04 Jul 2009 12:16:46 -0500
+
+serf (0.3.0-0.1) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * New upstream version.  (Closes: #520546)
+    - Deleted patches/work-around-an-error-of-libtool.diff, no longer needed.
+
+ -- Peter Samuelson <peter@p12n.org>  Tue, 23 Jun 2009 18:03:44 -0500
+
+serf (0.2.0-1) unstable; urgency=medium
+
+  * New upstream version (Closes: #485025):
+    - debian/copyright: Document that CuTest files are licensed under the
+      zlib/libpng license.
+    - debian/patches/*.diff: Refresh.
+  * Update Standards-Version to 3.8.0.
+    - debian/control: Make binNMU-safe by using ${binary:Version} instead of
+      ${Source-Version}.
+    - debian/control: Add new Homepage field.
+    - debian/copyright: Delete copy of /usr/share/common-licenses/Apache-2.0.
+    - debian/README.source: New file explaining quilt.
+  * Update the debhelper compatibility level to 7.
+    - debian/libserf-0-0-dev.install, debian/libserf-0-0.install:
+      Do not begin with debian/tmp since it is assumed to be the source path.
+  * debian/control: Add new Vcs-Git, and Vcs-Browser fields.
+  * Install test programs as example ones for libserf-0-0-dev.
+
+ -- Noritada Kobayashi <nori1@dolphin.c.u-tokyo.ac.jp>  Sun, 22 Jun 2008 11:14:06 +0900
+
+serf (0.1.2-1) unstable; urgency=low
+
+  * New upstream version.
+
+ -- Noritada Kobayashi <nori1@dolphin.c.u-tokyo.ac.jp>  Tue, 19 Jun 2007 21:31:52 +0900
+
+serf (0.1.1-1) unstable; urgency=low
+
+  * New upstream version.
+    - Delete patches that are applied in the upstream:
+      r1091-remove-trailing-garbage.diff, r1092-implement-distclean.diff, and
+      r1094-add-readme.diff.
+
+ -- Noritada Kobayashi <nori1@dolphin.c.u-tokyo.ac.jp>  Mon, 28 May 2007 20:45:20 +0900
+
+serf (0.1.0-2) unstable; urgency=low
+
+  * Add a new libserf-0-0-dbg package for debugging.
+
+ -- Noritada Kobayashi <nori1@dolphin.c.u-tokyo.ac.jp>  Wed, 21 Feb 2007 03:27:51 +0900
+
+serf (0.1.0-1) unstable; urgency=low
+
+  * Initial release. (Closes: #403704)
+
+ -- Noritada Kobayashi <nori1@dolphin.c.u-tokyo.ac.jp>  Tue, 26 Dec 2006 12:58:46 +0900
--- serf-1.3.6.orig/debian/README.source
+++ serf-1.3.6/debian/README.source
@@ -0,0 +1,4 @@
+This Debian package uses quilt(1) for patch management.
+Please see /usr/share/doc/quilt/README.source for more information.
+
+ -- Noritada Kobayashi <nori1@dolphin.c.u-tokyo.ac.jp>  Mon, 23 Jun 2008 22:26:17 +0900
--- serf-1.3.6.orig/debian/libserf-1-1.lintian-overrides
+++ serf-1.3.6/debian/libserf-1-1.lintian-overrides
@@ -0,0 +1,2 @@
+# This one is intentional
+symbols-declares-dependency-on-other-package libserf-private
--- serf-1.3.6.orig/debian/watch
+++ serf-1.3.6/debian/watch
@@ -0,0 +1,2 @@
+version=3
+https://code.google.com/p/serf/ https?://serf.googlecode.com/svn/src_releases/serf-(.*).tar.bz2
--- serf-1.3.6.orig/debian/rules
+++ serf-1.3.6/debian/rules
@@ -0,0 +1,89 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+
+#export DH_VERBOSE=1
+
+DEB_LDFLAGS_MAINT_APPEND=-Wl,-z,defs -Wl,--as-needed
+include /usr/share/dpkg/buildflags.mk
+include /usr/share/quilt/quilt.make
+
+DEB_HOST_MULTIARCH  ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+
+libdir := /usr/lib/$(DEB_HOST_MULTIARCH)
+includedir := /usr/include
+libpkg := libserf-1-1
+
+parallel :=
+ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+    NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
+    parallel := -j $(NUMJOBS)
+endif
+
+build: build-arch build-indep
+build-indep:
+build-arch: debian/stamp-build
+debian/stamp-build: patch
+	dh_testdir
+
+	scons $(parallel) GSSAPI=/usr CFLAGS="$(CFLAGS)" CPPFLAGS="$(CPPFLAGS)" LINKFLAGS="$(LDFLAGS)"
+ifeq (, $(filter nocheck,$(DEB_BUILD_OPTIONS)))
+	scons check
+endif
+
+	touch $@
+
+clean: unpatch
+	dh_testdir
+
+	scons -c
+	rm -f debian/stamp-* .saved_config .sconsign.dblite config.log
+
+	dh_clean
+
+install: debian/stamp-build
+	dh_testdir
+	dh_testroot
+	dh_clean -k
+
+	scons install PREFIX=$(CURDIR)/debian/tmp/usr LIBDIR=$(CURDIR)/debian/tmp$(libdir)
+	chrpath -d $(CURDIR)/debian/tmp/$(libdir)/*.so.*
+
+binary-indep: build install
+
+binary-arch: build install
+	dh_testdir
+	dh_testroot
+	dh_installchangelogs -s CHANGES
+	dh_installdocs -s NOTICE
+	dh_installexamples -s
+	dh_installman -s
+	install -d debian/$(libpkg)/$(libdir) debian/libserf-dev/$(libdir)
+	install -d debian/libserf-dev/$(includedir)
+	mv debian/tmp/$(libdir)/*.so.* debian/$(libpkg)/$(libdir)/
+	mv debian/tmp/$(libdir)/*.so debian/libserf-dev/$(libdir)/
+	mv debian/tmp/$(libdir)/*.a debian/libserf-dev/$(libdir)/
+	mv debian/tmp/$(libdir)/pkgconfig debian/libserf-dev/$(libdir)/
+	mv debian/tmp/$(includedir)/* debian/libserf-dev/$(includedir)/
+	for p in $$(dh_listpackages -s -N$(libpkg)); do \
+		doc0=debian/$$p/usr/share/doc/$(libpkg); \
+		doc=debian/$$p/usr/share/doc/$$p; \
+		rm -f $$doc/changelog* $$doc/copyright; \
+		mv $$doc $$doc0; \
+		rmdir --ignore-fail-on-non-empty $$doc0; \
+		ln -s $(libpkg) $$doc; \
+	done;
+	dh_link -s
+	dh_strip -s --dbg-package=libserf1-dbg
+	dh_compress -s
+	dh_fixperms -s
+	dh_makeshlibs -s
+	dh_installdeb -s
+	dh_shlibdeps -s
+	sed -i 's:libserf-private\(, *\)\?::' debian/*.substvars
+	dh_lintian -s || true
+	dh_gencontrol -s
+	dh_md5sums -s
+	dh_builddeb -s
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install 
--- serf-1.3.6.orig/debian/libserf-dev.docs
+++ serf-1.3.6/debian/libserf-dev.docs
@@ -0,0 +1,2 @@
+README
+design-guide.txt
--- serf-1.3.6.orig/debian/patches/series
+++ serf-1.3.6/debian/patches/series
@@ -0,0 +1 @@
+libtool
--- serf-1.3.6.orig/debian/patches/libtool
+++ serf-1.3.6/debian/patches/libtool
@@ -0,0 +1,13 @@
+--- a/SConstruct
++++ b/SConstruct
+@@ -345,8 +345,8 @@ else:
+   ### there is probably a better way to run/capture output.
+   ### env.ParseConfig() may be handy for getting this stuff into the build
+   if CALLOUT_OKAY:
+-    apr_libs = os.popen(env.subst('$APR --link-libtool --libs')).read().strip()
+-    apu_libs = os.popen(env.subst('$APU --link-libtool --libs')).read().strip()
++    apr_libs = os.popen(env.subst('$APR --link-ld')).read().strip()
++    apu_libs = os.popen(env.subst('$APU --link-ld')).read().strip()
+   else:
+     apr_libs = ''
+     apu_libs = ''
--- serf-1.3.6.orig/debian/source/lintian-overrides
+++ serf-1.3.6/debian/source/lintian-overrides
@@ -0,0 +1,3 @@
+# Versioned build-dep older than oldstable would be rather silly
+package-lacks-versioned-build-depends-on-debhelper
+debhelper-script-needs-versioned-build-depends
--- serf-1.3.6.orig/debian/source/format
+++ serf-1.3.6/debian/source/format
@@ -0,0 +1 @@
+1.0