aboutsummaryrefslogtreecommitdiffstats
path: root/main/cryptsetup/APKBUILD
blob: b765d8cf11a29c48774c68436731a58c26d900de (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
71
72
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=cryptsetup
pkgver=1.7.1
pkgrel=0
pkgdesc="Userspace setup tool for transparent encryption of block devices using the Linux 2.6 cryptoapi"
url="https://gitlab.com/cryptsetup/cryptsetup"
arch="all"
license="GPL2+"
depends=""
makedepends="lvm2-dev openssl-dev popt-dev util-linux-dev"
subpackages="$pkgname-dev $pkgname-doc $pkgname-libs"
source="https://www.kernel.org/pub/linux/utils/cryptsetup/v${pkgver%.*}/cryptsetup-$pkgver.tar.gz
	flush-stdout.patch
	dmcrypt.confd
	dmcrypt.initd
	"

_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
	cd "$_builddir"
	for i in $source; do
		case $i in
		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
		esac
	done
}

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

package() {
	cd "$_builddir"
	make DESTDIR=$pkgdir install || return 1
	mkdir -p "$pkgdir"/usr/lib
	mv "$pkgdir"/lib/pkgconfig "$pkgdir"/usr/lib/

        install -m644 -D "$srcdir"/dmcrypt.confd "$pkgdir"/etc/conf.d/dmcrypt \
		|| return 1
        install -m755 -D "$srcdir"/dmcrypt.initd "$pkgdir"/etc/init.d/dmcrypt \
		|| return 1

}

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

md5sums="27e5f1fab252ba607d8c5b73aa6d3ff5  cryptsetup-1.7.1.tar.gz
7d5c8727ea417cabe86df67a9de1de16  flush-stdout.patch
8a64af270190d5ecd6e4084d6ccf81de  dmcrypt.confd
058807d0516dec293d382ee27cc89fb8  dmcrypt.initd"
sha256sums="53725949aaf10635324c94bc3f6bbe85631db754938f3dc4e3ed9006e96f32ce  cryptsetup-1.7.1.tar.gz
6ac335bb14ff2f90de00769be20da4c5527101fab6593259a4d87be84904ae67  flush-stdout.patch
3d933a54abe62a547294b83208dbf5d7615d9c7f380d6504c91fff3620530803  dmcrypt.confd
a7a930cf14161a18c2ac6c3e7d4b2cf4ed03d9fcd77c89e7a6f6c60bad4bede8  dmcrypt.initd"
sha512sums="5b6459f3862b7a5b54c95e6ce6ebb493c380aadf3640b21cd85aec89f041790bc19693cebfc1068f78e85abd5e1d4a9f3aede94770841cc9fa60655a654f5dfa  cryptsetup-1.7.1.tar.gz
301e3e3da5a899e0a6f01f44fbf37bb6a3f5b6a4fb41243bae6d3b7aea747276e784626cd1b19721cc264652c10ae8c560c4d20094e33bb82fb2fae0160682c0  flush-stdout.patch
74422d5e1614b43af894ea01da1ea80d805ec7f77981cbb80a6b1a4becad737a8825d7269812499095a7f50d39fa7da5bf4e4edae63529b1fe87b9176943a733  dmcrypt.confd
81dad61cdecf1dc529b26eb3cdc15979a582c876b01268f88e7a71c8fae6911137c03bfa63fee64e064e5fb31f673610be27ecab9fc432229f13e7040698bd5c  dmcrypt.initd"