summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 63083710d37b8518bd58c79bd9cc6511ee966c87 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Maintainer: Jon Kinney <jon@headway.io>
pkgname=hyprcorrect-bin
_pkgname=hyprcorrect
pkgver=0.6.0
pkgrel=1
pkgdesc="Keyboard-driven desktop spelling and typo corrector (prebuilt binary)"
arch=('x86_64' 'aarch64')
url="https://github.com/jondkinney/hyprcorrect"
license=('MIT' 'Apache-2.0')
options=(!debug)
depends=(
    'fontconfig'
    'freetype2'
    'hyprland'
    'libglvnd'
    'libsecret'
    'libxkbcommon'
    'wayland'
    'wtype'
)
optdepends=(
    'wl-clipboard: enables the clipboard / selection fallback when the keystroke buffer is empty'
)
provides=("$_pkgname=$pkgver")
conflicts=("$_pkgname" "$_pkgname-git")
source_x86_64=("$_pkgname-$pkgver-x86_64.tar.gz::https://github.com/jondkinney/$_pkgname/releases/download/v$pkgver/$_pkgname-$pkgver-x86_64.tar.gz")
source_aarch64=("$_pkgname-$pkgver-aarch64.tar.gz::https://github.com/jondkinney/$_pkgname/releases/download/v$pkgver/$_pkgname-$pkgver-aarch64.tar.gz")
sha256sums_x86_64=('0ffb7ac366c6deb7cd92ad0e0cf8e7a90d237067cd159b4bdc0742ae33ee381f')
sha256sums_aarch64=('347be159e9801481584d7e6753bdc7c5b31d416158e6beb19f4dbf9729af84f9')

package() {
    # The release tarball is named after the host arch — $CARCH is set
    # by makepkg so we pick the right one whether we're packaging on
    # x86_64 or aarch64.
    cd "$srcdir/$_pkgname-$pkgver-$CARCH"

    install -Dm755 hyprcorrect "$pkgdir/usr/bin/hyprcorrect"
    install -Dm644 hyprcorrect.desktop "$pkgdir/usr/share/applications/hyprcorrect.desktop"

    # The release tarball ships the pre-rendered hicolor icon tree under
    # icons/ (see release.yml) — without installing it the .desktop's
    # Icon=hyprcorrect resolves to nothing and launchers (walker, etc.)
    # show a blank entry.
    install -Dm644 icons/hicolor/scalable/apps/hyprcorrect.svg \
        "$pkgdir/usr/share/icons/hicolor/scalable/apps/hyprcorrect.svg"
    for size in 16 22 24 32 48 64 128 256 512; do
        install -Dm644 "icons/hicolor/${size}x${size}/apps/hyprcorrect.png" \
            "$pkgdir/usr/share/icons/hicolor/${size}x${size}/apps/hyprcorrect.png"
    done

    install -Dm644 LICENSE-MIT "$pkgdir/usr/share/licenses/$pkgname/LICENSE-MIT"
    install -Dm644 LICENSE-APACHE "$pkgdir/usr/share/licenses/$pkgname/LICENSE-APACHE"
    install -Dm644 README.md "$pkgdir/usr/share/doc/$pkgname/README.md"
}