# POWER Maintainer: Alexander Baldeck <alex.bldck@gmail.com>
# Maintainer: Evangelos Foutras <foutrelis@archlinux.org>
# Contributor: Alessio 'mOLOk' Bolognino <themolok@gmail.com>
# Contributor: Christoph 'delmonico' Neuroth <delmonico@gmx.net>

pkgname=librsync
pkgver=2.3.4
pkgrel=2
epoch=1
pkgdesc="Library for calculating and applying network deltas"
arch=(x86_64 powerpc64le powerpc64 powerpc riscv64)
url="https://github.com/librsync/librsync"
license=('LGPL')
depends=('popt')
makedepends=('cmake')
provides=('librsync.so')
source=(https://github.com/$pkgname/$pkgname/archive/v$pkgver/$pkgname-$pkgver.tar.gz)
sha256sums=('a0dedf9fff66d8e29e7c25d23c1f42beda2089fb4eac1b36e6acd8a29edfbd1f')

prepare() {
  cd $pkgname-$pkgver
  mkdir build
}

build() {
  cd $pkgname-$pkgver/build

  cmake \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_INSTALL_LIBDIR=lib \
    ..
  make
}

check() {
  cd $pkgname-$pkgver/build
  make check
}

package() {
  cd $pkgname-$pkgver/build
  make DESTDIR="$pkgdir" install
}

# vim:set ts=2 sw=2 et:
