  	dh_testdir
  
  	-mv sope-core/NGStreams/config.guess sope-core/NGStreams/config.guess.upstream
-@@ -71,14 +73,14 @@
+@@ -71,14 +74,14 @@
  	CFLAGS="$(CFLAGS)" . $(GNUSTEP_SETUP); \
  		$(MAKE) $(MAKE_FLAGS) all
  

+unpatch:
+	if test -f patch-stamp; \
+	then \
+	    for patch in $(PATCHES); \
+	    do \
+	      patch -p0 -R < debian/patches/$$patch; \
+	      rm -f debian/patches/$$patch.stamp; \
+	    done; \
+	fi
+	rm -f patch-stamp
+
 binary: binary-indep binary-arch
 .PHONY: build clean binary-indep binary-arch binary install configure

+ 	    hasConnectionHeader = YES;
+ 	}
+ 	
--- sope-4.9.r1660.orig/debian/patches/debian-build-mysql.diff
+++ sope-4.9.r1660/debian/patches/debian-build-mysql.diff
@@ -0,0 +1,13 @@
+diff -durpN sope-4.9.r1660.orig/configure sope-4.9.r1660/configure
+--- configure.orig	2009-10-28 09:46:53.000000000 -0400
++++ configure	2009-10-28 09:48:41.000000000 -0400
+@@ -475,8 +475,8 @@ checkDependencies() {
+     checkLinking "ssl"         required; # TODO: make optional
+   fi
+   checkLinking "pq"          optional;
+-  checkLinking "sqlite3"     optional;
+   checkLinking "mysqlclient" optional;
++  checkLinking "sqlite3"     optional;
+ }
+ 
+ runIt() {
