summaryrefslogblamecommitdiff
path: root/user/checkbashisms/APKBUILD
blob: 96961ecb38586fadd4344a2c55bfc35151b19af7 (plain) (tree)
1
2
3
4
5
6
7
8
9


                                                    
             

                                                  
                                                

                  

                      
              
                                                                   
                                                                                               







                                                               



                                 








                                                                                   
                                                                     


                                                                           
                                                                                                                                                                       
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Max Rees <maxcrees@me.com>
pkgname=checkbashisms
pkgver=2.20.3
pkgrel=0
pkgdesc="Check shell scripts for POSIX compliance"
url="https://salsa.debian.org/debian/devscripts"
arch="noarch"
license="GPL-2.0+"
depends="perl"
checkdepends="shunit2"
makedepends=""
subpackages="$pkgname-doc $pkgname-bash-completion:bashcomp:noarch"
source="https://cdn-aws.deb.debian.org/debian/pool/main/d/devscripts/devscripts_$pkgver.tar.xz"
builddir="$srcdir/devscripts-$pkgver"

prepare() {
	default_prepare
	sed -i "s/###VERSION###/$pkgver/" "scripts/$pkgname.pl"
}

check() {
	./test/test_checkbashisms
}

package() {
	install -Dm755 "scripts/$pkgname.pl" "$pkgdir/usr/bin/$pkgname"
	install -Dm644 "scripts/$pkgname.1" "$pkgdir/usr/share/man/man1/$pkgname.1"
}

bashcomp() {
	pkgdesc="Bash completions for $pkgname"
	depends=""
	install_if="$pkgname=$pkgver-r$pkgrel bash-completion"

	install -Dm644 "$builddir/scripts/$pkgname.bash_completion" \
		"$subpkgdir/usr/share/bash-completion/completions/$pkgname"
}

sha512sums="6d86deeecff82fc16df7d978678f5b88293164688078bf0732a7e6b844cf8845868be31c107518cf43b8dbcbadcd12a9691585f5725abd397f63ff9456fbdd8f  devscripts_2.20.3.tar.xz"