diff options
author | Tom Wadley | 2015-06-20 12:32:52 +0100 |
---|---|---|
committer | Tom Wadley | 2015-06-20 12:34:10 +0100 |
commit | a5f10458a9a28661311b1bda0ce16058ef082ec6 (patch) | |
tree | 64c35cceeccfaa6d9cf4a60d30e45f89d6fce970 | |
download | aur-a5f10458a9a28661311b1bda0ce16058ef082ec6.tar.gz |
Initial commit - imported package from aur3
-rw-r--r-- | .SRCINFO | 16 | ||||
-rw-r--r-- | .gitignore | 4 | ||||
-rw-r--r-- | PKGBUILD | 39 | ||||
-rw-r--r-- | init-nvm.sh | 3 | ||||
-rw-r--r-- | nvm.install | 32 |
5 files changed, 94 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..f746a599cae7 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,16 @@ +pkgbase = nvm + pkgdesc = Simple bash script to manage multiple active node.js versions + pkgver = 0.25.4 + pkgrel = 1 + url = https://github.com/creationix/nvm + install = nvm.install + arch = any + license = MIT + optdepends = bash: bash completion + source = https://github.com/creationix/nvm/archive/v0.25.4.zip + source = init-nvm.sh + md5sums = 6cce02443f46df69fe5e35f1d7fe7a33 + md5sums = 359e7cff11f9053a1d380272591d29f3 + +pkgname = nvm + diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000000..d9113786d882 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +*.pkg.tar.xz +pkg/ +src/ +*.zip diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..c088f92bc1a5 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,39 @@ +# Maintainer: Tom Wadley <tom@tomwadley.net> + +pkgname=nvm +pkgver=0.25.4 +pkgrel=1 +pkgdesc="Simple bash script to manage multiple active node.js versions" +url="https://github.com/creationix/nvm" +arch=('any') +license=('MIT') +optdepends=('bash: bash completion') +install="${pkgname}.install" +source=("https://github.com/creationix/nvm/archive/v${pkgver}.zip" + "init-nvm.sh") +md5sums=('6cce02443f46df69fe5e35f1d7fe7a33' + '359e7cff11f9053a1d380272591d29f3') + +build() { + cd "${pkgname}-${pkgver}" +} + +package() { + cd "${srcdir}" + + # convenience script + install -Dm644 init-nvm.sh "$pkgdir/usr/share/${pkgname}/init-nvm.sh" + + cd "${pkgname}-${pkgver}" + + # nvm.sh + install -Dm644 nvm.sh "$pkgdir/usr/share/$pkgname/nvm.sh" + + # bash completion + install -Dm644 bash_completion "$pkgdir/usr/share/$pkgname/bash_completion" + + # license + install -Dm644 LICENSE.md "$pkgdir/usr/share/licenses/$pkgname/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.install b/nvm.install new file mode 100644 index 000000000000..88a452e767b7 --- /dev/null +++ b/nvm.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: |