--- libsmbclient-php-0.5.0.orig/debian/rules
+++ libsmbclient-php-0.5.0/debian/rules
@@ -0,0 +1,33 @@
+#!/usr/bin/make -f
+# -*- makefile -*-
+# Sample debian/rules that uses debhelper.
+# This file was originally written by Joey Hess and Craig Small.
+# As a special exception, when this file is copied by dh-make into a
+# dh-make output file, you may use that output file without restriction.
+# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+# Uncomment this to turn on verbose mode.
+export DH_VERBOSE=1
+
+SHELL=/bin/bash
+
+%:	
+	dh $@ 
+
+override_dh_auto_configure:
+	phpize
+	dh_auto_configure
+
+override_dh_auto_test:
+
+
+override_dh_auto_install:
+	mkdir -p $(CURDIR)/debian/tmp/usr/share/php5/libsmbclient
+	echo 'extension=libsmbclient.so' > $(CURDIR)/debian/tmp/usr/share/php5/libsmbclient/libsmbclient.ini
+
+	dh_auto_install -- INSTALL_ROOT=$(CURDIR)/debian/tmp
+
+override_dh_auto_clean:
+	dh_auto_clean
+	phpize --clean
+
--- libsmbclient-php-0.5.0.orig/debian/control
+++ libsmbclient-php-0.5.0/debian/control
@@ -0,0 +1,14 @@
+Source: php5-libsmbclient
+Section: devel
+Priority: optional
+Maintainer: Jürgen Weigert <jw@owncloud.com>
+Build-Depends: debhelper (>= 7), php5-dev, libsmbclient-dev
+Standards-Version: 3.9.4
+
+Package: php5-libsmbclient
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}, php5 (>= 5.3.3), libsmbclient
+Description: libsmbclient-php is a PHP extension that uses Samba's libsmbclient 
+ library to provide Samba related functions to PHP programs.
+ See also: https://github.com/eduardok/libsmbclient-php/blob/master/README.md
+
--- libsmbclient-php-0.5.0.orig/debian/changelog
+++ libsmbclient-php-0.5.0/debian/changelog
@@ -0,0 +1,29 @@
+php5-libsmbclient (0.5.0-3) stable; urgency=low
+
+  * fixed postinstall to survive not running apache
+
+ -- Juergen Weigert <jw@owncloud.com>  Mon, 24 Nov 2014 18:14:05 +0200
+
+php5-libsmbclient (0.5.0-2) stable; urgency=low
+
+  * Fixed specfile and debian files.
+  * register with php.ini, reload apache.
+
+ -- Juergen Weigert <jw@owncloud.com>  Tue, 26 Aug 2014 22:20:54 +0200
+
+php5-libsmbclient (0.5.0-1) stable; urgency=low
+
+  Release  "0.5.0", Aug 13. 2014
+  * Add lots of new functions compared to 0.4, 
+  * add lots of tests, 
+  * and expand the documentation.
+    - obsolete upstreamed adapt_suse_dirs.diff, thanks!
+
+ -- Juergen Weigert <jw@owncloud.com>  Wed, 13 Aug 2014 23:18:54 +0200
+
+-------------------------------------------------------------------
+php5-libsmbclient (0.4.0-1) stable; urgency=low
+
+  * V0.4; initial pull from https://github.com/eduardok/libsmbclient-php
+
+ -- Juergen Weigert <jw@owncloud.com>  Wed, 11 Aug 2014 15:18:54 +0200
--- libsmbclient-php-0.5.0.orig/debian/postinst
+++ libsmbclient-php-0.5.0/debian/postinst
@@ -0,0 +1,19 @@
+#!/bin/sh -e
+# postinst script for libsmbclient
+
+set -e
+
+if type php5enmod >/dev/null 2>/dev/null; then
+  ln -s /usr/share/php5/libsmbclient/libsmbclient.ini /etc/php5/mods-available/ || true
+  php5enmod libsmbclient || true
+  service apache2 reload || true
+fi
+
+if [ -d /etc/php5/conf.d/ ]; then
+  ln -s /usr/share/php5/libsmbclient/libsmbclient.ini /etc/php5/conf.d/ || true
+  service apache2 reload || true
+fi
+
+#DEBHELPER#
+
+exit 0
