summaryrefslogblamecommitdiff
path: root/user/checkbashisms/APKBUILD
blob: f1a54aa14438edacf85fa2ec4099672954419409 (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.19.7
pkgrel=0
pkgdesc="Check shell scripts for POSIX compliance"
url="https://tracker.debian.org/pkg/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"

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

sha512sums="6e31862bc8f0d43678341f40ec527d76cdccc2e6e50c231eb7c6a1eb442f48b6c62e94126644224e9fdbef583be3166e2c7cc65ea15de4a7c20605089b708eb7  devscripts_2.19.7.tar.xz"