diff options
author | Erich Eckner <git@eckner.net> | 2022-02-28 08:24:51 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2022-02-28 08:24:51 +0100 |
commit | 3922fc973a6e162358a4999def0c8ac8213a4cf6 (patch) | |
tree | a3066e5fc4b24d350a4b20a608b38dde36f5e4a7 /vue-cli | |
parent | 70c5a905642cfd50ea9b41f6bea36c48bb6daae9 (diff) | |
download | archlinuxewe-3922fc973a6e162358a4999def0c8ac8213a4cf6.tar.xz |
vue-cli new
Diffstat (limited to 'vue-cli')
-rw-r--r-- | vue-cli/PKGBUILD | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/vue-cli/PKGBUILD b/vue-cli/PKGBUILD new file mode 100644 index 000000000..1bc34aad0 --- /dev/null +++ b/vue-cli/PKGBUILD @@ -0,0 +1,47 @@ +# Maintainer: Erich Eckner <arch at eckner dot net> +# Contributor: tjbp <archlinux@tjbp.net> +# Contributor: Nick Boughton <nicholasboughton@gmail.com> +# Contributor: Jean Lucas <jean@4ray.co> +# Contributor: GFdevelop + +_npmscope=vue +_npmname=cli +_npmid="@$_npmscope/$_npmname" + +pkgname="${_npmscope}-${_npmname}" +pkgver=4.5.15 +pkgrel=1 +pkgdesc='Standard tooling for Vue.js development' +arch=('any') +url='https://cli.vuejs.org' +license=('MIT') +depends=('nodejs') +makedepends=('npm') +optdepends=() +conflicts=('nodejs-vue-cli' 'vue') +source=("$pkgname-$pkgver.tar.gz::https://registry.npmjs.org/$_npmid/-/$_npmname-$pkgver.tgz") +noextract=("${source[@]%%::*}") +sha256sums=('1b30ab732dd74684212623a1b25853905f3b788d4a2ddb5bf8de80107ee53bf2') + +package() { + mkdir -p "${pkgdir}"/usr/lib + + # Setting temporary cache + npm install -g --cache "$srcdir/npm-cache" --prefix "$pkgdir/usr" "${source[@]%%::*}" + + # 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 -execdir chmod 755 {} \+ + + # npm gives ownership of ALL FILES to build user + # https://bugs.archlinux.org/task/63396 + chown -R root:root $pkgdir + + # Package contains reference to $srcdir/$pkgdir + find "${pkgdir}" -type f -name package.json -execdir sed -i '/_where/d' {} \+ + + sed -i "s|$pkgdir||" "$pkgdir"/usr/lib/node_modules/"$_npmid"/node_modules/sshpk/package.json + + # Add license + install -Dm644 "$pkgdir/usr/lib/node_modules/$_npmid/LICENSE" "$pkgdir/usr/share/licenses/$pkgname/LICENSE" +} |