aboutsummaryrefslogtreecommitdiffstats
path: root/testing/outils/APKBUILD
blob: b72000fd04b1cb0a9fb2b4379788868d81070ae4 (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Maintainer: Sören Tempel <soeren+alpine@soeren-tempel.net>
pkgname=outils
pkgver=0.4.1
pkgrel=0
pkgdesc="Port of some non-standard OpenBSD tools to Linux"
url="https://github.com/chneukirchen/outils"
arch="all"
license="BSD ISC"
depends=""
depends_dev=""
makedepends="openssl-dev linux-headers"
install=""
subpackages="$pkgname-doc
	$pkgname-sha256:_tool
	$pkgname-lndir:_tool
	$pkgname-rdate:_tool
	$pkgname-calendar:_tool
	$pkgname-lam:_tool
	$pkgname-what:_tool
	$pkgname-rs:_tool
	$pkgname-unvis:_tool
	$pkgname-gzsig:_tool
	$pkgname-md5:_tool
	$pkgname-sha1:_tool
	$pkgname-apply:_tool
	$pkgname-sha512:_tool
	$pkgname-vis:_tool
	$pkgname-signify:_tool
	$pkgname-jot:_tool
	$pkgname-cksum:_tool"
source="$pkgname-$pkgver.tar.gz::https://github.com/chneukirchen/$pkgname/archive/v$pkgver.tar.gz"

_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
	find "$_builddir"/src -type f -exec sed -i \{\} -e "s;u_int;uint;g" \
		-e "s;u_char;uint8_t;g" \; || return 1
	sed -i "$_builddir"/src/liboutils/sha1.c \
		-e "s;uint i;uint32_t i;" || return 1
}

build() {
	make CC="$CC" CFLAGS="$CFLAGS" \
		-C "$_builddir" || return 1
}

package() {
	make DESTDIR="$pkgdir" install \
		-C "$_builddir" || return 1
}

_tool() {
	local name=$(echo $subpkgname | cut -d '-' -f2)
	pkgdesc="$name tool from $pkgname"

	if [ name = "cksum" ]; then
		depends="!coreutils $depends"
	fi

	mkdir -p "$subpkgdir"/usr/bin
	mv "$pkgdir"/usr/bin/$name \
		"$subpkgdir"/usr/bin/$name || return 1

	rmdir "$pkgdir"/usr/bin/ 2>/dev/null || true
	rmdir "$pkgdir"/usr/ 2>/dev/null || true
}

md5sums="2b5e8d73f9a7834537ad2d0fba432678  outils-0.4.1.tar.gz"
sha256sums="8ec18ac1864190061fe7c033131a804f08b9323bc7195b84c0893f78cf2f32b2  outils-0.4.1.tar.gz"
sha512sums="469d8b3d1fbff9a3fcb7d844662949e72ebb07e7c9fe2a9cca3deeeb903a76399473469566b7dd3788015b2074c5c2a5708cff315fc16ba953d85f8a2aae6c6e  outils-0.4.1.tar.gz"