1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/debian/rules Mon May 19 23:08:15 2014 +0200
1.3 @@ -0,0 +1,47 @@
1.4 +#!/usr/bin/make -f
1.5 +
1.6 +PHPAPI := $(shell php-config --phpapi)
1.7 +PYTHON_SITEARCH := $(shell python -c 'from distutils.sysconfig import get_python_lib; print get_python_lib(1)')
1.8 +
1.9 +export DH_VERBOSE=1
1.10 +export DH_OPTIONS=-v
1.11 +
1.12 +export DEB_LDFLAGS_MAINT_APPEND="-Wl,--as-needed"
1.13 +
1.14 +%:
1.15 + dh $@ --parallel --with python2
1.16 +
1.17 +override_dh_auto_configure:
1.18 + dh_auto_configure -- \
1.19 + -DLIB_INSTALL_DIR=/usr/lib \
1.20 + -DPHP_BINDINGS=ON \
1.21 + -DPHP_INSTALL_DIR=/usr/lib/php5/$(PHPAPI)/ \
1.22 + -DPHP4_EXECUTABLE=/usr/bin/php5 \
1.23 + -DPHP4_INCLUDE_PATH=/usr/include/php5/ \
1.24 + -DPYTHON_BINDINGS=ON \
1.25 + -DPYTHON_INSTALL_DIR=$(PYTHON_SITEARCH) \
1.26 + -DUSE_LIBCALENDARING=ON
1.27 +
1.28 +override_dh_gencontrol:
1.29 + echo "php:Depends=phpapi-${PHPAPI}" >> debian/php-kolab.substvars
1.30 + dh_gencontrol
1.31 +
1.32 +override_dh_install:
1.33 + # Install the PHP modules manually, because they depend on PHP the API version,
1.34 + # which has to be determined dynamically, so we can't put it into an .install file.
1.35 + mkdir -p debian/tmp/usr/share/php
1.36 + mv debian/tmp/usr/lib/php5/$(PHPAPI)/kolabcalendaring.php debian/tmp/usr/share/php/kolabcalendaring.php
1.37 + mv debian/tmp/usr/lib/php5/$(PHPAPI)/kolabicalendar.php debian/tmp/usr/share/php/kolabicalendar.php
1.38 + mv debian/tmp/usr/lib/php5/$(PHPAPI)/kolabobject.php debian/tmp/usr/share/php/kolabobject.php
1.39 + mv debian/tmp/usr/lib/php5/$(PHPAPI)/kolabshared.php debian/tmp/usr/share/php/kolabshared.php
1.40 + # Put kolab.ini into place
1.41 + mkdir -p debian/tmp/usr/share/php5/kolab
1.42 + cp debian/usr/share/php5/kolab/kolab.ini debian/tmp/usr/share/php5/kolab/
1.43 + # Install the packages
1.44 + dh_install --list-missing
1.45 +
1.46 +override_dh_auto_test:
1.47 + dh_auto_test || :
1.48 +
1.49 +override_dh_shlibdeps:
1.50 + dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info