summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorjason2015-07-11 14:30:21 +1200
committerjason2015-07-11 14:30:21 +1200
commit8f4aacc77f4556469ef18392064d64317345f0ea (patch)
treee5110512e9aa5ad477530ce01199c6c6ef41eae3
downloadaur-8f4aacc77f4556469ef18392064d64317345f0ea.tar.gz
Initial commit
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD64
-rw-r--r--chruby.install35
-rw-r--r--profile.d-chruby.sh2
4 files changed, 119 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..6b2f9ab01d0
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = chruby
+ pkgdesc = Changes the current ruby. Supports both zsh and bash.
+ pkgver = 0.3.9
+ pkgrel = 1
+ url = https://github.com/postmodern/chruby
+ install = chruby.install
+ arch = any
+ license = MIT
+ makedepends = gnupg
+ depends = bash
+ optdepends = zsh
+ source = https://github.com/postmodern/chruby/archive/v0.3.9.tar.gz
+ source = profile.d-chruby.sh
+ sha256sums = 7220a96e355b8a613929881c091ca85ec809153988d7d691299e0a16806b42fd
+ sha256sums = 8256f38a8908654c4d75793774cbb85da324d73ce0137c647f43e852e6618b54
+
+pkgname = chruby
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..df0f0899220
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,64 @@
+# Maintainer: jason ryan <jasonwryan@gmail.com>
+# Contributor: Max Meyer <dev@fedux.org>
+
+pkgname=chruby
+pkgver=0.3.9
+pkgrel=1
+pkgdesc="Changes the current ruby. Supports both zsh and bash."
+arch=(any)
+url="https://github.com/postmodern/chruby"
+license=('MIT')
+depends=('bash')
+optdepends=('zsh')
+makedepends=('gnupg')
+install=${pkgname}.install
+source=(https://github.com/postmodern/${pkgname}/archive/v${pkgver}.tar.gz profile.d-chruby.sh)
+sha256sums=('7220a96e355b8a613929881c091ca85ec809153988d7d691299e0a16806b42fd'
+ '8256f38a8908654c4d75793774cbb85da324d73ce0137c647f43e852e6618b54')
+
+
+prepare() {
+ if gpg --fingerprint 0xB9515E77 >/dev/null 2>&1; then
+
+ #download key
+ msg "Downloading package signature"
+ curl -L -o ${pkgname}-${pkgver}.tar.gz.asc https://raw.github.com/postmodern/chruby/master/pkg/${pkgname}-${pkgver}.tar.gz.asc -s
+
+ #check key
+ if gpg --verify ${pkgname}-${pkgver}.tar.gz.asc ${srcdir}/v${pkgver}.tar.gz;then
+ msg "Verification of package was successfull."
+ else
+ msg "Verification of package failed. Please check yourself with:"
+ echo "gpg --verify ${pkgname}-${pkgver}.tar.gz.asc ${srcdir}/v${pkgver}.tar.gz"
+ fi
+
+ else
+
+ printf "\n\n"
+ msg "Please import the gpg key of the chruby-author, to check package integrity:"
+ msg "http://postmodern.github.com/contact.html#pgp"
+ printf "\n\n"
+
+ fi
+}
+
+package() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ #profile
+ install -D -m644 ${srcdir}/profile.d-chruby.sh ${pkgdir}/etc/profile.d/chruby.sh
+
+ #helper scripts
+ install -D -m755 ${srcdir}/${pkgname}-${pkgver}/scripts/bug_report.sh ${pkgdir}/usr/share/${pkgname}/bug_report.sh
+ install -D -m755 ${srcdir}/${pkgname}-${pkgver}/scripts/setup.sh ${pkgdir}/usr/share/${pkgname}/setup.sh
+
+ #license
+ install -d ${pkgdir}/usr/share/licenses/${pkgname}
+ ln -s /usr/share/doc/${pkgname}-${pkgver}/LICENSE.txt ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt
+
+ #build
+ make PREFIX="${pkgdir}/usr" install >/dev/null
+
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/chruby.install b/chruby.install
new file mode 100644
index 00000000000..7bfe1514808
--- /dev/null
+++ b/chruby.install
@@ -0,0 +1,35 @@
+## arg 1: the new package version
+post_install() {
+ echo "
+Please do one of the following or something similar depending of your preferred
+shell and setup:
+
+ echo 'source /usr/share/chruby/chruby.sh' >> ~/.bashrc
+ echo 'source /usr/share/chruby/chruby.sh' >> ~/.zprofile
+
+For further support/information, please see the project's homepage!
+
+For your convenience there's a file at /etc/profile.d/chruby.sh which can used
+to enable chruby systemwide. You just need to uncomment the lines in the file.
+"
+}
+
+## 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 "
+Please do not forget to delete those lines from your shell's initscript(s):
+e.g. .bashrc, .zprofile, ...
+
+source /usr/share/chruby/chruby.sh
+
+For further support/information, please see the project's homepage!
+"
+}
+
+# vim:set ts=2 sw=2 et:
diff --git a/profile.d-chruby.sh b/profile.d-chruby.sh
new file mode 100644
index 00000000000..d8b8b9aadfb
--- /dev/null
+++ b/profile.d-chruby.sh
@@ -0,0 +1,2 @@
+#[ -n "$BASH_VERSION" ] || [ -n "$ZSH_VERSION" ] || return
+#source /usr/share/chruby/chruby.sh