File PKGBUILD of Package QCTools

# $Id$
# Maintainer: MediaArea.net SARL <info@mediaarea.net>

pkgname=('qctools' 'qcli')
pkgver=1.1.20200919
pkgrel=1
pkgdesc="QCTools (Quality Control Tools for Video Preservation)"
url="http://mediaarea.net"
license=('GPL')
source=(${pkgname}_${pkgver}-1.tar.gz)
md5sums=('93a02b830e37b2319710507aa363a57c')
arch=('i686' 'x86_64')

depends=('qt5-base' 'qt5-declarative' 'bzip2' 'zlib' 'yasm')

build() {
    cd "${srcdir}/qctools/qctools"
    ./Project/BuildAllFromSource/build
}

package_qctools() {
    pkgdesc="${pkgdesc}"
    install -D -m 0755 "${srcdir}"/qctools/qctools/Project/QtCreator/build/qctools-gui/QCTools "${pkgdir}"/usr/bin/QCTools
    install -D -m 0644 "${srcdir}"/qctools/qctools/Source/Resource/Logo.png "${pkgdir}"/usr/share/icons/hicolor/256x256/apps/qctools.png
    install -D -m 0644 "${srcdir}"/qctools/qctools/Source/Resource/Logo.png "${pkgdir}"/usr/share/pixmaps/qctools.png
    install -D -m 0644 "${srcdir}"/qctools/qctools/Project/GNU/GUI/qctools.desktop "${pkgdir}"/usr/share/applications/qctools.desktop
    install -D -m 0644 "${srcdir}"/qctools/qctools/Project/GNU/GUI/qctools.kde3.desktop "${pkgdir}"/usr/share/apps/konqueror/servicemenus/qctools.desktop
    install -D -m 0644 "${srcdir}"/qctools/qctools/Project/GNU/GUI/qctools.kde4.desktop "${pkgdir}"/usr/share/kde4/services/ServiceMenus/qctools.desktop
    install -D -m 0644 "${srcdir}"/qctools/qctools/Project/GNU/GUI/qctools.kde4.desktop "${pkgdir}"/usr/share/kservices5/ServiceMenus/qctools.desktop
    install -D -m 0644 "${srcdir}"/qctools/qctools/Project/GNU/GUI/qctools.metainfo.xml "${pkgdir}"/usr/share/metainfo/qctools.metainfo.xml
}

package_qcli() {
    pkgdesc="${pkgdesc} (CLI)"
    install -D -m 0755 "${srcdir}"/qctools/qctools/Project/QtCreator/build/qctools-cli/qcli "${pkgdir}"/usr/bin/qcli
}