aboutsummaryrefslogtreecommitdiffstats
path: root/main/checkbashisms/APKBUILD
blob: 16be4ed6fc1f726c2e137c10a83a7e7677a172c3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=checkbashisms
pkgver=2.18.2
pkgrel=0
pkgdesc="Check shell scripts for POXIX compliance"
url="https://tracker.debian.org/pkg/devscripts"
arch="noarch"
license="GPL-2.0-or-later"
depends="perl"
subpackages="$pkgname-doc"
source="http://cdn.debian.net/debian/pool/main/d/devscripts/devscripts_$pkgver.tar.xz"
builddir="$srcdir/devscripts-$pkgver/scripts"

check() {
	cd "$builddir"
	printf '#!/bin/sh\necho "hello world"\n' > ./testfile
	perl ./checkbashisms --version
	perl ./checkbashisms ./testfile
}

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

package() {
	cd "$builddir"
	install -D -m755 "$pkgname" "$pkgdir/usr/bin/$pkgname"
	install -D -m755 "$pkgname".1 "$pkgdir/usr/share/man/man1/$pkgname".1
}

sha512sums="a68e9eccb5662b1ae0860b3f6cdc812a3105df83cd36f4b98b339ba1637a165f45b06acfb9dbadcf1055b65a4d5aa0780c1b921ed422ed1f0334735adadf4b6a  devscripts_2.18.2.tar.xz"