summaryrefslogtreecommitdiff
path: root/figma-bin/PKGBUILD
blob: 0e238384342861ea4f791111db7c874ece511647 (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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Maintainer: Erich Eckner <arch at eckner dot net>
# Contributor: Speykious <speykious@gmail.com>

pkgname=figma-bin
pkgver=0.11.5
_appimage="figma-linux_${pkgver}_linux_x86_64.AppImage"
pkgrel=1
pkgdesc="The collaborative interface design tool. Unofficial Figma desktop client for Linux (AppImage)"
arch=(x86_64)
url="https://github.com/Figma-linux/figma-linux"
license=(GPL2)
_pinned_dependencies=(
  'glibc>=2.37'
  'zlib=1:1.3.1'
)
depends=(fuse2 hicolor-icon-theme "${_pinned_dependencies[@]}")
makedepends=(xdg-utils)
provides=(figma-linux figma-linux-bin)
conflicts=(figma-linux figma-linux-bin)
options=(!strip)
source=(figma.desktop
        24x24.png
        36x36.png
        48x48.png
        64x64.png
        72x72.png
        96x96.png
        128x128.png
        192x192.png
        256x256.png
        384x384.png
        512x512.png
        "https://github.com/Figma-linux/figma-linux/releases/download/v$pkgver/$_appimage")
sha512sums=('b752be293fa83073959a1b738e4a3ba1b87dd26940d3462de9b666bba4ac2dd0e3f48276cc8243250f02216aed658ad466842274b15f83a3de11df2d6d36c91f'
            'f8f468eeec7b852f6ad0f40c3a3774b174069f007e91894247056924af49b408fbdb76dbcf2bfe3c4aed4b940f496c38a178b0ea2c030c5e0604d0d9ae419a63'
            'ba018df174d39cb57f0675ab2c1ff71d7d220bbb9d359a30ff5a356a2aed2d307c0d8f032a4db770f5aa36f231470e187476fee8d4fc68cf81a957c6d23a1e33'
            'cbff7fcbc701d9a61d88a87c416b9fb900b5607d948a6b2a2a0843f1982ed40f39c381f74c29e7d82c59f44599c5780eaae4f67c6f17026ff986c2a25c45f4a1'
            '5b54ff252df53e75302d60b690815cdfcd5e128c41f1573c6eb35cdff4315a88f2cfb3ff306057f6539595491c06063ce360b46232369a182dcd56faea8497aa'
            '2204d2535aa8483ff5e3b78d70c3cc8ee40b500ad1ee1443e3e5236acb6e4b866379c1932f205e451c38b474d3961493d49e7f6a016c6502da7cceef907715df'
            'a19e9ec6643f224b9729ab9e1089dfaab8e04d27cce081cbbb1fdb4365fcba792975b82c86ad024c19f05b77c2538cbb78e0dc88c402d21d062a145aaa744873'
            '4a2aa935e309f83e604983b7f6ccdc7412c11f7518669de1771ed57e55b4d2eda44b06402ba6de758339d8f9e938c1726d4ec3e70d9b8c06edc62cdbb95da53d'
            'f7924ef64e7e7c8c59a3df97bf72493188d4f5fc3e8073be2fdd7fe7c5ccbf216de224f53c87cdc05eae2b4322cf333bc6794d8eb0f14c3a388b44e9d1923faa'
            'eee86ed20f9aac96a3cd54a2423517a541334fcfebc0b9751ee655cd3107f59521a5430be140bfe7fd1329276ba5e6237a083ecf00846cd99ed66b20e664e7c2'
            '39e63dca2d026b6e82fe5fce6ffba24daf9c698625f927b7021242147f1a7d4efaf21f0b677e3857f12e8f52377b9470bb11d0e761437ebd11eeb99fa52fd4d3'
            '165a56c54ea481e7443a2888d9402441e812ad506398c9385f048f4de4fc5123cc587c1ae659f11cf6e60d456c484a5281119277b64137c2b66d29d606ee49e7'
            '464b3dbc21b7fc2a45bcee5465adcdfe4700903a3c175dcdfe7b97b08ea08c6f1d408fa9432a6528c6a64d75aa7bb10fcb9d9a51dcfba7d7ae3fb3a7fe38acf2')

pkgver() {
  curl -Ls -o /dev/null -w %{url_effective} "$url/releases/latest" \
  | sed '
    s@^.*/v@@
    t
    w /dev/stderr
    d
  '
}

package() {
    install -Dm644 "$srcdir/figma.desktop" "$pkgdir/usr/share/applications/figma.desktop"
    install -Dm644 "$srcdir/256x256.png" "$pkgdir/usr/share/pixmaps/figma.png"

    for size in 24 36 48 64 72 96 128 192 256 384 512; do
        install -Dm644 "$srcdir/${size}x${size}.png" \
               "$pkgdir/usr/share/icons/hicolor/${size}x${size}/apps/figma.png"
    done

	# Install binary
	install -Dm755 "$_appimage" "$pkgdir/usr/bin/figma"

    # This is required for browser login to work
    xdg-mime default figma.desktop x-scheme-handler/figma
}