aboutsummaryrefslogblamecommitdiffstats
path: root/main/fish/APKBUILD
blob: 9945196276af43248edbb47d760b97c013205551 (plain) (tree)
1
2
3
4
5
6
7
8
9

                                             
            
            
        

                                              
          
                      

                                                
                            
                                                         
                          
                                                                            
                                                              


                                                                                              
 
         






                                                                                          
                                         


                                                 
                                  
                        

 
         
             

 
           
                                                  
                                                 
 


                                                                               

                                                          


                                                                                         


                                                              


       
                   






                                                                           
                                          


                                                                             

 

                                                                                                                                                               
# Contributor: Leo <thinkabit.ukim@gmail.com>
# Maintainer: Leo <thinkabit.ukim@gmail.com>
pkgname=fish
pkgver=3.1.2
pkgrel=4
pkgdesc="Modern interactive commandline shell"
url="http://www.fishshell.com"
arch="all"
license="GPL-2.0-only"
depends="bc"
depends_doc="util-linux" # Requires 'ul' program
depends_dev="$pkgname-tools"
makedepends="cmake doxygen ncurses-dev ncurses pcre2-dev"
checkdepends="expect bash"
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/fish-$pkgver.tar.gz
	README.alpine
	"

build() {
	if [ "$CBUILD" != "$CHOST" ]; then
		CMAKE_CROSSOPTS="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
	fi
	cmake -B builddir \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DBUILD_SHARED_LIBS=True \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_SYSCONFDIR=/etc \
		-DCMAKE_CXX_FLAGS="$CXXFLAGS" \
		-DCMAKE_C_FLAGS="$CFLAGS" \
		$CMAKE_CROSSOPTS .
	make -C builddir
}

check() {
	ctest
}

package() {
	make -C builddir install DESTDIR="$pkgdir"
	rm -fr "$pkgdir"/usr/share/$pkgname/groff

	# Install our README
	install -Dm 644 "$srcdir"/README.alpine -t "$pkgdir"/usr/share/doc/fish

	mkdir -p "$pkgdir"/usr/lib
	mv "$pkgdir"/usr/share/pkgconfig "$pkgdir"/usr/lib

	# https://gitlab.alpinelinux.org/alpine/aports/-/merge_requests/10159#note_101679
	rm "$pkgdir"/usr/share/fish/completions/rustup.fish

	# https://github.com/fish-shell/fish-shell/issues/2436
	rm "$pkgdir"/usr/share/fish/completions/docker.fish
}

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 python3 cmd:man"

	mkdir -p "$subpkgdir"/usr/share/$pkgname
	mv "$pkgdir"/usr/share/$pkgname/tools "$subpkgdir"/usr/share/$pkgname
}

sha512sums="b6ae2c928774a2eaccf35312d3a9446bfa3e1335182c8f2b2d6198161d0916904f4964fb20ed13a5bf850c1c819e003905d13db3bc8b1faa5b401a60b47dc563  fish-3.1.2.tar.gz
c28cef48e3d9cde4956d36192dc221e63eca89282a937e2683578ac0958d98a9c54420aea4f1d91d516f5ee2c74589a75865a973305421e1ad0a9e70854dff4f  README.alpine"