From: voidlinux-github@inbox.vuxu.org
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] New package: volta-0.7.1
Date: Tue, 28 Jan 2020 11:09:59 +0100 [thread overview]
Message-ID: <20200128100959.lqQgjPq0GVrQ5qkkZHeCrofuyDNpK91ksbyH6eMuozA@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-18446@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 735 bytes --]
There is an updated pull request by atk against master on the void-packages repository
https://github.com/atk/void-packages feat-volta
https://github.com/void-linux/void-packages/pull/18446
New package: volta-0.7.1
Volta is a JavaScript utility version handling tool written in rust; unfortunately, binaries are only available for openssl, so it needs to be compiled for libressl. The original is supposed to be installed to a hidden directory, but since that does not fit into the workflow, I changed the installation to put the binaries into /usr/bin and the scripts into /etc/volta (where you can source them from your .bashrc or .zshrc).
A patch file from https://github.com/void-linux/void-packages/pull/18446.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-feat-volta-18446.patch --]
[-- Type: text/x-diff, Size: 8582 bytes --]
From 366142efd4e4fc7b0f76c4394cbe57d66cd4203f Mon Sep 17 00:00:00 2001
From: Alex Lohr <alexloh@T490.fritz.box>
Date: Tue, 21 Jan 2020 15:49:52 +0100
Subject: [PATCH 1/3] New package: volta-0.7.0
---
.../patches/openssl-sys-fix-version.patch | 11 +++++++
srcpkgs/volta/template | 31 +++++++++++++++++++
2 files changed, 42 insertions(+)
create mode 100644 srcpkgs/volta/patches/openssl-sys-fix-version.patch
create mode 100644 srcpkgs/volta/template
diff --git a/srcpkgs/volta/patches/openssl-sys-fix-version.patch b/srcpkgs/volta/patches/openssl-sys-fix-version.patch
new file mode 100644
index 00000000000..7f89a2a632f
--- /dev/null
+++ b/srcpkgs/volta/patches/openssl-sys-fix-version.patch
@@ -0,0 +1,11 @@
+--- Cargo.toml
++++ Cargo.toml
+@@ -39,6 +39,7 @@ structopt = "0.2.14"
+ rand = "0.5"
+ cfg-if = "0.1"
+ mockito = { version = "0.14.0", optional = true }
++openssl-sys = { version = "0.9.53" }
+ test-support = { path = "crates/test-support" }
+ textwrap = "0.11.0"
+ which = "2.0.1"
+
\ No newline at end of file
diff --git a/srcpkgs/volta/template b/srcpkgs/volta/template
new file mode 100644
index 00000000000..7a9280dd96a
--- /dev/null
+++ b/srcpkgs/volta/template
@@ -0,0 +1,31 @@
+# Template file for 'volta'
+pkgname=volta
+version=0.7.0
+revision=1
+build_helper="rust"
+short_desc="JavaScript tool version sync helper"
+maintainer="Alex Lohr <alex.lohr@logmein.com>"
+license="BSD-2-Clause"
+homepage="https://volta.sh/"
+hostmakedepends="cargo pkg-config"
+makedepends="libressl-devel"
+depends=""
+distfiles="https://github.com/volta-cli/${pkgname}/archive/v${version}.tar.gz"
+checksum=74b97e0488d53b570be745e5380c829ddb59fbc04d0f9ec2e40af612746a05d6
+
+do_build() {
+ cargo build --release --target ${RUST_TARGET}
+}
+
+do_install() {
+ vinstall target/${RUST_TARGET}/release/volta 755 usr/bin
+ vinstall target/${RUST_TARGET}/release/volta-shim 755 usr/bin
+ vinstall target/${RUST_TARGET}/release/volta-migrate 755 usr/bin
+
+ vmkdir etc/volta 755
+ vinstall shell/unix/load.bash 755 etc/volta
+ vinstall shell/unix/load.sh 755 etc/volta
+ vinstall shell/unix/load.fish 755 etc/volta
+
+ echo "To use volta automatically, you need to source the correct shell script in /etc/volta"
+}
\ No newline at end of file
From 46bb68261467f315aa8e0ad307c50760589d29e6 Mon Sep 17 00:00:00 2001
From: Alex Lohr <alex.lohr@logmein.com>
Date: Tue, 28 Jan 2020 10:06:25 +0100
Subject: [PATCH 2/3] volta: update to 0.7.1
---
srcpkgs/volta/template | 78 +++++++++++++++++++++++++++++++++---------
1 file changed, 61 insertions(+), 17 deletions(-)
diff --git a/srcpkgs/volta/template b/srcpkgs/volta/template
index 7a9280dd96a..8be45be3e35 100644
--- a/srcpkgs/volta/template
+++ b/srcpkgs/volta/template
@@ -1,31 +1,75 @@
# Template file for 'volta'
pkgname=volta
-version=0.7.0
+version=0.7.1
revision=1
+archs="x86_64 i686"
build_helper="rust"
+hostmakedepends="cargo pkg-config"
+makedepends="libressl-devel"
short_desc="JavaScript tool version sync helper"
maintainer="Alex Lohr <alex.lohr@logmein.com>"
license="BSD-2-Clause"
homepage="https://volta.sh/"
-hostmakedepends="cargo pkg-config"
-makedepends="libressl-devel"
-depends=""
distfiles="https://github.com/volta-cli/${pkgname}/archive/v${version}.tar.gz"
-checksum=74b97e0488d53b570be745e5380c829ddb59fbc04d0f9ec2e40af612746a05d6
+checksum=e53a07e167bb64103f36901423f5a377a2ea89ecfdd7a1343e69d659f99f9c1b
do_build() {
- cargo build --release --target ${RUST_TARGET}
+ cargo build --release --target ${RUST_TARGET}
+
+ cat >> shell/unix/install.sh <<_EOF
+createDir() {
+ if [ ! -d "$1"]; then
+ mkdir "$1"
+ fi
+}
+
+createSymlink() {
+ if [ ! -e "$2" ]; then
+ ln -s "$1" "$2"
+ fi
+}
+
+installProfile() {
+ if [ -e "$1" ]; then
+ if [ -z $(grep "$2" "$1") ]; then
+ echo "" >> "$1"
+ echo "export VOLTA_HOME=\"$HOME/.volta\"" >> "$1"
+ echo "export PATH=\"$HOME/.volta/bin:$PATH\"" >> "$1"
+ echo "source $2" >> "$1"
+ fi
+ fi
+}
+
+# Create directories
+createDir "$HOME/.volta"
+createDir "$HOME/.volta/bin"
+
+# Create symlinks
+createSymlink "/usr/bin/volta" "$HOME/.volta/volta"
+createSymlink "/usr/bin/volta-migrate" "$HOME/.volta/volta-migrate"
+createSymlink "/usr/bin/volta-shim" "$HOME/.volta/volta-shim"
+
+# Install profile
+installProfile "$HOME/.bashrc" "/etc/volta/load.bash"
+installProfile "$HOME/.cshrc" "/etc/volta/load.sh"
+installProfile "$HOME/.config/fish/config.fish" "/etc/volta/load.fish"
+installProfile "$HOME/.zshrc" "/etc/volta/load.sh"
+
+_EOF
}
do_install() {
- vinstall target/${RUST_TARGET}/release/volta 755 usr/bin
- vinstall target/${RUST_TARGET}/release/volta-shim 755 usr/bin
- vinstall target/${RUST_TARGET}/release/volta-migrate 755 usr/bin
-
- vmkdir etc/volta 755
- vinstall shell/unix/load.bash 755 etc/volta
- vinstall shell/unix/load.sh 755 etc/volta
- vinstall shell/unix/load.fish 755 etc/volta
-
- echo "To use volta automatically, you need to source the correct shell script in /etc/volta"
-}
\ No newline at end of file
+ vlicense LICENSE
+
+ vbin target/${RUST_TARGET}/release/volta
+ vbin target/${RUST_TARGET}/release/volta-shim
+ vbin target/${RUST_TARGET}/release/volta-migrate
+
+ vmkdir etc/volta 755
+ vinstall shell/unix/load.bash 755 etc/volta
+ vinstall shell/unix/load.sh 755 etc/volta
+ vinstall shell/unix/load.fish 755 etc/volta
+ vinstall shell/unix/install.sh 755 etc/volta
+
+ echo "To install volta, use etc/volta/install.sh"
+}
From 867322a7ef24a2514503bfe45d57caedd7ce9ab1 Mon Sep 17 00:00:00 2001
From: Alex Lohr <alex.lohr@logmein.com>
Date: Tue, 28 Jan 2020 11:10:26 +0100
Subject: [PATCH 3/3] volta: fix install script
---
srcpkgs/volta/template | 52 ++++++++++++++++++++++--------------------
1 file changed, 27 insertions(+), 25 deletions(-)
diff --git a/srcpkgs/volta/template b/srcpkgs/volta/template
index 8be45be3e35..fde063c3200 100644
--- a/srcpkgs/volta/template
+++ b/srcpkgs/volta/template
@@ -1,7 +1,7 @@
# Template file for 'volta'
pkgname=volta
version=0.7.1
-revision=1
+revision=2
archs="x86_64 i686"
build_helper="rust"
hostmakedepends="cargo pkg-config"
@@ -13,51 +13,53 @@ homepage="https://volta.sh/"
distfiles="https://github.com/volta-cli/${pkgname}/archive/v${version}.tar.gz"
checksum=e53a07e167bb64103f36901423f5a377a2ea89ecfdd7a1343e69d659f99f9c1b
-do_build() {
- cargo build --release --target ${RUST_TARGET}
-
+post_patch() {
cat >> shell/unix/install.sh <<_EOF
createDir() {
- if [ ! -d "$1"]; then
- mkdir "$1"
+ if [ ! -d "\$1" ]; then
+ mkdir "\$1"
fi
}
createSymlink() {
- if [ ! -e "$2" ]; then
- ln -s "$1" "$2"
+ if [ ! -e "\$2" ]; then
+ ln -s "\$1" "\$2"
fi
}
installProfile() {
- if [ -e "$1" ]; then
- if [ -z $(grep "$2" "$1") ]; then
- echo "" >> "$1"
- echo "export VOLTA_HOME=\"$HOME/.volta\"" >> "$1"
- echo "export PATH=\"$HOME/.volta/bin:$PATH\"" >> "$1"
- echo "source $2" >> "$1"
+ if [ -e "\$1" ]; then
+ isInstalled=\$(grep "\$2" "\$1")
+ if [ -z "\$isInstalled" ]; then
+ echo "" >> "\$1"
+ echo "export VOLTA_HOME=\"\$HOME/.volta\"" >> "\$1"
+ echo "export PATH=\"\$HOME/.volta/bin:\\\$PATH\"" >> "\$1"
+ echo "source \$2" >> "\$1"
fi
fi
}
# Create directories
-createDir "$HOME/.volta"
-createDir "$HOME/.volta/bin"
+createDir "\$HOME/.volta"
+createDir "\$HOME/.volta/bin"
# Create symlinks
-createSymlink "/usr/bin/volta" "$HOME/.volta/volta"
-createSymlink "/usr/bin/volta-migrate" "$HOME/.volta/volta-migrate"
-createSymlink "/usr/bin/volta-shim" "$HOME/.volta/volta-shim"
+createSymlink "/usr/bin/volta" "\$HOME/.volta/volta"
+createSymlink "/usr/bin/volta-migrate" "\$HOME/.volta/volta-migrate"
+createSymlink "/usr/bin/volta-shim" "\$HOME/.volta/volta-shim"
# Install profile
-installProfile "$HOME/.bashrc" "/etc/volta/load.bash"
-installProfile "$HOME/.cshrc" "/etc/volta/load.sh"
-installProfile "$HOME/.config/fish/config.fish" "/etc/volta/load.fish"
-installProfile "$HOME/.zshrc" "/etc/volta/load.sh"
-
+installProfile "\$HOME/.bashrc" "/etc/volta/load.bash"
+installProfile "\$HOME/.cshrc" "/etc/volta/load.sh"
+installProfile "\$HOME/.config/fish/config.fish" "/etc/volta/load.fish"
+installProfile "\$HOME/.zshrc" "/etc/volta/load.sh"
_EOF
}
+do_build() {
+ cargo build --release --target ${RUST_TARGET}
+}
+
do_install() {
vlicense LICENSE
@@ -71,5 +73,5 @@ do_install() {
vinstall shell/unix/load.fish 755 etc/volta
vinstall shell/unix/install.sh 755 etc/volta
- echo "To install volta, use etc/volta/install.sh"
+ echo "To install volta locally, use etc/volta/install.sh"
}
next prev parent reply other threads:[~2020-01-28 10:10 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-21 14:49 [PR PATCH] New package: volta-0.7.0 voidlinux-github
2020-01-28 9:07 ` [PR PATCH] [Updated] " voidlinux-github
2020-01-28 10:09 ` voidlinux-github [this message]
2020-01-28 10:41 ` New package: volta-0.7.1 voidlinux-github
2020-01-28 19:03 ` [PR PATCH] [Updated] " voidlinux-github
2020-01-30 8:56 ` voidlinux-github
2020-01-31 8:38 ` voidlinux-github
2020-01-31 8:48 ` voidlinux-github
2020-01-31 9:25 ` voidlinux-github
2020-01-31 9:52 ` voidlinux-github
2020-02-01 13:05 ` voidlinux-github
2020-02-02 2:33 ` voidlinux-github
2020-02-02 2:33 ` voidlinux-github
2020-02-02 8:09 ` voidlinux-github
2020-02-02 8:09 ` [PR PATCH] [Closed]: " voidlinux-github
2020-02-03 9:04 ` voidlinux-github
2020-02-03 10:11 [PR PATCH] " voidlinux-github
2020-02-03 10:41 ` [PR PATCH] [Updated] " voidlinux-github
2020-02-03 11:32 ` voidlinux-github
2020-02-03 20:01 ` voidlinux-github
2020-02-03 20:57 ` voidlinux-github
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200128100959.lqQgjPq0GVrQ5qkkZHeCrofuyDNpK91ksbyH6eMuozA@z \
--to=voidlinux-github@inbox.vuxu.org \
--cc=ml@inbox.vuxu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).