Comment 9 for bug 397721

On Sun, Aug 2, 2009 at 4:19 AM, Stas Sușcov<email address hidden> wrote:
> The package fails to build cause there are patches which require
> `./buildconf --force` thus modifying the upstream `./configure` and
> `main/php_config.h.in` files which needs patching by php-fpm.

You can modify the rules file from:

 unprepared:
     dh_testdir
     sed -i -e 's/EXTRA_VERSION="-$(PHP5_DEBIAN_REVISION)"/EXTRA_VERSION=""/'
configure.in
    rm -f configure aclocal.m4 config.sub config.guess
    rm -f main/php_config.h.in
    rm -f configure aclocal.m4 config.sub config.guess
    rm -f main/php_config.h.in

to:

 unprepared:
     dh_testdir
     sed -i -e 's/EXTRA_VERSION="-$(PHP5_DEBIAN_REVISION)"/EXTRA_VERSION=""/'
configure.in
    rm -f configure aclocal.m4 config.sub config.guess
    rm -f main/php_config.h.in
    rm -f aclocal.m4 config.sub config.guess
    rm -f prepared-stamp

and that prevents the './configure' and 'main/php_config.in' files
from being deleted. Patching then proceeds okay. Im not sure yet if
there's any harm in keeping these files, but when I do the next patch
file I shall report the result.

These suggestion can be browsed online at github:
http://github.com/dreamcat4/php5-fpm-ubuntu/commits/php5_5.2.6.dfsg.1-3ubuntu4.1/