File debian.rules of Package kontocheck

#!/usr/bin/make -f

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1

# This is the debhelper compatibility version to use.
export DH_COMPAT=4

CFLAGS = -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
CFLAGS += -O0
else
CFLAGS += -O2
endif

build: build-stamp
build-stamp:
	dh_testdir

	# Add here commands to compile the package.
	if [ ! -f /usr/src/packages/SOURCES/konto_check-6.02.zip ]; then exit -1; fi
	( unzip /usr/src/packages/SOURCES/konto_check-6.02.zip; cd konto_check-6.02; unzip php.zip; cd php; phpize; ./configure --enable-beschreibung --enable-symbolic_retvals; make; rm -Rf /tmp/buildroot; mkdir /tmp/buildroot; extension_dir=`php -i | grep extension_dir | awk -F " => " '{print $$3}'`; mkdir -p /tmp/buildroot/$$extension_dir/; cp modules/konto_check.so /tmp/buildroot/$$extension_dir; mkdir -p /tmp/buildroot/etc/php5/apache2/conf.d; cp konto_check.ini /tmp/buildroot/etc/php5/apache2/conf.d; mkdir -p /tmp/buildroot/var/www/konto_check; cp  /usr/src/packages/SOURCES/konto_check_frontend.php  /tmp/buildroot/var/www/konto_check/index.php; cp /usr/src/packages/SOURCES/blz.lut2f /tmp/buildroot/etc/blz.lut )
	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp
	dh_clean

install: build
	dh_testdir
	dh_testroot
	dh_clean -k
	dh_installdirs

	# Add here commands to install the package into debian/gentoo.
	mkdir -p $(CURDIR)/debian/kontocheck
	cp -R /tmp/buildroot/* $(CURDIR)/debian/kontocheck/

# 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_installdebconf
	dh_installdocs
	dh_installexamples
	dh_installmenu
#	dh_installlogrotate
#	dh_installemacsen
#	dh_installpam
#	dh_installmime
#	dh_installinit
	dh_installcron
	dh_installman
	dh_installinfo
#	dh_undocumented
	dh_installchangelogs
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
#	dh_makeshlibs
	dh_installdeb
#	dh_perl
#	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install