File PKGBUILD of Package subtitlecomposer

# Maintainer: Drommer <drommer.94@github.com>
# Contributor: Mladen Milinkovic <maxrd2@smoothware.net>
# Contributor: Martchus <martchus@gmx.net>

pkgname=subtitlecomposer
pkgver=0.7.1+git220.e6f69d1f
pkgrel=1
pkgdesc="A KDE subtitle editor"
arch=('x86_64')
url="https://invent.kde.org/multimedia/$pkgname"
license=('GPL')
depends=('qt6-declarative' 'qt6-5compat' 'kcoreaddons' 'ktextwidgets' 'kio' 'sonnet' 'kcodecs' 'kxmlgui' 'ki18n' 'ffmpeg4.4' 'openal')
makedepends=('extra-cmake-modules' 'jack' 'blas' 'xorg-server-xvfb' 'pocketsphinx' 'git')
optdepends=('pocketsphinx: Pocketsphinx speech recognition backend')
provides=("$pkgname=$pkgver")
conflicts=("$pkgname")

source=("$pkgname.tar.gz")
sha256sums=('SKIP')

pkgver() {
  cd "$srcdir/$pkgname"
  git describe --long --tags | sed 's/^v//;s/\([^-]*-g\)/r\1/;s/-/./g'
}

build() {
  export PKG_CONFIG_PATH='/usr/lib/ffmpeg4.4/pkgconfig'
  cmake -S "$srcdir/$pkgname" -B "$srcdir/build" \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DKDE_INSTALL_LIBDIR=lib \
    -DQT_MAJOR_VERSION=6 \
    -DKDE_INSTALL_USE_QT_SYS_PATHS=ON
  cmake --build "$srcdir/build"
}

package() {
  DESTDIR="$pkgdir" cmake --install "$srcdir/build"
}
openSUSE Build Service is sponsored by