summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 24936c22ab66fdcaef47f676605cee66b4445b8b (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
48
49
50
51
52
53
54
55
56
57
pkgname=mariadbpp-git
pkgver=1.0.0
_pkgver=${pkgver/_/-}
pkgrel=0
arch=('i686' 'x86_64')
conflicts=('mariadbpp')
provides=('mariadbpp')

_abi=1.0.0

pkgdesc="C++ client library for MariaDB"
url="https://github.com/viaduck/mariadbpp"
license=("BSL-1.0")
depends=("mariadb-libs")
makedepends=("cmake")
source=("git+https://github.com/viaduck/mariadbpp"
	"git+https://github.com/viaduck/cmake-modules")
sha256sums=('SKIP' 'SKIP')

_giturl="https://github.com/viaduck/mariadbpp"
_gitdir="${srcdir}/${pkgname}"

_builddir="$srcdir/build"

pkgver() {
  echo "1.0.0"
}

prepare() {
    mkdir -p "build"
    cd "${srcdir}/${pkgname}"
    git submodule init
    git config "submodule.external/cmake-modules.url" $srcdir/cmake-modules
    git submodule update --init
    cd "include/mariadb++"
    patch -p1 -d . < "${startdir}/headers.patch"
}

build() {
    cd "build"
    echo "${srcdir}/mariadbpp"
    cmake "${srcdir}/mariadbpp" \
        -DCMAKE_INSTALL_PREFIX=/usr
    make
}

check() {
    cd "build"
    make test
}

package() {
    cd "build"
    make DESTDIR="$pkgdir" install
    install -Dm644 "${srcdir}/mariadbpp"/LICENSE \
        "${pkgdir}/usr/share/licenses/${pkgname}"/LICENSE
}