--- php5-eaccelerator-0.9.5.3.orig/debian/compat
+++ php5-eaccelerator-0.9.5.3/debian/compat
@@ -0,0 +1 @@
+5
--- php5-eaccelerator-0.9.5.3.orig/debian/changelog
+++ php5-eaccelerator-0.9.5.3/debian/changelog
@@ -0,0 +1,105 @@
+php5-eaccelerator (0.9.5.3-0+lenny1) unstable; urgency=low
+
+  * Rebuild against current PHP.
+
+ -- root <root@hoppy.mcmillan.net.nz>  Tue, 21 Oct 2008 12:50:37 +1300
+
+php5-eaccelerator (0.9.5.3-0+lenny0) unstable; urgency=low
+
+  * Rebuild against current PHP
+
+ -- root <root@hoppy.mcmillan.net.nz>  Fri, 29 Aug 2008 12:19:38 +1200
+
+php5-eaccelerator (0.9.5.3-0) unstable; urgency=low
+
+  * New upstream version.
+
+ -- root <debian@mcmillan.net.nz>  Sun, 24 Aug 2008 13:01:20 +1200
+
+php5-eaccelerator (0.9.5.2-0+etch10) unstable; urgency=low
+
+  * Rebuild against current PHP.
+
+ -- Andrew McMillan <debian@mcmillan.net.nz>  Sat, 26 Jan 2008 17:16:54 +1300
+
+php5-eaccelerator (0.9.5.2-0+etch9) unstable; urgency=low
+
+  * New upstream version.
+  * Build against current etch php5
+
+ -- Andrew McMillan <debian@mcmillan.net.nz>  Sun,  6 Jan 2008 12:02:56 +1300
+
+php5-eaccelerator (0.9.5.1-2+etch7) unstable; urgency=low
+
+  * Build against new PHP5 release.
+
+ -- root <root@hoppy.mcmillan.net.nz>  Sun, 15 Jul 2007 19:18:19 +1200
+
+php5-eaccelerator (0.9.5.1-2+etch4) unstable; urgency=low
+
+  * Make that Depends on php5-common for people who don't use Apache.
+
+ -- root <root@hoppy.mcmillan.net.nz>  Tue, 22 May 2007 08:52:03 +1200
+
+php5-eaccelerator (0.9.5.1-1+etch4) unstable; urgency=low
+
+  * Actually get the dependency on the right package.
+
+ -- root <root@hoppy.mcmillan.net.nz>  Mon, 21 May 2007 23:34:39 +1200
+
+php5-eaccelerator (0.9.5.1-0+etch4) unstable; urgency=low
+
+  * New PHP security release
+  * Add dependency on exact libapache2-mod-php5 version.
+
+ -- root <root@hoppy.mcmillan.net.nz>  Mon, 21 May 2007 22:56:56 +1200
+
+php5-eaccelerator (0.9.5.1-0) unstable; urgency=low
+
+  * New upstream.
+
+ -- Andrew McMillan <andrew@hoppy.mcmillan.net.nz>  Mon,  7 May 2007 12:32:48 +1200
+
+php5-eaccelerator (0.9.5-4) unstable; urgency=low
+
+  * Rebuild against current Etch PHP5 binaries.
+  * Ensure directory /var/cache/eaccelerator is created with reasonable
+    ownerships and permissions.
+  * Add cron.daily job to clean out cache directory
+  * Include configuration file fragment.
+
+ -- root <root@hoppy.mcmillan.net.nz>  Sun,  6 May 2007 21:59:07 +1200
+
+php5-eaccelerator (0.9.5-3) unstable; urgency=low
+
+  * Applied patch from ticket 231 to work with PHP 5.2
+  * Added build-depends on php5-dev
+
+ -- Andrew McMillan <debian@mcmillan.net.nz>  Tue, 10 Apr 2007 07:57:44 +1200
+
+php5-eaccelerator (0.9.5-2) unstable; urgency=low
+
+  * Added configure option --with-eaccelerator-content-caching
+  * Added configure option --with-eaccelerator-sessions 
+    
+ -- Andrew Hutchings <andrew@linuxjedi.co.uk>  Thu, 29 Mar 2007 08:34:30 +0100
+
+php5-eaccelerator (0.9.5-1) unstable; urgency=low
+
+  * Added configure option --with-eaccelerator-shared-memory (thanks Allan)
+
+ -- Andrew Hutchings <andrew@linuxjedi.co.uk>  Thu, 29 Mar 2007 08:24:30 +0100
+
+php5-eaccelerator (0.9.5) unstable; urgency=low
+
+  * Modified for eaccelerator 0.9.5 and Ubuntu Edgy
+ 
+ -- Andrew Hutchings <andrew@linuxjedi.co.uk>  Sat, 02 Dec 2006 07:22:45 +0000
+
+eaccelerator (0.9.5-rc1-1) unstable; urgency=low
+
+  * Initial debianisation
+
+ -- Andrew McMillan <debian@mcmillan.net.nz>  Wed, 16 Aug 2006 22:29:47 +1200
+
+
--- php5-eaccelerator-0.9.5.3.orig/debian/docs
+++ php5-eaccelerator-0.9.5.3/debian/docs
@@ -0,0 +1,4 @@
+NEWS
+README
+README.eLoader
+README.win32
--- php5-eaccelerator-0.9.5.3.orig/debian/rules
+++ php5-eaccelerator-0.9.5.3/debian/rules
@@ -0,0 +1,123 @@
+#!/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
+
+export PHP_PREFIX="/usr"
+
+package=php5-eaccelerator
+
+
+CFLAGS = -Wall -g
+
+ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+	CFLAGS += -O0
+else
+	CFLAGS += -O2
+endif
+
+# shared library versions, option 1
+version=2.0.5
+major=2
+# option 2, assuming the library is created as src/.libs/libfoo.so.2.0.5 or so
+#version=`ls src/.libs/lib*.so.* | \
+# awk '{if (match($$0,/[0-9]+\.[0-9]+\.[0-9]+$$/)) print substr($$0,RSTART)}'`
+#major=`ls src/.libs/lib*.so.* | \
+# awk '{if (match($$0,/\.so\.[0-9]+$$/)) print substr($$0,RSTART+4)}'`
+
+configure: configure-stamp
+configure-stamp:
+	dh_testdir
+	# Add here commands to configure the package.
+
+	phpize
+	./configure \
+	--host=$(DEB_HOST_GNU_TYPE) --build=$(DEB_BUILD_GNU_TYPE) --prefix=/usr \
+	--with-eaccelerator-content-caching \
+	--with-eaccelerator-sessions \
+	--with-eaccelerator-shared-memory \
+	--enable-eaccelerator=shared \
+	--with-php-config=$(PHP_PREFIX)/bin/php-config5
+	# CFLAGS="$(CFLAGS)" LDFLAGS="-Wl,-z,defs"
+
+	touch configure-stamp
+
+
+build: build-stamp
+build-stamp: configure-stamp 
+	dh_testdir
+
+	# Add here commands to compile the package.
+	$(MAKE)
+
+	touch $@
+
+clean:
+	dh_testdir
+	dh_testroot
+	rm -f build-stamp configure-stamp
+
+	# Add here commands to clean up after the build process.
+	-$(MAKE) clean
+
+	phpize --clean
+
+	dh_clean 
+
+install: build
+	dh_testdir
+	dh_testroot
+	dh_clean -k 
+	dh_installdirs
+
+	# Add here commands to install the package into debian/tmp
+	$(MAKE) INSTALL_ROOT=$(CURDIR)/debian/$(package) install
+
+	cp debian/eaccelerator.ini $(CURDIR)/debian/$(package)/etc/php5/conf.d/
+
+
+# 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 ChangeLog
+	dh_installdocs
+	dh_installexamples
+#	dh_install
+#	dh_installmenu
+	dh_installdebconf	
+#	dh_installlogrotate
+#	dh_installemacsen
+#	dh_installpam
+#	dh_installmime
+#	dh_installinit
+	dh_installcron
+#	dh_installinfo
+#	dh_installman
+	dh_link
+	dh_strip
+	dh_compress
+	dh_fixperms
+	chmod 2770 $(CURDIR)/debian/$(package)/var/cache/eaccelerator
+	chown www-data:www-data $(CURDIR)/debian/$(package)/var/cache/eaccelerator
+#	dh_perl
+#	dh_python
+#	dh_makeshlibs
+	dh_installdeb
+	dh_shlibdeps
+	dh_gencontrol -- "-Vmisc:Depends=php5-common (= `dpkg -s php5-dev | grep '^Version: ' | cut -f2 -d' '`)"
+	dh_md5sums
+	dh_builddeb
+
+binary: binary-indep binary-arch
+.PHONY: build clean binary-indep binary-arch binary install configure
--- php5-eaccelerator-0.9.5.3.orig/debian/copyright
+++ php5-eaccelerator-0.9.5.3/debian/copyright
@@ -0,0 +1,34 @@
+This package was debianized by Andrew Hutchings <andrew@linuxjedi.co.uk> on
+Dat, 2 Dec 2006 07:28:43 +0000.
+
+It was downloaded from http://www.linuxjedi.co.uk/
+
+Upstream Author: Andrew Hutchings
+
+Copyright: 2006 Andrew Hutchings & The eAccelerator Project
+
+License:
+
+   This package 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 package 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 package; if not, write to the Free Software
+   Foundation, Inc., 51 Franklin St, 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'.
+
+The Debian packaging is (C) 2006, root <debian@mcmillan.net.nz> and
+is licensed under the GPL, see above.
+
+
+# Please also look if there are files or directories which have a
+# different copyright/license attached and list them here.
--- php5-eaccelerator-0.9.5.3.orig/debian/dirs
+++ php5-eaccelerator-0.9.5.3/debian/dirs
@@ -0,0 +1,4 @@
+usr/bin
+usr/sbin
+var/cache/eaccelerator
+etc/php5/conf.d
--- php5-eaccelerator-0.9.5.3.orig/debian/README.Debian
+++ php5-eaccelerator-0.9.5.3/debian/README.Debian
@@ -0,0 +1,6 @@
+eaccelerator for Ubuntu Edgy
+----------------------------
+
+This package modifies the php.ini files to load the eaccelerator module.  This isn't the cleanest method of doing things but it seems the way things are done in Ubuntu.
+
+Andrew Hutchings <andrew@linuxjedi.co.uk>, Sat, 02 Dec 2006 07:20:38 +0000
--- php5-eaccelerator-0.9.5.3.orig/debian/eaccelerator.templates
+++ php5-eaccelerator-0.9.5.3/debian/eaccelerator.templates
@@ -0,0 +1,16 @@
+Template: php5/add_extension
+Type: boolean
+Default: true
+Description: Should ${extname} be added to /etc/php5/${sapiconfig}/php.ini?
+ You are installing ${extname} support for php5, and it is not yet
+ enabled in the configuration for the ${sapiconfig} SAPI.  Do you want
+ this extension to be enabled now?
+
+Template: php5/remove_extension
+Type: boolean
+Default: true
+Description: Should ${extname} be removed from /etc/php5/${sapiconfig}/php.ini?
+ You are removing ${extname} support for php5, but it is still enabled
+ in the configuration for the ${sapiconfig} SAPI.  Leaving this in place
+ will probably cause problems when trying to use PHP.
+
--- php5-eaccelerator-0.9.5.3.orig/debian/eaccelerator.ini
+++ php5-eaccelerator-0.9.5.3/debian/eaccelerator.ini
@@ -0,0 +1,17 @@
+
+[eaccelerator]
+eaccelerator.shm_size="32"
+eaccelerator.cache_dir="/var/cache/eaccelerator"
+eaccelerator.enable="1"
+eaccelerator.optimizer="1"
+eaccelerator.check_mtime="1"
+eaccelerator.debug="0"
+eaccelerator.filter=""
+eaccelerator.shm_max="0"
+eaccelerator.shm_ttl="0"
+eaccelerator.shm_prune_period="0"
+eaccelerator.shm_only="0"
+eaccelerator.compress="1"
+eaccelerator.compress_level="9"  
+
+# extension=eaccelerator.so
--- php5-eaccelerator-0.9.5.3.orig/debian/eaccelerator.prerm
+++ php5-eaccelerator-0.9.5.3/debian/eaccelerator.prerm
@@ -0,0 +1,46 @@
+#!/bin/sh
+
+set -e
+
+[ -n "$DEBUG" ] && set -o xtrace
+
+
+EXTLIB=eaccelerator
+PHPVER=php5
+
+if [ "$1" != "remove" -a "$1" != "purge" ]; then
+	exit 0
+fi
+
+EXTENSIONRE="^[[:space:]]*extension[[:space:]]*=[[:space:]]*${EXTLIB}\.so"
+
+. /usr/share/debconf/confmodule
+
+for SAPI in `find /etc/${PHPVER}/ -type d -maxdepth 1 -mindepth 1 | sed -e's#.*/##'`
+do
+	# Use the same question for all extensions, because it's only
+	# used once per package: right here.
+	if [ -f "/etc/${PHPVER}/$SAPI/php.ini" ] \
+	   && grep -q "$EXTENSIONRE" /etc/${PHPVER}/$SAPI/php.ini
+	then
+		db_set ${PHPVER}/remove_extension true
+		db_title "PHP"
+		db_subst ${PHPVER}/remove_extension extname PostgreSQL
+		db_subst ${PHPVER}/remove_extension sapiconfig $SAPI
+		db_input low ${PHPVER}/remove_extension || true
+		db_go
+
+		db_get ${PHPVER}/remove_extension
+		if [ "$RET" = "true" ]; then
+			grep -v "$EXTENSIONRE" < /etc/${PHPVER}/$SAPI/php.ini \
+				> /etc/${PHPVER}/$SAPI/php.ini.${EXTLIB}remove
+			chmod --reference=/etc/${PHPVER}/$SAPI/php.ini \
+				/etc/${PHPVER}/$SAPI/php.ini.${EXTLIB}remove
+			mv /etc/${PHPVER}/$SAPI/php.ini.${EXTLIB}remove \
+				/etc/${PHPVER}/$SAPI/php.ini
+		fi
+		db_fset ${PHPVER}/remove_extension seen false
+	fi
+done
+
+exit 0
--- php5-eaccelerator-0.9.5.3.orig/debian/substvars
+++ php5-eaccelerator-0.9.5.3/debian/substvars
@@ -0,0 +1,2 @@
+shlibs:Depends=libc6 (>= 2.3.6-6)
+misc:Depends=php5-dev (= 5.2.0-8+etch4)
--- php5-eaccelerator-0.9.5.3.orig/debian/control
+++ php5-eaccelerator-0.9.5.3/debian/control
@@ -0,0 +1,14 @@
+Source: php5-eaccelerator
+Priority: optional
+Maintainer: Andrew McMillan <debian@mcmillan.net.nz>
+Build-Depends: debhelper (>= 5), php5-dev
+Standards-Version: 3.7.2
+Section: libs
+
+Package: php5-eaccelerator
+Section: web
+Architecture: any
+Depends: ${shlibs:Depends}, ${misc:Depends}
+Description: eAccelerator PHP cache
+ eAccelerator PHP Cache to speed up PHP code by holding
+ a copy of the compiled code in memory.
--- php5-eaccelerator-0.9.5.3.orig/debian/eaccelerator.config
+++ php5-eaccelerator-0.9.5.3/debian/eaccelerator.config
@@ -0,0 +1,36 @@
+#!/bin/sh -e
+
+# Source debconf library.
+. /usr/share/debconf/confmodule
+
+[ -n "$DEBUG" ] && set -o xtrace
+
+EXTLIB=eaccelerator
+PHPVER=php5
+
+db_title "PHP"
+
+for SAPI in apache apache2 cgi cli
+do
+	# Skip this loop if the config file isn't there (yet).
+	if [ -f "/etc/${PHPVER}/$SAPI/php.ini" ]; then
+		db_register ${PHPVER}/add_extension ${PHPVER}/extension_${EXTLIB}_$SAPI
+
+		# FIXME: this is the wrong answer if the SAPI package was
+		# installed after the module was.
+		if [ -n "$2" ] ; then
+			if grep -q "^[[:space:]]*extension[[:space:]]*=[[:space:]]*${EXTLIB}\.so" "/etc/${PHPVER}/$SAPI/php.ini"
+			then
+				db_set ${PHPVER}/extension_${EXTLIB}_$SAPI true
+			else
+				db_set ${PHPVER}/extension_${EXTLIB}_$SAPI false
+			fi
+		fi
+
+		db_subst ${PHPVER}/extension_${EXTLIB}_$SAPI extname eAccelerator
+		db_subst ${PHPVER}/extension_${EXTLIB}_$SAPI sapiconfig $SAPI
+		db_input low ${PHPVER}/extension_${EXTLIB}_$SAPI || true
+	fi
+done
+
+db_go
--- php5-eaccelerator-0.9.5.3.orig/debian/eaccelerator.postinst
+++ php5-eaccelerator-0.9.5.3/debian/eaccelerator.postinst
@@ -0,0 +1,67 @@
+#!/bin/sh
+# postinst script for eaccelerator
+#
+
+set -e
+
+# summary of how this script can be called:
+#        * <postinst> `configure' <most-recently-configured-version>
+#        * <old-postinst> `abort-upgrade' <new version>
+#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+#          <new-version>
+#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#          <failed-install-package> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+#
+
+# Source debconf library.
+. /usr/share/debconf/confmodule
+
+[ -n "$DEBUG" ] && set -o xtrace
+
+PHPVER=php5
+EXTLIB=eaccelerator
+
+#
+# Add it into a php.ini file
+do_sapi() {
+  SAPI="$1"
+  INI="/etc/${PHPVER}/${SAPI}/php.ini"
+  if [ -f "${INI}" ]; then
+    db_get ${PHPVER}/extension_${EXTLIB}_${SAPI} || true
+    if [ "$RET" = "true" ] \
+	 && ! grep -q "^[[:space:]]*extension[[:space:]]*=[[:space:]]*${EXTLIB}\.so" "${INI}"
+    then
+      echo "extension=${EXTLIB}.so" >> "${INI}"
+    fi
+  fi
+}
+
+
+case "$1" in
+    configure)
+        for SAPI in apache apache2 cgi cli; do
+            do_sapi "${SAPI}"
+        done
+
+    ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+
+    ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+    ;;
+esac
+
+# dh_installdeb will replace this with shell code automatically
+# generated by other debhelper scripts.
+
+#DEBHELPER#
+
+exit 0
+
--- php5-eaccelerator-0.9.5.3.orig/debian/php5-eaccelerator.cron.daily
+++ php5-eaccelerator-0.9.5.3/debian/php5-eaccelerator.cron.daily
@@ -0,0 +1,11 @@
+#!/bin/sh
+#
+# /etc/cron.daily/eaccelerator purges eaccelerator cache files which
+# are older than 7 days.
+#
+
+CACHE_MAX_AGE=7
+
+[ -f /etc/default/eaccelerator ] && . /etc/default/eaccelerator
+
+find /var/cache/eaccelerator -type f -mtime +${CACHE_MAX_AGE} -print0 | xargs --no-run-if-empty --null rm --force
