Projects
Kolab:16:TestingLinked
libkolabxml
debian.rules
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File debian.rules of Package libkolabxml
#!/usr/bin/make -f PHPAPI := $(shell php-config --phpapi) PHPBIN := $(shell php-config --php-binary) PHPEXT := $(shell php-config --extension-dir) PHPINC := $(shell php-config --include-dir) PHP_VERSIONS=8.2 8.1 8.0 7.4 7.3 7.2 export DH_VERBOSE=1 export DH_OPTIONS=-v export DEB_LDFLAGS_MAINT_APPEND="-Wl,--as-needed" %: python3 utils/zonetabconversion.py if [ -f /usr/bin/python ] ; then \ dh $@ --parallel --with python2,python3 --buildsystem=pybuild ; \ else \ dh $@ --parallel --with python3 --buildsystem=pybuild ; \ fi override_dh_gencontrol: echo "php:Depends=phpapi-${PHPAPI}" >> debian/php-kolabformat.substvars if [ -f /etc/plesk-release ] ; then \ for version in $(PHP_VERSIONS) ; do \ if [ ! -f "/opt/plesk/php/$${version}/bin/php-config" ] ; then \ continue ; \ fi ; \ shver=$$(echo $${version} | sed -e 's/\.//g') ; \ echo "" >> debian/control ; \ echo "Package: plesk-php$${shver}-kolabformat" >> debian/control ; \ echo "Architecture: amd64" >> debian/control ; \ echo "Depends: libkolabxml1v5, plesk-php$${shver}" >> debian/control ; \ echo "Provides: php-bindings-libkolabxml" >> debian/control ; \ echo "Description: Kolab format bindings for Plesk PHP $${version}" >> debian/control ; \ echo "" >> debian/control ; \ sed -i -e "/Files:/ i\ plesk-php$${shver}-kolabformat deb web extra" debian/control ; \ echo "opt/plesk/php/$${version}/lib/php/modules/*.so" >> debian/plesk-php$${shver}-kolabformat.install ; \ echo "debian/kolabformat.ini opt/plesk/php/$${version}/etc/php.d" >> debian/plesk-php$${shver}-kolabformat.install ; \ done ; \ fi if [ -f /usr/bin/python ] ; then \ echo "" >> debian/control ; \ echo "Package: python-kolabformat" >> debian/control ; \ echo "Architecture: any" >> debian/control ; \ echo "Depends: libkolabxml1v5 (= ${binary:Version}), python, ${misc:Depends}, ${shlibs:Depends}" >> debian/control ; \ echo "Provides: php-bindings-libkolabxml" >> debian/control ; \ echo "Description: Python bindings for Kolab Format 3.0 XML parsing" >> debian/control ; \ echo "" >> debian/control ; \ fi dh_gencontrol override_dh_auto_build: # Build plesk php versions if [ -f /etc/plesk-release ] ; then \ for version in $(PHP_VERSIONS) ; do \ if [ ! -f "/opt/plesk/php/$${version}/bin/php-config" ] ; then \ continue ; \ fi ; \ if [ $$(/opt/plesk/php/$${version}/bin/php-config --vernum) -gt 70000 ]; then \ sed -r -i -e 's/-c\+\+ -php[0-9]? -o/-c++ -php7 -o/g' src/php/CMakeLists.txt ; \ else \ sed -r -i -e 's/-c\+\+ -php[0-9]? -o/-c++ -php -o/g' src/php/CMakeLists.txt ; \ fi ; \ dh_auto_build --buildsystem cmake --builddirectory php-$${version} ; \ done ; \ fi # Build php vanilla if [ $$(php-config --vernum) -gt 70000 ]; then \ sed -r -i -e 's/-c\+\+ -php[0-9]? -o/-c++ -php7 -o/g' src/php/CMakeLists.txt ; \ else \ sed -r -i -e 's/-c\+\+ -php[0-9]? -o/-c++ -php -o/g' src/php/CMakeLists.txt ; \ fi dh_auto_build --buildsystem cmake --builddirectory php-vanilla # Build python versions via pybuild dh_auto_build override_dh_auto_configure: echo 9 > debian/compat if [ -f /etc/plesk-release ] ; then \ for version in $(PHP_VERSIONS) ; do \ if [ ! -f "/opt/plesk/php/$${version}/bin/php-config" ] ; then \ continue ; \ fi ; \ if [ $$(/opt/plesk/php/$${version}/bin/php-config --vernum) -gt 70000 ]; then \ sed -r -i -e 's/-c\+\+ -php[0-9]? -o/-c++ -php7 -o/g' src/php/CMakeLists.txt ; \ else \ sed -r -i -e 's/-c\+\+ -php[0-9]? -o/-c++ -php -o/g' src/php/CMakeLists.txt ; \ fi ; \ dh_auto_configure --buildsystem cmake --builddirectory php-$${version} -- -DLIB_INSTALL_DIR=/usr/lib \ -DQT5_BUILD=ON \ -DBoost_NO_BOOST_CMAKE=ON \ -DSWIG=/usr/bin/swig \ -DPHP_BINDINGS=ON \ -DPHP_INCLUDE_DIR=$$(/opt/plesk/php/$${version}/bin/php-config --include-dir) \ -DPHP_CONFIG_EXECUTABLE=/opt/plesk/php/$${version}/bin/php-config \ -DPHP_EXECUTABLE=/opt/plesk/php/$${version}/bin/php \ -DPHP_INCLUDE_DIR=$$(/opt/plesk/php/$${version}/bin/php-config --include-dir) \ -DPHP_INSTALL_DIR=$$(/opt/plesk/php/$${version}/bin/php-config --extension-dir) ; \ done ; \ fi # Configure php vanilla if [ $$(php-config --vernum) -gt 70000 ]; then \ sed -r -i -e 's/-c\+\+ -php[0-9]? -o/-c++ -php7 -o/g' src/php/CMakeLists.txt ; \ else \ sed -r -i -e 's/-c\+\+ -php[0-9]? -o/-c++ -php -o/g' src/php/CMakeLists.txt ; \ fi grep kolabformat.i src/php/CMakeLists.txt dh_auto_configure --buildsystem cmake --builddirectory php-vanilla -- \ -DLIB_INSTALL_DIR=/usr/lib \ -DQT5_BUILD=ON \ -DBoost_NO_BOOST_CMAKE=ON \ -DPHP_BINDINGS=ON \ -DPHP_INSTALL_DIR=$(PHPEXT) \ -DPHP_EXECUTABLE=$(PHPBIN) \ -DPHP_INCLUDE_DIR=$(PHPINC) # Configure python builds via pybuild dh_auto_configure -- --configure-args \ "-DLIB_INSTALL_DIR=/usr/lib \ -DQT5_BUILD=ON \ -DBoost_NO_BOOST_CMAKE=ON \ -DPYTHON_BINDINGS=ON \ -DPYTHON_INSTALL_DIR={install_dir}" override_dh_install: # Install the PHP modules manually, because they depend on the PHP API version, # which has to be determined dynamically, so we can't put it into an .install file. mkdir -p debian/tmp/usr/share/php make -C php-vanilla install DESTDIR=$(PWD)/debian/tmp/ ; \ if [ -d "/etc/php/8.2/mods-available/" ]; then \ echo "debian/kolabformat.ini etc/php/8.2/mods-available" >> debian/php-kolabformat.install ; \ elif [ -d "/etc/php/8.1/mods-available/" ]; then \ echo "debian/kolabformat.ini etc/php/8.1/mods-available" >> debian/php-kolabformat.install ; \ elif [ -d "/etc/php/8.0/mods-available/" ]; then \ echo "debian/kolabformat.ini etc/php/8.0/mods-available" >> debian/php-kolabformat.install ; \ elif [ -d "/etc/php/7.4/mods-available/" ]; then \ echo "debian/kolabformat.ini etc/php/7.4/mods-available" >> debian/php-kolabformat.install ; \ elif [ -d "/etc/php/7.3/mods-available/" ]; then \ echo "debian/kolabformat.ini etc/php/7.3/mods-available" >> debian/php-kolabformat.install ; \ elif [ -d "/etc/php/7.2/mods-available/" ]; then \ echo "debian/kolabformat.ini etc/php/7.2/mods-available" >> debian/php-kolabformat.install ; \ else \ echo "debian/kolabformat.ini etc/php/mods-available" >> debian/php-kolabformat.install ; \ fi if [ -f /etc/plesk-release ]; then \ for version in $(PHP_VERSIONS) ; do \ if [ ! -f "/opt/plesk/php/$${version}/bin/php-config" ]; then \ continue ; \ fi ; \ if [ $$(/opt/plesk/php/$${version}/bin/php-config --vernum) -gt 70000 ]; then \ sed -r -i -e 's/-c\+\+ -php[0-9]? -o/-c++ -php7 -o/g' src/php/CMakeLists.txt ; \ else \ sed -r -i -e 's/-c\+\+ -php[0-9]? -o/-c++ -php -o/g' src/php/CMakeLists.txt ; \ fi ; \ shver=$$(echo $${version} | sed -e 's/\.//g') ; \ make -C php-$${version} install DESTDIR=$(PWD)/debian/plesk-php$${shver}-kolabformat/ ; \ mkdir -p debian/plesk-php$${shver}-kolabformat/opt/plesk/php/$${version}/etc/php.d/ ; \ mkdir -p debian/plesk-php$${shver}-kolabformat/opt/plesk/php/$${version}/share/php/ ; \ cp -a debian/kolabformat.ini debian/plesk-php$${shver}-kolabformat/opt/plesk/php/$${version}/etc/php.d/ ; \ rm -rvf debian/plesk-php$${shver}-kolabformat/usr/ ; \ find debian/plesk-php$${shver}-kolabformat/ | sort ; \ done ; \ fi dh_install --list-missing override_dh_auto_test: # Fails on ubuntu 20.04 and debian 10 because of missing qt libraries dh_auto_test || :
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.