summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 2b5bf573e8e887538b6e073bb3e93ead5b554050 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
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"
}