aboutsummaryrefslogtreecommitdiffstats
path: root/main/cryptsetup/APKBUILD
blob: 03b276bc99915954cb0cfb7c2b18e53fa7e3b66f (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
73
74
75
76
77
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=cryptsetup
pkgver=1.6.6
pkgrel=4
pkgdesc="Userspace setup tool for transparent encryption of block devices using the Linux 2.6 cryptoapi"
url="http://code.google.com/p/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
	strerror_r.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
	rm "$pkgdir"/lib/*.la || 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="24790bd4f4fa24570d7ea9af27ccf079  cryptsetup-1.6.6.tar.gz
7d5c8727ea417cabe86df67a9de1de16  flush-stdout.patch
b52c14f089d3256b481d202d0d0844bf  strerror_r.patch
1369aeaed84e41c8d585695596a24bd6  dmcrypt.confd
1cd8aea7f04bb9bc2c781b243e40d6b3  dmcrypt.initd"
sha256sums="38ccd1ceff41760ccfbaaa5394ebb6117d69bd0ea2e00bf07c0d1353c41be6ac  cryptsetup-1.6.6.tar.gz
6ac335bb14ff2f90de00769be20da4c5527101fab6593259a4d87be84904ae67  flush-stdout.patch
f95844d176b46c85dbe66bb7d929cfbc9f220bd41bc84b2a9047ad6e1dfdb559  strerror_r.patch
0c30e081c0b8f879964ae49735f10b05a1d92f4f481042851958860945e13271  dmcrypt.confd
0cc0a0e846d737c226877ccb3378af075f4b1bc40110333f577d84549306ac2e  dmcrypt.initd"
sha512sums="ce8ea9402f0eb9f3ab920df51837492802dd35394422ef4643a0eb82e6aad67cf72ac428b7caf622539af188f9fe5ba530f06b522f65ed55b0133c5c67ab2723  cryptsetup-1.6.6.tar.gz
301e3e3da5a899e0a6f01f44fbf37bb6a3f5b6a4fb41243bae6d3b7aea747276e784626cd1b19721cc264652c10ae8c560c4d20094e33bb82fb2fae0160682c0  flush-stdout.patch
c522c28b010d44fc8f14a8e997fd411505214c54b2c7070ed646e7ac0960dbfd0bbf450c9554361d8bdb45197812874ef14cb8508e00cf83601b05fc5bc2cd47  strerror_r.patch
d04ae17d3708ef20ade7afb223d4ef19e1b6812e0be8f9499e37e9c71344568b42030d9dd8f6918a9bfb211a3a94b40a9354e3b32a009cb165e84508d0a5e14b  dmcrypt.confd
e321ed6b2f5606325928a493930bd2ac9212cfef9565fa01491be33896fa3f27e8e9e828ace1cbfabef997bdcfe2635e283dd2697a1e926dd524360bb7f53ac0  dmcrypt.initd"