projects/aports·blob master · refs

69 lines · 1.6 KiB

1# Maintainer: qaqland <[email protected]>
2maintainer="qaqland <[email protected]>"
3pkgname=debian-devscripts
4pkgver=2.26.5
5pkgrel=1
6pkgdesc="Debian developer scripts"
7url="https://tracker.debian.org/pkg/devscripts"
8arch="noarch"
9license="GPL-2.0-or-later"
10checkdepends="perl"
11# checkbashisms is the common accepted name, but prefix for rest
12subpackages="
13 $pkgname-doc
14 $pkgname-bash-completion
15 checkbashisms
16 $pkgname-hardening-check:harden
17 "
18source="$pkgname-$pkgver.tar.gz::https://salsa.debian.org/debian/devscripts/-/archive/v$pkgver/devscripts-v$pkgver.tar.gz"
19builddir="$srcdir/devscripts-v$pkgver/scripts"
20
21prepare() {
22 default_prepare
23
24 sed -i "s/###VERSION###/$pkgver/" checkbashisms.pl
25
26 mv checkbashisms.pl checkbashisms
27 mv hardening-check.pl hardening-check
28}
29
30check() {
31 printf '#!/bin/sh\necho "hello world"\n' > ./testfile
32 perl ./checkbashisms --version
33 perl ./checkbashisms ./testfile
34}
35
36package() {
37 depends="
38 checkbashisms=$pkgver-r$pkgrel
39 $pkgname-hardening-check=$pkgver-r$pkgrel
40 "
41
42 # only these useful for now
43 install -Dm755 -t "$pkgdir"/usr/bin/ \
44 checkbashisms \
45 hardening-check
46
47 install -Dm644 checkbashisms.1 \
48 -t "$pkgdir"/usr/share/man/man1/
49 install -Dm644 checkbashisms.bash_completion \
50 "$pkgdir"/usr/share/bash-completion/completions/checkbashisms
51}
52
53checkbashisms() {
54 pkgdesc="$pkgdesc (checkbashisms)"
55 depends="perl"
56
57 amove usr/bin/checkbashisms
58}
59
60harden() {
61 pkgdesc="$pkgdesc (hardening-check)"
62 depends="perl"
63
64 amove usr/bin/hardening-check
65}
66
67sha512sums="
6899f1e7581bdcd8a3ce42fcb6779b61d07b04d9c7d4dd4bc18418a76785fd801a306314573f9c664c415c96bdfdec69f04c95eff5e144803d2ee15a49b28c658c debian-devscripts-2.26.5.tar.gz
69"