summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: ef8af1305d5761ce5ec82681edbd238e392c2725 (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
# Maintainer: Yuzu <g311571057 at gmail dot com>

_pkgname=karousel
pkgname=kwin-karousel-git
pkgver=0.12.r28.gcaf2b5a
pkgrel=3
pkgdesc='KWin tiling script with scrolling '
arch=('any')
url='https://github.com/peterfajdiga/karousel/'
license=('GPL-3.0-or-later')
depends=('qt6-declarative' 'knotifications')
makedepends=('git' 'nodejs' 'kpackage' 'typescript')
provides=("${pkgname%-git}")
conflicts=("${pkgname%-git}")
source=("${pkgname%-git}::git+https://github.com/peterfajdiga/karousel")
sha1sums=('SKIP')

pkgver() {
	cd "$srcdir/${pkgname%-git}"
    git describe --tags --abbrev=7 | sed 's/^v//;s/-/.r/;s/-/./'
}

build() {
	cd "$srcdir/${pkgname%-git}"
    tsc -p ./src/main --outFile ./package/contents/code/main.js
    tsc -p ./src/generators/config --outFile ./run-ts-tmp.js
    mkdir -p ./package/contents/config/
    node ./run-ts-tmp.js > ./package/contents/config/main.xml
}

package() {
    install -D -o root -m 755 -d "$pkgdir/usr/share/kwin/scripts/karousel"
    cd $srcdir/${pkgname%-git}
    cp -r package/* "$pkgdir/usr/share/kwin/scripts/karousel/"
}