blob: 122839e77beec9007ef3dd363d3fa0287835077c (
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
|
#!/hint/bash
# shellcheck disable=SC2034 disable=SC2154
# Maintainer: Michael Bolden Jnr / SM9(); <me@sm9.dev>
_pkgname="libgit2cpp"
pkgname="${_pkgname}-git"
pkgver=r192.4bf4ea5
pkgrel=1
pkgdesc="C++ wrapper for libgit2. It contains libgit2 as submodule (libs/libgit2)."
arch=('any')
url="https://github.com/AndreyG/libgit2cpp"
license=('MIT')
makedepends=('git' 'cmake' 'ninja')
optdepends=('clang: for building with clang' 'gcc: for building with gcc')
provides=("${_pkgname}")
conflicts=("${_pkgname}")
source=(
"${_pkgname}::git+${url}.git"
)
sha512sums=('SKIP')
pkgver() {
cd "${srcdir}/${_pkgname}" || return 1
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" || return 1
}
prepare() {
cd "${srcdir}/${_pkgname}" || return 1
rm -rf build && mkdir -p build || return 1
}
build() {
cd "${_pkgname}/build" || return 1
cmake \
-DCMAKE_INSTALL_PREFIX="/usr" \
-DBUNDLE_LIBGIT2=OFF \
-DBUILD_LIBGIT2CPP_EXAMPLES=OFF \
-DCMAKE_BUILD_TYPE=Release \
-G "Ninja" .. || return 1
ninja || return 1
}
package() {
cd "${_pkgname}/build" || return 1
DESTDIR="${pkgdir}" ninja install || return 1
}
|