[neon/neon-packaging/nvm/Neon/unstable] debian: initial release

Carlos De Maine null at kde.org
Mon Sep 4 10:16:15 BST 2023


Git commit b38b20a8553e38622c57068a23a1f4665b209d91 by Carlos De Maine.
Committed on 04/09/2023 at 11:16.
Pushed by carlosdem into branch 'Neon/unstable'.

initial release

A  +5    -0    debian/changelog
A  +20   -0    debian/control
A  +1    -0    debian/nvm.install
A  +28   -0    debian/patches/0001_add_convenience_scripts
A  +1    -0    debian/patches/series
A  +12   -0    debian/postinst
A  +31   -0    debian/rules
A  +1    -0    debian/source/format
A  +4    -0    debian/watch

https://invent.kde.org/neon/neon-packaging/nvm/-/commit/b38b20a8553e38622c57068a23a1f4665b209d91

diff --git a/debian/changelog b/debian/changelog
new file mode 100644
index 0000000..6507121
--- /dev/null
+++ b/debian/changelog
@@ -0,0 +1,5 @@
+nvm (0.39.5) jammy; urgency=medium
+
+  * Initial release.
+
+ -- Carlos De Maine <carlosdemaine at gmail.com>  Sat, 2 Sep 2023 20:10:00 +1000
diff --git a/debian/control b/debian/control
new file mode 100644
index 0000000..62fd5dd
--- /dev/null
+++ b/debian/control
@@ -0,0 +1,20 @@
+Source: nvm
+Section: libs
+Homepage: https://github.com/nvm-sh/nvm
+Priority: optional
+Standards-Version: 4.6.0
+Vcs-Git: https://github.com/nvm-sh/nvm.git
+Vcs-Browser: https://github.com/nvm-sh/nvm
+Maintainer: neon at kde.org
+Build-Depends: debhelper-compat (= 13), bash,
+Rules-Requires-Root: no
+
+Package: nvm
+Architecture: any
+Multi-Arch: foreign
+Depends: bash, bash-completion,
+Description: nvm is a version manager for node.js,
+ It is designed to be installed per-user, and invoked
+ per-shell. nvm works on any POSIX-compliant shell
+ (sh, dash, ksh,  zsh, bash), in particular on these
+ platforms: unix, macOS, and windows WSL.
diff --git a/debian/nvm.install b/debian/nvm.install
new file mode 100644
index 0000000..275c78f
--- /dev/null
+++ b/debian/nvm.install
@@ -0,0 +1 @@
+usr/share/nvm/
diff --git a/debian/patches/0001_add_convenience_scripts b/debian/patches/0001_add_convenience_scripts
new file mode 100644
index 0000000..02b5556
--- /dev/null
+++ b/debian/patches/0001_add_convenience_scripts
@@ -0,0 +1,28 @@
+diff --git a/Makefile b/Makefile.nvm
+similarity index 100%
+rename from Makefile
+rename to Makefile.nvm
+diff --git a/init-nvm.sh b/init-nvm.sh
+new file mode 100644
+index 0000000000..c3f39a4f5e
+--- /dev/null
++++ b/init-nvm.sh
+@@ -0,0 +1,6 @@
++# Maintainer: Tom Wadley <tom at tomwadley.net>
++
++[ -z "$NVM_DIR" ] && export NVM_DIR="$HOME/.nvm"
++ln -s /usr/share/nvm/bash_completion /usr/share/bash-completion/completions/nvm
++source /usr/share/nvm/nvm.sh
++source /usr/share/nvm/bash_completion
++source /usr/share/nvm/install-nvm-exec
+diff --git a/install-nvm-exec b/install-nvm-exec
+
+new file mode 100644
+index 0000000000..5a6dfc8b24
+--- /dev/null
++++ b/install-nvm-exec
+@@ -0,0 +1,4 @@
++# Maintainer: Tom Wadley <tom at tomwadley.net>
++[ -e "$NVM_DIR" ] || mkdir -p "$NVM_DIR"
++[ -e "$NVM_DIR/nvm.sh" ] || ln -s /usr/share/nvm/nvm.sh "$NVM_DIR/nvm.sh"
++[ -e "$NVM_DIR/nvm-exec" ] || ln -s /usr/share/nvm/nvm-exec "$NVM_DIR/nvm-exec"
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..7436cfb
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001_add_convenience_scripts
diff --git a/debian/postinst b/debian/postinst
new file mode 100644
index 0000000..4ef8892
--- /dev/null
+++ b/debian/postinst
@@ -0,0 +1,12 @@
+#!/bin/bash
+# This `DEBIAN/postinst` script is run post-installation
+# setup nvm in home dir
+source /usr/share/nvm/init-nvm.sh
+source /usr/share/nvm/install-nvm-exec
+source ~/.nv/nvm.sh
+# initialise bash completions
+echo 'PATH="$HOME/.local/bin:$PATH"
+export npm_config_prefix="$HOME/.local"' >> ~/.profile
+# install nodejs 18.5.0 and make system wide default
+nvm install 18.5.0
+nvm alias default 18.5.0
diff --git a/debian/rules b/debian/rules
new file mode 100755
index 0000000..b9cdfb2
--- /dev/null
+++ b/debian/rules
@@ -0,0 +1,31 @@
+#!/usr/bin/make -f
+
+# Uncomment this to turn on verbose mode.
+#export DH_VERBOSE=1
+
+%:
+	dh $@
+
+override_dh_clean:
+	echo "override clean"
+override_dh_auto_clean:
+	echo "override auto clean"
+override_dh_autoreconf:
+	echo " override autoreconf"
+override_dh_configure:
+	echo "override configure"
+override_dh_auto_configure:
+	echo "override auto configure"
+override_dh_prep:
+	# convenience script
+	install -Dm644 init-nvm.sh "usr/share/nvm/init-nvm.sh"
+	# companion script which installs symlinks in NVM_DIR (see comment in script)
+	install -Dm644 install-nvm-exec "usr/share/nvm/install-nvm-exec"
+	# nvm itself
+	install -Dm644 nvm.sh "usr/share/nvm/nvm.sh"
+	# nvm-exec script for 'nvm exec' command
+	install -Dm755 nvm-exec "usr/share/nvm/nvm-exec"
+	# bash completion
+	install -Dm644 bash_completion "usr/share/nvm/bash_completion"
+	# license
+	install -Dm644 LICENSE.md "usr/share/licenses/nvm/LICENSE.md"
diff --git a/debian/source/format b/debian/source/format
new file mode 100644
index 0000000..163aaf8
--- /dev/null
+++ b/debian/source/format
@@ -0,0 +1 @@
+3.0 (quilt)
diff --git a/debian/watch b/debian/watch
new file mode 100644
index 0000000..821e63a
--- /dev/null
+++ b/debian/watch
@@ -0,0 +1,4 @@
+version=4
+opts="filenamemangle=s%(?:.*?)?v?(\d[\d.]*)\.tar\.gz%nvm-$1.tar.gz%" \
+    https://github.com/nvm-sh/nvm/tags \
+    (?:.*?/)?v?(\d[\d.]*)\.tar\.gz


More information about the Neon-commits mailing list