aboutsummaryrefslogtreecommitdiffstats
path: root/main/cryptsetup/APKBUILD
blob: f1b03fba1b3aec30b8870c12ff767bf7d88a9c18 (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: Natanael Copa <ncopa@alpinelinux.org>
pkgname=cryptsetup
pkgver=2.0.2
pkgrel=3
pkgdesc="Userspace setup tool for transparent encryption of block devices using the Linux 2.6 cryptoapi"
url="https://gitlab.com/cryptsetup/cryptsetup"
arch="all"
options="!checkroot"
license="GPL-2.0-or-later"
depends=""
makedepends_build=""
makedepends_host="lvm2-dev libressl-dev popt-dev util-linux-dev
	json-c-dev argon2-dev"
makedepends="$makedepends_build $makedepends_host"
checkdepends="device-mapper sharutils which bash"
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs"
source="https://www.kernel.org/pub/linux/utils/$pkgname/v${pkgver%.*}/$pkgname-$pkgver.tar.gz
	flush-stdout.patch
	libressl-2.7.patch
	dmcrypt.confd
	dmcrypt.initd
	"
builddir="$srcdir"/$pkgname-$pkgver

build() {
	cd "$builddir"
	./configure \
		--build="$CBUILD" \
		--host="$CHOST" \
		--prefix=/usr \
		--libdir=/lib \
		--sbindir=/sbin \
		--disable-static \
		--enable-libargon2 \
		--with-crypto_backend=openssl
	make
}

check() {
	cd "$builddir"
	make check
}

package() {
	cd "$builddir"
	make DESTDIR=$pkgdir install

	mkdir -p "$pkgdir"/usr/lib
	mv "$pkgdir"/lib/pkgconfig "$pkgdir"/usr/lib/

	install -Dm644 "$srcdir"/dmcrypt.confd "$pkgdir"/etc/conf.d/dmcrypt
	install -Dm755 "$srcdir"/dmcrypt.initd "$pkgdir"/etc/init.d/dmcrypt

	mkdir -p "$pkgdir"/usr/share/doc/$pkgname/
	install -m644 README TODO FAQ NEWS docs/v${pkgver}-ReleaseNotes \
		"$pkgdir"/usr/share/doc/$pkgname/
}

libs() {
	pkgdesc="Cryptsetup shared library"
	mkdir -p "$subpkgdir"
	mv "$pkgdir"/lib "$subpkgdir"/
}

sha512sums="a1a47320a608885acd43bd13f3c0160021c5f987e64de582f69d3bc35d444f5e65f8a4e2312118283ce8aa6c97322ec4ba279ae3aa7200e8046c4be70a492c2c  cryptsetup-2.0.2.tar.gz
301e3e3da5a899e0a6f01f44fbf37bb6a3f5b6a4fb41243bae6d3b7aea747276e784626cd1b19721cc264652c10ae8c560c4d20094e33bb82fb2fae0160682c0  flush-stdout.patch
7224bb46f1b09cd5bbf2f8c194e8b618432f8273bdc65470fdbe929dde2efa168c4e00eb7728d03dd1658902ded6ebbf13d9bcc6932a2d10c642aef0d148d37a  libressl-2.7.patch
74422d5e1614b43af894ea01da1ea80d805ec7f77981cbb80a6b1a4becad737a8825d7269812499095a7f50d39fa7da5bf4e4edae63529b1fe87b9176943a733  dmcrypt.confd
81dad61cdecf1dc529b26eb3cdc15979a582c876b01268f88e7a71c8fae6911137c03bfa63fee64e064e5fb31f673610be27ecab9fc432229f13e7040698bd5c  dmcrypt.initd"