Mail archive
alpine-aports

[alpine-aports] [PATCH] fish: add /usr/bin/fish to /etc/shells

From: Sören Tempel <soeren+git_at_soeren-tempel.net>
Date: Sat, 8 Aug 2015 11:57:09 +0200

---
 main/fish/APKBUILD           | 15 ++++++---------
 main/fish/fish.post-install  |  3 +++
 main/fish/fish.post-upgrade  |  1 +
 main/fish/fish.pre-deinstall |  3 +++
 4 files changed, 13 insertions(+), 9 deletions(-)
 create mode 100644 main/fish/fish.post-install
 create mode 120000 main/fish/fish.post-upgrade
 create mode 100644 main/fish/fish.pre-deinstall
diff --git a/main/fish/APKBUILD b/main/fish/APKBUILD
index 4d44133..bc5f8bb 100644
--- a/main/fish/APKBUILD
+++ b/main/fish/APKBUILD
_at_@ -2,29 +2,27 @@
 # Maintainer: William Pitcock <nenolod_at_dereferenced.org>
 pkgname=fish
 pkgver=2.1.2
-pkgrel=1
+pkgrel=2
 pkgdesc="a modern interactive commandline shell"
 url="http://www.fishshell.com/"
 arch="all"
-
-# guessed from fish/fish.cpp *gag*
-license="GPL"
-
+license="GPL2"
 depends=""
 depends_dev="ncurses-dev"
 makedepends="$depends_dev autoconf automake libtool"
-install=""
+install="$pkgname.post-install $pkgname.post-upgrade $pkgname.pre-deinstall"
 subpackages="$pkgname-doc"
 source="http://fishshell.com/files/$pkgver/fish-$pkgver.tar.gz
         fish-safe-strerror.patch"
 
 _builddir="$srcdir"/fish-$pkgver
 prepare() {
-	local i
 	cd "$_builddir"
+
+	local i=
 	for i in $source; do
 		case $i in
-		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1 ;;
 		esac
 	done
 
_at_@ -33,7 +31,6 @@ prepare() {
 
 build() {
 	cd "$_builddir"
-
 	./configure --prefix=/usr \
 		--sysconfdir=/etc || return 1
 	make || return 1
diff --git a/main/fish/fish.post-install b/main/fish/fish.post-install
new file mode 100644
index 0000000..e725135
--- /dev/null
+++ b/main/fish/fish.post-install
_at_@ -0,0 +1,3 @@
+#!/bin/sh
+add-shell '/usr/bin/fish'
+exit 0
diff --git a/main/fish/fish.post-upgrade b/main/fish/fish.post-upgrade
new file mode 120000
index 0000000..7fa98c8
--- /dev/null
+++ b/main/fish/fish.post-upgrade
_at_@ -0,0 +1 @@
+fish.post-install
\ No newline at end of file
diff --git a/main/fish/fish.pre-deinstall b/main/fish/fish.pre-deinstall
new file mode 100644
index 0000000..5741123
--- /dev/null
+++ b/main/fish/fish.pre-deinstall
_at_@ -0,0 +1,3 @@
+#!/bin/sh
+remove-shell '/usr/bin/fish'
+exit 0
-- 
2.5.0
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Sat Aug 08 2015 - 11:57:09 GMT