summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorPieter Goetschalckx2020-10-20 11:58:45 +0200
committerPieter Goetschalckx2020-10-20 11:58:45 +0200
commit660eeba38db88fc2a9d877f1e7510830d6d195f0 (patch)
tree5874700e0e1682aea3b00ad2c2d3d54002ffefbf
downloadaur-yuglify.tar.gz
Initial import
-rw-r--r--.SRCINFO14
-rw-r--r--PKGBUILD27
2 files changed, 41 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..f982e80b531b
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,14 @@
+pkgbase = yuglify
+ pkgdesc = A wrapper around UglifyJS and cssmin with the default YUI configurations
+ pkgver = 2.0.0
+ pkgrel = 1
+ url = https://github.com/yui/yuglify
+ arch = any
+ license = custom
+ makedepends = npm
+ depends = nodejs
+ source = https://registry.npmjs.org/yuglify/-/yuglify-2.0.0.tgz
+ sha256sums = c5380f86738acb9a83b600104a36d23c2d7c8e4f69fa642acf7c0e517d82be81
+
+pkgname = yuglify
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..b20092c270d3
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,27 @@
+# Maintainer: Pieter Goetschalckx
+
+pkgname=yuglify
+pkgver=2.0.0
+pkgrel=1
+pkgdesc="A wrapper around UglifyJS and cssmin with the default YUI configurations"
+arch=(any)
+url=https://github.com/yui/yuglify
+license=(custom)
+depends=(nodejs)
+makedepends=(npm)
+source=(https://registry.npmjs.org/$pkgname/-/$pkgname-$pkgver.tgz)
+sha256sums=('c5380f86738acb9a83b600104a36d23c2d7c8e4f69fa642acf7c0e517d82be81')
+
+package() {
+ npm install -g --user root --prefix "$pkgdir"/usr "$srcdir"/$pkgname-$pkgver.tgz
+ mkdir -p "$pkgdir/usr/share/licenses/$pkgname"
+ ln -s "../../../lib/node_modules/yuglify/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/"
+
+ # 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}"
+}