# Contributor: Inky1003 <inky1003 (at) gmail (dot) com>

pkgname=vsviewer-git
pkgver=R19.mod.3
pkgrel=1
pkgdesc="Modified version of the original Vapoursynth Editor (by selur)"
arch=('x86_64')
url='https://github.com/Selur/vsViewer'
license=( 'MIT' )
depends=('qt6-5compat'
         'vapoursynth'
         )
makedepends=('git'
             'qt6-base'
             )
provides=('vsviewer')
conflicts=('vsviewer')
source=('vsviewer::git+https://github.com/Selur/vsViewer.git')
sha256sums=('SKIP')

build() {
  cd vsviewer
  sed -i 's|/usr/local/include/vapoursynth|/usr/include/vapoursynth|g' vsViewer.pro
  qmake6 vsViewer.pro CONFIG+=release
  make -j $(nproc)
  
}

package() {
  cd "vsviewer"
  install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
  install -Dm644 README "${pkgdir}/usr/share/doc/vsviewer/README"
  cd "build/release-64bit-gcc"
  install -Dm755 vsViewer "${pkgdir}/usr/bin/vsViewer"
}
