# $Id: PKGBUILD 372900 2018-08-20 19:37:49Z dvzrv $
# Maintainer: David Runge <dave@sleepmap.de>
# Contributor: Christopher Arndt <aur -at- chrisarndt -dot- de>
pkgname=lv2file
pkgver=0.84
pkgrel=2
pkgdesc="A simple program which you can use to apply effects to your audio files"
arch=('x86_64')
url="https://github.com/jeremysalwen/lv2file"
license=('GPL3')
groups=('lv2-plugins' 'pro-audio')
depends=('argtable' 'lilv')
makedepends=('lv2')
# upstream didn't add the manpage to the release tarball:
# https://github.com/jeremysalwen/lv2file/issues/4
source=("$pkgname-$pkgver.tar.gz::https://github.com/jeremysalwen/${pkgname}/archive/upstream/${pkgver}.tar.gz"
        "https://raw.githubusercontent.com/jeremysalwen/${pkgname}/master/debian/${pkgname}.1")
sha512sums=('05ccc8a3a2c01a778f153640a4048365e78afc8f79fb76143500dadfec77b3861444163ead24ae2bc17681d8a6ecee6dcecbb57a1d7498219b315b6162a18420'
            '5706801b35f4b3fb6888bd5952219453a0ae13f453f3e475984dfe15aa173e6277089102c128f2da753f8dd70da2da59e4ae6d6a9179c5d1c1565bcf80799af6')

prepare() {
  mv -v "$pkgname-upstream-$pkgver" "$pkgname-$pkgver"
}

build() {
  cd "$pkgname-$pkgver"
  make all
}

package() {
  cd "$pkgname-$pkgver"
  make DESTDIR="$pkgdir/" install
  # man page
  install -vDm 644 "../${pkgname}.1" -t "${pkgdir}/usr/share/man/man1/"
  # docs
  install -vDm 644 README -t "${pkgdir}/usr/share/doc/${pkgname}/"
}
