summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorChocobo12019-01-30 21:17:18 +0800
committerChocobo12019-01-30 23:13:38 +0800
commit9f8d0eef4c4219204c32f8d492e286dc59fd9823 (patch)
tree99ed4d069e81bd67c16a24e38a79f86c0bdf84ce
downloadaur-9f8d0eef4c4219204c32f8d492e286dc59fd9823.tar.gz
newpkg: js-beautify-git 1.9.0_beta5.r0.g2742799a-1
-rw-r--r--.SRCINFO17
-rw-r--r--PKGBUILD41
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 {} +
+}