diff options
author | Chocobo1 | 2019-01-30 21:17:18 +0800 |
---|---|---|
committer | Chocobo1 | 2019-01-30 23:13:38 +0800 |
commit | 9f8d0eef4c4219204c32f8d492e286dc59fd9823 (patch) | |
tree | 99ed4d069e81bd67c16a24e38a79f86c0bdf84ce | |
download | aur-9f8d0eef4c4219204c32f8d492e286dc59fd9823.tar.gz |
newpkg: js-beautify-git 1.9.0_beta5.r0.g2742799a-1
-rw-r--r-- | .SRCINFO | 17 | ||||
-rw-r--r-- | PKGBUILD | 41 |
2 files changed, 58 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..282ff75d0547 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,17 @@ +pkgbase = js-beautify-git + pkgdesc = Beautifier for javascript + pkgver = 1.9.0_beta5.r0.g2742799a + pkgrel = 1 + url = https://beautifier.io/ + arch = any + license = MIT + makedepends = git + makedepends = npm + depends = nodejs + provides = js-beautify + conflicts = js-beautify + source = git+https://github.com/beautify-web/js-beautify.git + sha256sums = SKIP + +pkgname = js-beautify-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..74a49a022c86 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,41 @@ +# Maintainer: Chocobo1 <chocobo1 AT archlinux DOT net> + +pkgname=js-beautify-git +pkgver=1.9.0_beta5.r0.g2742799a +pkgrel=1 +pkgdesc="Beautifier for javascript" +arch=('any') +url="https://beautifier.io/" +license=('MIT') +depends=('nodejs') +makedepends=('git' 'npm') +provides=('js-beautify') +conflicts=('js-beautify') +source=("git+https://github.com/beautify-web/js-beautify.git") +sha256sums=('SKIP') + + +pkgver() { + cd "js-beautify" + + _tag=$(git tag -l --sort -v:refname | sed -n '1,1{s/v//p}') + _rev=$(git rev-list --count v$_tag..HEAD) + _hash=$(git rev-parse --short HEAD) + printf "%s.r%s.g%s" "$_tag" "$_rev" "$_hash" | sed 's/-/_/g' +} + +build() { + cd "js-beautify" + + npm install -D + tools/build.sh js +} + +package() { + cd "js-beautify" + + npm install -g --user root --prefix="$pkgdir/usr" . + install -Dm644 "LICENSE" "$pkgdir/usr/share/licenses/js-beautify/LICENSE" + + find "$pkgdir/usr" -type d -exec chmod 755 {} + +} |