summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO26
-rw-r--r--PKGBUILD47
-rw-r--r--kolabformat.ini1
-rw-r--r--php7.patch11
-rw-r--r--php73-kolabformat.install10
5 files changed, 95 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..3a5ab0a44f50
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,26 @@
+pkgbase = php73-kolabformat
+ pkgdesc = PHP 7.3 bindings for Kolab XML Format Schema Definitions Library
+ pkgver = 1.1.6
+ pkgrel = 4
+ url = http://www.kolab.org
+ install = php73-kolabformat.install
+ arch = i686
+ arch = x86_64
+ license = GPL
+ makedepends = cmake
+ makedepends = boost
+ makedepends = xsd
+ makedepends = qt5-base
+ makedepends = swig>=3.0.11
+ depends = libkolabxml
+ depends = php73
+ options = !strip
+ source = https://mirror.kolabenterprise.com/pub/releases/libkolabxml-1.1.6.tar.gz
+ source = php7.patch
+ source = kolabformat.ini
+ sha256sums = e48d7f5de1860a381da27981f6c70de1c9f38c4cd536bc6558b6529ce95f0677
+ sha256sums = 59b99b529ffecf01566ff10a8f33a087b34330cc95d92d86c45ad105c7144f98
+ sha256sums = 4ce9a46b45d87add01ad132fb602508e4892dd4f684fe5d95c6c7172b008641b
+
+pkgname = php73-kolabformat
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..2b5bf573e8e8
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,47 @@
+# Maintainer: Timo Sarawinskis <timo [at] it-kraut [dot] net>
+
+pkgname=php73-kolabformat
+pkgver=1.1.6
+pkgrel=4
+pkgdesc='PHP 7.3 bindings for Kolab XML Format Schema Definitions Library'
+url='http://www.kolab.org'
+arch=('i686' 'x86_64')
+license=('GPL')
+depends=('libkolabxml' 'php73')
+makedepends=('cmake' 'boost' 'xsd' 'qt5-base' 'swig>=3.0.11')
+source=("https://mirror.kolabenterprise.com/pub/releases/libkolabxml-${pkgver}.tar.gz"
+ "php7.patch" "kolabformat.ini")
+sha256sums=('e48d7f5de1860a381da27981f6c70de1c9f38c4cd536bc6558b6529ce95f0677'
+ '59b99b529ffecf01566ff10a8f33a087b34330cc95d92d86c45ad105c7144f98'
+ '4ce9a46b45d87add01ad132fb602508e4892dd4f684fe5d95c6c7172b008641b')
+options=('!strip')
+install=php73-kolabformat.install
+prepare() {
+ cd "${srcdir}/libkolabxml-${pkgver}"
+ patch -p1 < "${srcdir}/php7.patch"
+ mkdir "${srcdir}/build"
+}
+
+build() {
+ cd "${srcdir}/build"
+ cmake ../libkolabxml-${pkgver} \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_INSTALL_PREFIX=/usr \
+ -DBUILD_TESTS=OFF \
+ -DPHP_CONFIG_EXECUTABLE=/usr/bin/php-config73 \
+ -DPHP_EXECUTABLE=/usr/bin/php73 \
+ -DPHP_INCLUDE_DIR=/usr/include/php73 \
+ -DPHP_INSTALL_DIR=/usr/lib/php73/modules \
+ -DPHP_BINDINGS=true
+ make
+}
+
+package() {
+ cd "${srcdir}/build/src/php"
+
+ # Install manually to avoid putting kolabformat.php in /usr/lib/php73/modules
+ # make DESTDIR="${pkgdir}" install
+ install -Dm755 "kolabformat.so" "${pkgdir}/usr/lib/php73/modules/kolabformat.so"
+ install -Dm644 "kolabformat.php" "${pkgdir}/usr/share/php73/kolabformat.php"
+ install -Dm644 "${srcdir}/kolabformat.ini" "${pkgdir}/etc/php73/conf.d/kolabformat.ini"
+}
diff --git a/kolabformat.ini b/kolabformat.ini
new file mode 100644
index 000000000000..2d4941d128c7
--- /dev/null
+++ b/kolabformat.ini
@@ -0,0 +1 @@
+;extension=kolabformat
diff --git a/php7.patch b/php7.patch
new file mode 100644
index 000000000000..b49204ca30e7
--- /dev/null
+++ b/php7.patch
@@ -0,0 +1,11 @@
+--- a/src/php/CMakeLists.txt 2016-12-25 01:05:21.318045753 +0100
++++ b/src/php/CMakeLists.txt 2016-12-24 19:12:19.288351859 +0100
+@@ -3,7 +3,7 @@
+
+ set(KOLAB_SWIG_PHP_SOURCE_FILE php_kolabformat_wrapper.cpp)
+ add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${KOLAB_SWIG_PHP_SOURCE_FILE} ${CMAKE_CURRENT_BINARY_DIR}/kolabformat.php
+- COMMAND ${SWIG} -v -c++ -php -o ${CMAKE_CURRENT_BINARY_DIR}/${KOLAB_SWIG_PHP_SOURCE_FILE} ../kolabformat.i
++ COMMAND ${SWIG} -v -c++ -php7 -o ${CMAKE_CURRENT_BINARY_DIR}/${KOLAB_SWIG_PHP_SOURCE_FILE} ../kolabformat.i
+ COMMENT "Generating php bindings"
+ WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
+ DEPENDS ../kolabformat.i kolabxml
diff --git a/php73-kolabformat.install b/php73-kolabformat.install
new file mode 100644
index 000000000000..fa56baf81074
--- /dev/null
+++ b/php73-kolabformat.install
@@ -0,0 +1,10 @@
+post_install() {
+ echo '
+ ==> PHP extension
+
+ A config file was stored under /etc/php/conf.d/. In order to use this
+ extension make sure to uncomment it from its config file.
+ '
+}
+
+# vim:set ts=2 sw=2 et: