# Maintainer: Joey Yakimowich-Payne <jyapayne@pm.me>
#
# BlueRune's checksums example (examples/extensions/checksums.desktop) for every user: the
# file action in BlueRune's folder for everyone, 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-checksums
pkgver=1
pkgrel=1
pkgdesc="Show SHA-256 checksums from the right-click menu of BlueRune's Files"
arch=('any')
url='https://bluerune.dev/docs/extensions/'
license=('Apache-2.0 OR MIT')
# Actions in Files came after 0.3.3; the action runs in a terminal.
depends=('bluerune>0.3.3' 'coreutils' 'sh' 'hicolor-icon-theme')
source=(
    checksums.desktop
    org.bluerune.Extension.Checksums.metainfo.xml
    org.bluerune.Extension.Checksums.svg
    LICENSE-MIT
)
sha256sums=('8a8e506acdad675b7d710548824a16f3e3d7b7d102f18319ded8051f84214e74'
            '7536b03c00d2b64169ca939755d9c897d71f473af1f5de6eaebda671012a267e'
            '212be399e5cfd7a3fa612a805290c7811f4aa14fba2c2a4892f3e152347d2dfe'
            'de6686d0422e16d4c09e5af7bc8b56a0208562a7e57c6d434e8c50ec9b0e5b6d')

package() {
    install -Dm644 -t "$pkgdir/usr/share/bluerune/file-actions" checksums.desktop
    install -Dm644 -t "$pkgdir/usr/share/metainfo" org.bluerune.Extension.Checksums.metainfo.xml
    install -Dm644 -t "$pkgdir/usr/share/icons/hicolor/scalable/apps" org.bluerune.Extension.Checksums.svg
    install -Dm644 -t "$pkgdir/usr/share/licenses/$pkgname" LICENSE-MIT
}
