summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 037441093fb6c8e66960b3ff294e1ef6574d1b97 (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
# Maintainer: Jaime Martínez Rincón <jaime(at)jamezrin(dot)name>

pkgname=gatsby-desktop
pkgver=0.0.4
pkgrel=1
pkgdesc="Official proof-of-concept desktop app for managing your Gatsby sites."
arch=("x86_64")
url="https://github.com/gatsbyjs/desktop"
license=('GPL3')
depends=(yarn)
makedepends=(git)
checkdepends=()
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=()
install=
changelog=
_pkgrepo="https://github.com/gatsbyjs/desktop"
source=("${pkgname}::git+${_pkgrepo}.git#tag=v${pkgver}"
        'gatsby-desktop.desktop')
noextract=()
md5sums=('SKIP'
         '85c4385a42b3a79b2a98a3a53b826105')
validpgpkeys=()

build() {
    cd "$srcdir/$pkgname"

    yarn
    yarn build
    yarn package --linux dir
}

package() {
    install -d "${pkgdir}/usr/bin"
    install -d "${pkgdir}/opt/${pkgname}"
    install -d "${pkgdir}/usr/share/icons"
    install -d "${pkgdir}/usr/share/applications"

    cp -r "${srcdir}/${pkgname}/dist/linux-unpacked/"* "${pkgdir}/opt/${pkgname}"
    ln -s "/opt/${pkgname}/gatsby-desktop.png" "${pkgdir}/usr/share/icons/${pkgname}.png"
    install -Dm644 "${srcdir}/${pkgname}.desktop" "${pkgdir}/usr/share/applications"
    ln -s "/opt/${pkgname}/gatsby-desktop" "${pkgdir}/usr/bin/${pkgname}"
}