# Maintainer: Joey Yakimowich-Payne <jyapayne@pm.me>
#
# BlueRune's convert-to-MP4 example (examples/extensions/convert-to-mp4.desktop) for every
# user: the KDE service menu in KDE's folder for everyone, which Files and Dolphin both read,
# and its metainfo and icon for the Store (docs/extensions.md, "Packaging an extension"). The
# files beside this PKGBUILD that link into the tree are resolved when release/publish.sh
# --extras exports it.
pkgname=bluerune-extension-convert-to-mp4
pkgver=1
pkgrel=1
pkgdesc="Convert videos to MP4 from the right-click menu of BlueRune's Files (and Dolphin)"
arch=('any')
url='https://bluerune.dev/docs/extensions/'
license=('Apache-2.0 OR MIT')
# Actions in Files came after 0.3.3; notify-send says when each video is done.
depends=('bluerune>0.3.3' 'ffmpeg' 'libnotify' 'sh' 'hicolor-icon-theme')
source=(
    convert-to-mp4.desktop
    org.bluerune.Extension.ConvertToMp4.metainfo.xml
    org.bluerune.Extension.ConvertToMp4.svg
    LICENSE-MIT
)
sha256sums=('366e5c6fe7df4b1315455e1b84017f2b70b92346f856d795f745f3fcc4f11c50'
            '2df889e844f1642753244ed226fca654a5d9797c98478426c3d7775f788933d8'
            'f47a46036566c15d7eb84714bd97be0e5a52b1f1d91d7b158a473af46fd428f1'
            'de6686d0422e16d4c09e5af7bc8b56a0208562a7e57c6d434e8c50ec9b0e5b6d')

package() {
    install -Dm644 -t "$pkgdir/usr/share/kio/servicemenus" convert-to-mp4.desktop
    install -Dm644 -t "$pkgdir/usr/share/metainfo" org.bluerune.Extension.ConvertToMp4.metainfo.xml
    install -Dm644 -t "$pkgdir/usr/share/icons/hicolor/scalable/apps" org.bluerune.Extension.ConvertToMp4.svg
    install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE-MIT
}
