archrelease: copy trunk to extra-x86_64
[arch-packages.git] / libgit2 / trunk / PKGBUILD
blob653f55c5463941b904e6eca61b030c98f8c2f4ff
1 # Maintainer: David Runge <dvzrv@archlinux.org>
2 # Maintainer: Lukas Fleischer <lfleischer@archlinux.org>
3 # Contributor: Hilton Medeiros <medeiros.hilton@gmail.com>
4 # Contributor: Dave Reisner <d@falconindy.com>
6 pkgname=libgit2
7 pkgver=1.4.2
8 pkgrel=1
9 epoch=1
10 pkgdesc="A linkable library for Git"
11 arch=(x86_64)
12 url="https://github.com/libgit2/libgit2"
13 license=(GPL2)
14 depends=(glibc http-parser openssl pcre zlib)
15 makedepends=(cmake libssh2 python)
16 provides=(libgit2.so)
17 options=(debug)
18 source=(
19   $pkgname-$pkgver.tar.gz::https://github.com/$pkgname/$pkgname/archive/v$pkgver.tar.gz
20   $pkgname-1.2.0-remove_http-parse_incompatible_tests.patch
22 sha512sums=('144bec7f8e66d97b20335d87d1eb68d522f5e59064b0c557505c088d3c486d45704f023d701f51de572efa8e2eb111e3136eb5d23c035e29d16698206b5ec277'
23             '01bf3a960b2e6d441017af363bff267bd1513915ebefda95012d7feb38f7020778ea0908664cc479da82f441a4dd2788772005006a9c19e87cfc234268dc3785')
24 b2sums=('61e269fd08beb9579838a13b661b4270f1e8d2d3d1e67f6b8357e92a5ee4aaccbe637644dc87cc8b04d9c181e37808352077b75fed8753a4b2d8868eaf248b62'
25         'e725fb41c9bdfd9952693c9c47be90c10a16a78ab91f80e74c40c5510a83325575ce95674a2e21282e9c300f2bc8d430c896fa379ef744b8a8a912729fa88827')
27 prepare() {
28   # remove tests that are only compatible with the (modified) vendored version
29   # of http-parser, but not with upstream http-parser
30   patch -d $pkgname-$pkgver -Np1 -i ../$pkgname-1.2.0-remove_http-parse_incompatible_tests.patch
33 build() {
34   cmake -DCMAKE_INSTALL_PREFIX=/usr \
35         -DCMAKE_BUILD_TYPE=None \
36         -DUSE_HTTP_PARSER=system \
37         -DUSE_SSH=ON \
38         -DTHREADSAFE=ON \
39         -Wno-dev \
40         -B build \
41         -S $pkgname-$pkgver
42   make VERBOSE=1 -C build
45 check() {
46   make VERBOSE=1 test -C build
49 package() {
50   depends+=(libssh2.so)
52   make VERBOSE=1 DESTDIR="$pkgdir" install -C build
53   install -vDm 644 $pkgname-$pkgver/{AUTHORS,README.md} -t "$pkgdir/usr/share/doc/$pkgname"