summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaizhao Zhang2018-05-09 11:56:26 +0800
committerKaizhao Zhang2018-05-09 11:56:26 +0800
commitbf068c3598ff1a871fd592ef32da267b7e634a07 (patch)
tree663127a18b95da4621fd4c9abb4d145dc0333e47
downloadaur-bf068c3598ff1a871fd592ef32da267b7e634a07.tar.gz
Initial import
-rw-r--r--.SRCINFO17
-rw-r--r--.gitignore3
-rw-r--r--PKGBUILD28
-rw-r--r--chruby-fish.install21
-rw-r--r--chruby-root.patch22
5 files changed, 91 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..97a3c80bd44c
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,17 @@
+pkgbase = chruby-fish
+ pkgdesc = Thin wrapper around chruby to make it work with the Fish shell
+ pkgver = 0.8.1+1+d377acb
+ pkgrel = 1
+ url = https://github.com/JeanMertz/chruby-fish
+ install = chruby-fish.install
+ arch = any
+ license = MIT
+ depends = chruby
+ depends = fish
+ source = chruby-fish::git+https://github.com/JeanMertz/chruby-fish.git#commit=d377acbd255f2c2dec8191942d8743ba473e1f7c
+ source = chruby-root.patch
+ sha256sums = SKIP
+ sha256sums = 1d8e18fea6d5146e8c8eca59dec89b18c22f0cefedf3b6c9b573e37c8bead820
+
+pkgname = chruby-fish
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 000000000000..924dfb95c209
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+pkg/
+src/
+*.tar.*
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..cc05a1b75865
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,28 @@
+# Maintainer: Kaizhao Zhang <zhangkaizhao@gmail.com>
+
+pkgname=chruby-fish
+pkgver=0.8.1+1+d377acb
+pkgrel=1
+pkgdesc="Thin wrapper around chruby to make it work with the Fish shell"
+arch=(any)
+url="https://github.com/JeanMertz/chruby-fish"
+license=('MIT')
+depends=('chruby' 'fish')
+install=${pkgname}.install
+
+_commit='d377acbd255f2c2dec8191942d8743ba473e1f7c'
+source=("${pkgname}::git+${url}.git#commit=${_commit}"
+ chruby-root.patch)
+sha256sums=('SKIP'
+ '1d8e18fea6d5146e8c8eca59dec89b18c22f0cefedf3b6c9b573e37c8bead820')
+
+prepare() {
+ cd "${srcdir}/${pkgname}"
+ patch -p0 -i ../chruby-root.patch
+}
+
+package() {
+ cd "${srcdir}/${pkgname}"
+
+ make PREFIX="${pkgdir}/usr" install >/dev/null
+}
diff --git a/chruby-fish.install b/chruby-fish.install
new file mode 100644
index 000000000000..9ac8c5e328b0
--- /dev/null
+++ b/chruby-fish.install
@@ -0,0 +1,21 @@
+post_install() {
+ echo "
+Add the following line to your config.fish file:
+ source /usr/share/chruby/chruby.fish
+To enable auto-switching, also add the auto.fish file:
+ source /usr/share/chruby/auto.fish
+"
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ echo "
+Please do not forget to delete the following line from your config.fish file:
+ source /usr/share/chruby/chruby.fish
+If auto-switching is enabled, also delete the following line:
+ source /usr/share/chruby/auto.fish
+"
+}
diff --git a/chruby-root.patch b/chruby-root.patch
new file mode 100644
index 000000000000..86fc4dee087b
--- /dev/null
+++ b/chruby-root.patch
@@ -0,0 +1,22 @@
+--- share/chruby/chruby.fish.orig 2018-05-09 11:03:47.704267865 +0800
++++ share/chruby/chruby.fish 2018-05-09 11:04:07.601164985 +0800
+@@ -34,7 +34,7 @@
+ # `chruby.sh` is located in a custom path.
+ #
+ function bchruby
+- set -q CHRUBY_ROOT; or set CHRUBY_ROOT /usr/local
++ set -q CHRUBY_ROOT; or set CHRUBY_ROOT /usr
+
+ if test ! -f "$CHRUBY_ROOT/share/chruby/chruby.sh";
+ echo "$CHRUBY_ROOT/share/chruby/chruby.sh does not exist." \
+--- share/chruby/auto.fish.orig 2018-05-09 11:03:40.917525801 +0800
++++ share/chruby/auto.fish 2018-05-09 11:04:18.027957887 +0800
+@@ -35,7 +35,7 @@
+ # `chruby.sh` and `auto.sh` are located in a custom path.
+ #
+ function chruby_auto -e fish_prompt
+- set -q CHRUBY_ROOT; or set CHRUBY_ROOT /usr/local
++ set -q CHRUBY_ROOT; or set CHRUBY_ROOT /usr
+
+ #
+ # line 1: source official `chruby.sh` file.