summaryrefslogblamecommitdiff
path: root/user/checkbashisms/APKBUILD
blob: 09f3359c86e417a736547d9095cd9cc6551e7bf0 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13


                                                    
             








                                                                   
                                                                                               



























                                                                                   
                                                                                                                                                                       
# Contributor: Natanael Copa <ncopa@alpinelinux.org>
# Maintainer: Max Rees <maxcrees@me.com>
pkgname=checkbashisms
pkgver=2.18.6
pkgrel=0
pkgdesc="Check shell scripts for POSIX compliance"
url="https://tracker.debian.org/pkg/devscripts"
arch="noarch"
license="GPL-2.0+"
makedepends=""
depends="perl"
checkdepends="shunit2"
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() {
	cd "$builddir"
	./test/test_checkbashisms
}

package() {
	cd "$builddir"
	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="6bbd5ab2ac522bf4201cf57cc481d3885dd26b0a57338812b5a7ae10ca4575a2942b84b6bd05934898551eae7263ed28f0f7d8d295d055aa5c80111da1531014  devscripts_2.18.6.tar.xz"