# Maintainer: David Runge <dvzrv@archlinux.org>
# Contributor: graysky <graysky AT archlinux DOT us>

pkgname=anything-sync-daemon
pkgver=6.0.0
pkgrel=1
pkgdesc="Symlinks and syncs user specified dirs to RAM"
arch=(any)
url="https://github.com/graysky2/anything-sync-daemon"
license=(MIT)
depends=(bash findutils procps-ng pv rsync systemd tar zstd)
optdepends=(
  'bash-completion: for completion when using bash'
  'zsh-completions: for completion when using zsh'
)
install=$pkgname.install
backup=(etc/asd.conf)
source=($pkgname-$pkgver.tar.gz::https://github.com/graysky2/$pkgname/archive/v$pkgver.tar.gz)
sha512sums=('4161d6b6103a81fa3df4ef9ed054bd6831205624a8327e30b103d49cf0431de78fedc812004405dbecba0867df4b0be35fc70ae274931ad2592a3b7c32f93d77')
b2sums=('462c4f381d10ff669ddec6081a4c98d4b972373d96004d32413e6f4c36fa7d0fc2e421255e3941fc85fe01cab3cf61c17c5fcd36e0cc43db5ae1c7dad137fd91')

build() {
  make -C $pkgname-$pkgver
}

package() {
  make DESTDIR="$pkgdir/" install-systemd-all -C $pkgname-$pkgver
  install -vDm 644 $pkgname-$pkgver/LICENSE -t "$pkgdir/usr/share/licenses/$pkgname/"
  install -vDm 644 $pkgname-$pkgver/README.md -t "$pkgdir/usr/share/doc/$pkgname/"
}
