summaryrefslogtreecommitdiff
path: root/user/fish
diff options
context:
space:
mode:
Diffstat (limited to 'user/fish')
-rw-r--r--user/fish/APKBUILD59
-rw-r--r--user/fish/fish.post-install3
l---------user/fish/fish.post-upgrade1
-rw-r--r--user/fish/fish.pre-deinstall3
4 files changed, 66 insertions, 0 deletions
diff --git a/user/fish/APKBUILD b/user/fish/APKBUILD
new file mode 100644
index 000000000..e32bfaf95
--- /dev/null
+++ b/user/fish/APKBUILD
@@ -0,0 +1,59 @@
+# Contributor: William Pitcock <nenolod@dereferenced.org>
+# Maintainer: Kiyoshi Aman <kiyoshi.aman+adelie@gmail.com>
+pkgname=fish
+pkgver=2.7.1
+pkgrel=0
+pkgdesc="Modern interactive commandline shell"
+url="http://www.fishshell.com"
+arch="all"
+options="!check" # no tests
+license="BSD-3-Clause AND BSD-2-Clause AND GPL-2.0+ AND GPL-2.0-only AND ISC"
+depends="bc"
+depends_dev="$pkgname-tools"
+makedepends="libtool doxygen ncurses-dev pcre2-dev"
+install="$pkgname.post-install $pkgname.post-upgrade $pkgname.pre-deinstall"
+subpackages="$pkgname-dev $pkgname-doc $pkgname-tools::noarch"
+source="https://github.com/fish-shell/fish-shell/releases/download/$pkgver/$pkgname-$pkgver.tar.gz"
+
+build() {
+ cd "$builddir"
+ ./configure \
+ --build=$CBUILD \
+ --host=$CHOST \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --mandir=/usr/share/man \
+ --localstatedir=/var
+ make
+}
+
+package() {
+ cd "$builddir"
+
+ make install DESTDIR="$pkgdir"
+ rm -fr "$pkgdir"/usr/share/$pkgname/groff
+}
+
+dev() {
+ default_dev
+
+ mkdir -p "$subpkgdir"/usr/share
+ mv "$pkgdir"/usr/share/pkgconfig "$subpkgdir"/usr/share
+}
+
+doc() {
+ default_doc
+
+ mkdir -p "$subpkgdir"/usr/share/$pkgname
+ mv "$pkgdir"/usr/share/$pkgname/man "$subpkgdir"/usr/share/$pkgname
+}
+
+tools() {
+ pkgdesc="$pkgdesc (tools)"
+ depends="$pkgname python"
+
+ mkdir -p "$subpkgdir"/usr/share/$pkgname
+ mv "$pkgdir"/usr/share/$pkgname/tools "$subpkgdir"/usr/share/$pkgname
+}
+
+sha512sums="45ee3453404c5d6c56d307b4cd19197de862f9f42d7fa06461acec56dea7146db5675cf6419dd5f72e939b3e4b1955d3761098df1de89a8cebe47645eb6f7a4b fish-2.7.1.tar.gz"
diff --git a/user/fish/fish.post-install b/user/fish/fish.post-install
new file mode 100644
index 000000000..e725135f2
--- /dev/null
+++ b/user/fish/fish.post-install
@@ -0,0 +1,3 @@
+#!/bin/sh
+add-shell '/usr/bin/fish'
+exit 0
diff --git a/user/fish/fish.post-upgrade b/user/fish/fish.post-upgrade
new file mode 120000
index 000000000..7fa98c805
--- /dev/null
+++ b/user/fish/fish.post-upgrade
@@ -0,0 +1 @@
+fish.post-install \ No newline at end of file
diff --git a/user/fish/fish.pre-deinstall b/user/fish/fish.pre-deinstall
new file mode 100644
index 000000000..57411237f
--- /dev/null
+++ b/user/fish/fish.pre-deinstall
@@ -0,0 +1,3 @@
+#!/bin/sh
+remove-shell '/usr/bin/fish'
+exit 0