PKGBUILD 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. # Maintainer (Arch): Lukas Fleischer <lfleischer@archlinux.org>
  2. # Maintainer (Arch): David Runge <dvzrv@archlinux.org>
  3. # Contributor: Hilton Medeiros <medeiros.hilton@gmail.com>
  4. # Contributor: Dave Reisner <d@falconindy.com>
  5. # Maintainer: Sagar Acharya <sagar@hyperbola.info>
  6. pkgname=libgit2
  7. pkgver=1.1.1
  8. pkgrel=1
  9. epoch=1
  10. pkgdesc='A linkable library for Git'
  11. arch=('x86_64')
  12. url="https://libgit2.github.com/"
  13. depends=('glibc' 'http-parser' 'libressl' 'pcre' 'zlib')
  14. makedepends=('cmake' 'libssh2' 'python' 'quilt')
  15. provides=('libgit2.so')
  16. license=('GPL-2')
  17. source=("$pkgname-$pkgver.tar.gz::https://github.com/libgit2/libgit2/archive/v${pkgver}.tar.gz"
  18. "series"
  19. "disable-online-tests.patch"
  20. "enable-repro-builds.patch")
  21. sha512sums=('287255c81e5baa04d8fbce95efca8174cb34da8025cab979445d41e8361955f1d8c582d7705666ae9fc03c5215fc4f4f57e51d73d14ca9b063ed94077f88e6bc'
  22. '7dc60904e1e4568ca3d531e5dd500302afa1c265903735059aa7b901b0845f1018172bc97d4245011bf01ead82a90cce087e5061b258b16dc8f78703e52f5d83'
  23. '4fccb4d2c3b065f827a2f90d5d8ba020aedc74e337e647d9d1d1a5f3678966dbe3040822af55695462190bc7711c445e81568049adefa3202ecf5eab0f66c194'
  24. 'a2f9be302d320e9ae2e92ff91c5194c21f325a38751336e4a415946cc024b2882a391d3b8b013a545dcd0dafca1cdb3bbb0e7632e7ba57348ecdb285cc909d5e')
  25. prepare() {
  26. cd "$pkgname-$pkgver"
  27. mkdir ./patches
  28. cp ${srcdir}/series ./patches
  29. cp ${srcdir}/*.patch ./patches
  30. export QUILT_PATCHES=patches
  31. export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
  32. export QUILT_DIFF_ARGS='--no-timestamps'
  33. quilt push -av
  34. }
  35. build() {
  36. cd "$pkgname-$pkgver"
  37. cmake -DCMAKE_INSTALL_PREFIX=/usr \
  38. -DCMAKE_BUILD_TYPE='None' \
  39. -DUSE_HTTP_PARSER=system \
  40. -DTHREADSAFE=ON \
  41. -Wno-dev \
  42. -B build \
  43. -S .
  44. make -C build VERBOSE=1
  45. }
  46. check() {
  47. cd "$pkgname-$pkgver"
  48. make -C build test VERBOSE=1
  49. }
  50. package() {
  51. depends+=('libssh2')
  52. cd "$pkgname-$pkgver"
  53. make -C build DESTDIR="$pkgdir" install
  54. install -vDm 644 {AUTHORS,README.md} -t "${pkgdir}/usr/share/doc/${pkgname}"
  55. install -Dm644 COPYING -t "$pkgdir"/usr/share/licenses/$pkgname/
  56. }