aboutsummaryrefslogtreecommitdiffstats
path: root/main/checkbashisms/APKBUILD
blob: 638d11941141bb0306e14c019132c04bf60d6910 (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
34
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=checkbashisms
pkgver=2.18.1
pkgrel=0
pkgdesc="Basic checks on shell scripts for the presence of non portable syntax"
subpackages="$pkgname-doc"
url="http://cdn.debian.net/debian/pool/main/d/devscripts/"
arch="noarch"
license="GPL-2.0"
depends="perl"
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="d2043b1e399cc0eece2eb9023b9b93480cc0bf270fc7dae45d1ba7eae0744e74cf0dce286787f7a30b4aafbe85e7ff282ea71f29f3cc011c9ef05e626cf03b22  devscripts_2.18.1.tar.xz"