diff options
author | Tom Wadley | 2015-06-20 12:37:25 +0100 |
---|---|---|
committer | Tom Wadley | 2015-06-20 12:39:13 +0100 |
commit | 0e782e351a691df0e0a386abac5e26cdda3accfd (patch) | |
tree | 8cfe4e9cdef50b644e39f07bb87cc0c27dde99bf | |
download | aur-0e782e351a691df0e0a386abac5e26cdda3accfd.tar.gz |
Initial commit - imported package from aur3
-rw-r--r-- | .SRCINFO | 19 | ||||
-rw-r--r-- | .gitignore | 5 | ||||
-rw-r--r-- | PKGBUILD | 43 | ||||
-rw-r--r-- | init-nvm.sh | 3 | ||||
-rw-r--r-- | nvm-git.install | 32 |
5 files changed, 102 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..2af5fff95e10 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,19 @@ +pkgbase = nvm-git + pkgdesc = Simple bash script to manage multiple active node.js versions (git sources) + pkgver = 0.24.0.r2.g2b63f37 + pkgrel = 1 + url = https://github.com/creationix/nvm + install = nvm-git.install + arch = any + license = MIT + makedepends = git + optdepends = bash: bash completion + provides = nvm + conflicts = nvm + source = nvm-git::git+https://github.com/creationix/nvm.git + source = init-nvm.sh + md5sums = SKIP + md5sums = 359e7cff11f9053a1d380272591d29f3 + +pkgname = nvm-git + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..0265afe3a5bd --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +*.pkg.tar.xz +pkg/ +src/ +*.zip +nvm-git/ diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..07e69e61eca5 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,43 @@ +# Maintainer: Tom Wadley <tom@tomwadley.net> + +pkgname=nvm-git +pkgver=0.24.0.r2.g2b63f37 +pkgrel=1 +pkgdesc="Simple bash script to manage multiple active node.js versions (git sources)" +url="https://github.com/creationix/nvm" +arch=('any') +license=('MIT') +optdepends=('bash: bash completion') +makedepends=('git') +conflicts=('nvm') +provides=('nvm') +install="${pkgname}.install" +source=("$pkgname::git+https://github.com/creationix/nvm.git" + "init-nvm.sh") +md5sums=('SKIP' + '359e7cff11f9053a1d380272591d29f3') + +pkgver() { + cd "$pkgname" + git describe --long | sed 's/^v//;s/-/.r/;s/-/./' +} + +package() { + cd "${srcdir}" + + # convenience script + install -Dm644 init-nvm.sh "$pkgdir/usr/share/nvm/init-nvm.sh" + + cd "${pkgname}" + + # nvm.sh + install -Dm644 nvm.sh "$pkgdir/usr/share/nvm/nvm.sh" + + # bash completion + install -Dm644 bash_completion "$pkgdir/usr/share/nvm/bash_completion" + + # license + install -Dm644 LICENSE.md "$pkgdir/usr/share/licenses/nvm/LICENSE.md" +} + +# vim:set ts=2 sw=2 et: diff --git a/init-nvm.sh b/init-nvm.sh new file mode 100644 index 000000000000..c1c5d9e97453 --- /dev/null +++ b/init-nvm.sh @@ -0,0 +1,3 @@ +export NVM_DIR="$HOME/.nvm" +source /usr/share/nvm/nvm.sh +source /usr/share/nvm/bash_completion diff --git a/nvm-git.install b/nvm-git.install new file mode 100644 index 000000000000..88a452e767b7 --- /dev/null +++ b/nvm-git.install @@ -0,0 +1,32 @@ +## arg 1: the new package version +post_install() { + echo " +You need to source nvm before you can use it. Do one of the following +or similar depending on your shell: + + echo 'source /usr/share/nvm/init-nvm.sh' >> ~/.bashrc + echo 'source /usr/share/nvm/init-nvm.sh' >> ~/.zprofile + +Alternatively, you can copy the contents of init-nvm.sh to your +.bashrc (or similar) if you would like an NVM_DIR other than ~/.nvm +" +} + +## arg 1: the new package version +## arg 2: the old package version +post_upgrade() { + post_install +} + +## arg 1: the old package version +post_remove() { + echo " +Don't forget to clean up any lines added to your shell's startup script! + +For example, from your .bashrc (or .zprofile etc.), delete the line: + +source /usr/share/nvm/init-nvm.sh +" +} + +# vim:set ts=2 sw=2 et: |