aboutsummaryrefslogtreecommitdiffstats
path: root/main/checkbashisms/APKBUILD
blob: 8f851095df3be3afc656d1849e6ac82b626229ab (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.17.11
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="bcce427b551ba1ee19b794e4a8243ae6c8efdf7fb6f108b7cd0e43a93ce9a12bee99800fc40c2b8a2bbf6451adceaeadf6042752fa2e404cad2d014ff03474bf  devscripts_2.17.11.tar.xz"