aboutsummaryrefslogtreecommitdiffstats
path: root/testing/xerces-c/APKBUILD
blob: 4dea346ad78a070d4596459c6dc43842577c82e4 (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
# Contributor: Andrew Bell <andrew.bell.ia@gmail.com>
# Maintainer: Andrew Bell <andrew.bell.ia@gmail.com>
pkgname=xerces-c
pkgver=3.2.2
pkgrel=1
pkgdesc="A validating XML parser written in a portable subset of C++"
url="https://xerces.apache.org/index.html"
arch="x86 x86_64"
license="Apache-2.0"
makedepends="
    cmake
    linux-headers
    "
subpackages="$pkgname-samples $pkgname-doc $pkgname-dev"
_pkgver=${pkgver//./_}
_srcname="Xerces-C_${_pkgver}"
source="https://github.com/apache/xerces-c/archive/${_srcname}.tar.gz"
builddir="$srcdir/$pkgname-$_srcname"

build() {
        mkdir build && cd build
        cmake .. \
            -DCMAKE_INSTALL_PREFIX=/usr \
            -DCMAKE_INSTALL_LIBDIR=lib \
            -DCMAKE_BUILD_TYPE=Release
        make
}

package() {
        cd "$builddir"/build
        make DESTDIR="$pkgdir" install
}

samples() {
	pkgdesc="$pkgdesc (compiled samples)"

	mkdir -p $subpkgdir/usr
	mv $pkgdir/usr/bin $subpkgdir/usr
}

check() {
        cd "$builddir"/build
        make test
}
sha512sums="66f60fe9194376ac0ca99d13ea5bce23ada86e0261dde30686c21ceb5499e754dab8eb0a98adadd83522bda62709377715501f6dac49763e3a686f9171cc63ea  Xerces-C_3_2_2.tar.gz"