diff options
author | Francisco Giordano | 2019-07-25 16:31:44 -0300 |
---|---|---|
committer | Francisco Giordano | 2019-07-27 17:52:35 -0300 |
commit | 1778da8f315d8d289ed431920a6ad01342adf981 (patch) | |
tree | 087c3410f607af39c5e4a7eb33224462de34f3c7 | |
download | aur-1778da8f315d8d289ed431920a6ad01342adf981.tar.gz |
initial commit
-rw-r--r-- | .SRCINFO | 18 | ||||
-rw-r--r-- | .gitignore | 5 | ||||
-rw-r--r-- | PKGBUILD | 36 | ||||
-rw-r--r-- | volta-install.patch | 61 | ||||
-rw-r--r-- | volta-profile.sh | 1 |
5 files changed, 121 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..b51f252d16d5 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,18 @@ +pkgbase = volta + pkgdesc = JavaScript Launcher + pkgver = 0.5.7 + pkgrel = 1 + url = https://volta.sh/ + arch = x86_64 + license = BSD + depends = openssl + noextract = volta-0.5.7-linux-openssl-1.1.tar.gz + source = volta-0.5.7.tar.gz::https://github.com/volta-cli/volta/releases/download/v0.5.7/volta-0.5.7-linux-openssl-1.1.tar.gz + source = https://raw.githubusercontent.com/volta-cli/volta/v0.5.7/dev/unix/volta-install.sh + source = volta-install.patch + md5sums = f96b23d5a97c79ae5df738bb3704a147 + md5sums = 5a8b446f69736daff4197d29a679c4b7 + md5sums = 41ba7dd3f7ea94d2549145e00a4674f4 + +pkgname = volta + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..862be5cc39f6 --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +volta-*.tar.gz +volta-install.sh +*.pkg.tar.* +pkg/ +src/ diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..dad2fac95e9a --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,36 @@ +# Maintainer: Francisco Giordano <ok@frang.io> + +pkgname=volta +pkgver=0.5.7 +pkgrel=1 +pkgdesc="JavaScript Launcher" +arch=('x86_64') +url="https://volta.sh/" +license=('BSD') +depends=('openssl') +source=("$pkgname-$pkgver.tar.gz::https://github.com/volta-cli/volta/releases/download/v$pkgver/volta-$pkgver-linux-openssl-1.1.tar.gz" + "https://raw.githubusercontent.com/volta-cli/volta/v${pkgver}/dev/unix/volta-install.sh" + "volta-install.patch" + "volta-profile.sh") +noextract=("volta-$pkgver-linux-openssl-1.1.tar.gz") +md5sums=('f96b23d5a97c79ae5df738bb3704a147' + '5a8b446f69736daff4197d29a679c4b7' + 'a02c7b1fa54d5d6418b6ec1d6ae28a55' + '4d4c7f25d4962bb0a4f01d1288e5e8bd') + +prepare() { + patch --follow-symlinks -i "volta-install.patch" +} + +package() { + export VOLTA_HOME="$pkgdir/usr/share/volta" + bash volta-install.sh --archive "$pkgname-$pkgver.tar.gz" + + mkdir -p "$pkgdir/usr/bin" + ln -s "/usr/share/volta/volta" "$pkgdir/usr/bin" + + mkdir -p "$pkgdir/etc/profile.d" + mv volta-profile.sh "$pkgdir/etc/profile.d/volta.sh" +} + +# vim: et sw=8 ft=PKGBUILD diff --git a/volta-install.patch b/volta-install.patch new file mode 100644 index 000000000000..8498493100d9 --- /dev/null +++ b/volta-install.patch @@ -0,0 +1,61 @@ +--- volta-install.orig 2019-07-27 17:26:27.171234715 -0300 ++++ volta-install.sh 2019-07-27 17:27:29.765694349 -0300 +@@ -88,14 +88,14 @@ + for file in "$install_dir"/bin/*; do + if [ -e "$file" ] && ! [ -d "$file" ]; then + rm -f "$file" +- ln -s "$shim_exec" "$file" ++ ln -sr "$shim_exec" "$file" + chmod 755 "$file" + fi + done + + # re-link the non-user shims + for shim in "${main_shims[@]}"; do +- ln -s "$shim_exec" "$install_dir/bin/$shim" ++ ln -sr "$shim_exec" "$install_dir/bin/$shim" + chmod 755 "$install_dir/bin/$shim" + done + +@@ -425,17 +425,25 @@ + info 'Installing' "Volta locally after compiling with '--release'" + install_local "release" "$install_dir" + ;; ++ local) ++ info 'Installing' "Volta locally after compiling with '--release'" ++ install_local "release" "$install_dir" ++ ;; + *) +- # assume anything else is a specific version +- info 'Installing' "Volta version $version_to_install" +- install_release "$version_to_install" "$install_dir" ++ # assume anything else is a either a file or a specific version ++ if [ -f "$version_to_install" ]; then ++ info 'Installing' "Volta locally from file $version_to_install" ++ install_from_file "$version_to_install" "$install_dir" ++ else ++ info 'Installing' "Volta version $version_to_install" ++ install_release "$version_to_install" "$install_dir" ++ fi + ;; + esac + + if [ "$?" == 0 ] + then + create_symlinks "$install_dir" && +- update_profile "$install_dir" && + info "Finished" 'installation. Open a new terminal to start using Volta!' + fi + } +@@ -581,6 +589,11 @@ + shift # shift off the argument + version_to_install="local-release" + ;; ++ --archive) ++ shift # shift off the argument ++ version_to_install="$1" ++ shift # shift off the value ++ ;; + --version) + shift # shift off the argument + version_to_install="$1" diff --git a/volta-profile.sh b/volta-profile.sh new file mode 100644 index 000000000000..afcdddb7467c --- /dev/null +++ b/volta-profile.sh @@ -0,0 +1 @@ +export VOLTA_HOME=/usr/share/volta |