diff options
author | Gilrain | 2020-07-25 22:26:40 +0200 |
---|---|---|
committer | Gilrain | 2020-07-25 22:26:40 +0200 |
commit | 9a7dc0e02d765fd39349adafb688254d6b90ab2a (patch) | |
tree | 3bf00eeda388ffa8b6ac7161494d707a83a2a28d | |
download | aur-9a7dc0e02d765fd39349adafb688254d6b90ab2a.tar.gz |
Initial import
-rw-r--r-- | .SRCINFO | 16 | ||||
-rw-r--r-- | PKGBUILD | 42 |
2 files changed, 58 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..743711a0e1b7 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,16 @@ +pkgbase = asf-ui-git + pkgdesc = Standalone web interface for ASF. + pkgver = r1030.e4b02e9 + pkgrel = 1 + url = https://github.com/JustArchiNET/ArchiSteamFarm + arch = any + license = Apache + makedepends = git + makedepends = npm + depends = asf + provides = asf-ui + source = asf-ui::git+https://github.com/JustArchiNET/ASF-ui.git + sha256sums = SKIP + +pkgname = asf-ui-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..ee40d1bbc2a7 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,42 @@ +# Maintainer: Gilrain <gilrain+libre.arch A_T castelmo DOT_ re> +# Contributor: Lucki + +pkgname="asf-ui-git" +pkgver=r1030.e4b02e9 +pkgrel=1 +pkgdesc="Standalone web interface for ASF." +arch=('any') +url="https://github.com/JustArchiNET/ArchiSteamFarm" +license=('Apache') +depends=('asf') +makedepends=('git' 'npm') +provides=('asf-ui') +source=("asf-ui::git+https://github.com/JustArchiNET/ASF-ui.git") +sha256sums=('SKIP') + +pkgver() { + cd "$pkgname" + ( set -o pipefail + git describe --long 2>/dev/null | sed 's/\([^-]*-g\)/r\1/;s/-/./g' || + printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)" + ) +} + +build() { + cd asf-ui + npm ci + npm run-script deploy +} + +package() { + install -d -m 755 "${pkgdir}/usr/lib/asf/www" + cp -rdp --no-preserve=ownership asf-ui/dist/* "${pkgdir}/usr/lib/asf/www" + + # Non-deterministic race in npm gives 777 permissions to random directories. + # See https://github.com/npm/npm/issues/9359 for details. + find "${pkgdir}"/usr -type d -exec chmod 755 {} + + + # npm gives ownership of ALL FILES to build user + # https://bugs.archlinux.org/task/63396 + chown -R root:root "$pkgdir" +} |