summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 6d0bb7b2f2219d4a74a5e4cb1a4b3c2d906061e7 (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: SelfRef <arch@selfref.dev>

_pkgbase=station-desktop
pkgname="$_pkgbase"
pkgver=3.2.0
pkgrel=1
pkgdesc="Smart browser for busy people. A single place for all of your web applications (stable version)"
arch=('any')
url="https://getstation.com/"
license=('Apache-2.0')
depends=('nss' 'at-spi2-core' 'libcups' 'gtk3' 'alsa-lib')
makedepends=('git' 'yarn' 'python')
conflicts=('station-bin')
source=(
	"$_pkgbase::git+https://github.com/getstation/desktop-app.git#tag=v$pkgver"
	'station-desktop-app.desktop'
)
sha256sums=('f78d549baf1d8551e5e0fc66c49368faa86e0f1c52295dd5d5aafc7c6afa86c6'
            'bf5703422b6cf240d8bca0647c23141052e6ce4e77fdd8ff8c9e19ca61f183d8')

prepare() {
	cd "$_pkgbase"
	yarn install

	_package_file='packages/app/package.json'
	[ -f "$_package_file" ] && sed -i '/"release"/s/electron-builder"/electron-builder -l dir"/' "$_package_file"
}

build() {
	cd "$_pkgbase"
	yarn run release
}

check() {
	cd "$_pkgbase"
	yarn run test
}

package() {
	cd "$_pkgbase"
	install -dm755 "$pkgdir/opt/Station/"
	cp -r release/linux-unpacked/* "$pkgdir/opt/Station/"

	install -Dm644 ../station-desktop-app.desktop "$pkgdir/usr/share/applications/station-desktop-app.desktop"
	install -Dm644 packages/app/build/station.svg "$pkgdir/usr/share/icons/hicolor/scalable/apps/station-desktop-app.svg"
	install -Dm644 packages/app/build/icon_512x512.png "$pkgdir/usr/share/icons/hicolor/512x512/apps/station-desktop-app.png"
}