summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 55da661f85b1c1da0f50e5d15b6c23ec424e1d04 (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
# Maintainer: taotieren <admin@taotieren.com>

pkgname=freedom-studio-bin
_pkgname=FreedomStudio
pkgver=2021.04
_pkgver=4.18.0.2021-04-1
pkgrel=2
epoch=
pkgdesc="SiFive Freedom Studio RISC-V IDE for Embedded Development"
arch=('x86_64')
url="https://github.com/sifive/freedom-studio"
license=('GPL' 'GPL2' 'GPL3')
groups=('bash')
depends=()
makedepends=()
checkdepends=()
optdepends=()
provides=()
conflicts=()
replaces=()
backup=()
options=('!strip')
install=
changelog=
source=("${pkgname}-${pkgver}.tar.gz::https://static.dev.sifive.com/dev-tools/${_pkgname}/${pkgver}/${_pkgname}-${_pkgver}-${arch}-linux-ubuntu14.tar.gz")
noextract=(${pkgname}-${pkgver}.tar.gz)
sha256sums=('1836380db2d9a863ef87235ca34ce2c279740ebf02a893313738763aef893a05')
#validpgpkeys=()

package() {
    install -dm0755 "${pkgdir}/opt/sifive/${pkgname%-bin}" \
                    "${pkgdir}/usr/bin" \
                    "${pkgdir}/usr/share/pixmaps"

    tar -xf "${srcdir}/${pkgname}-${pkgver}.tar.gz" -C "${pkgdir}/opt/sifive/${pkgname%-bin}" --no-same-owner  --no-same-permissions

    ln -sf "/opt/sifive/${pkgname%-bin}/FreedomStudio" "${pkgdir}/usr/bin/${pkgname%-bin}"
    ln -sf "/opt/sifive/${pkgname%-bin}/icon.xpm" "${pkgdir}/usr/share/pixmaps/${pkgname%-bin}.xpm"
    install -Dm0644 /dev/stdin "$pkgdir/usr/share/applications/${pkgname}.desktop" << EOF
[Desktop Entry]
Name=${_pkgname}
Comment=${_pkgname} ${_pkgver}
GenericName=${_pkgname}
Exec=env GDK_BACKEND=x11 ${pkgname%-bin} %F
Icon=${pkgname%-bin}.xpm
Path=/opt/sifive/${pkgname%-bin}/
Terminal=false
StartupNotify=true
Type=Application
Categories=Development
EOF
}