aboutsummaryrefslogtreecommitdiffstats
path: root/main/cryptsetup/APKBUILD
blob: a244a3617e84b8f623ab0f55646553cd3f537902 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=cryptsetup
pkgver=1.6.6
pkgrel=3
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 !libiconv-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
	"

_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/
}

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"
sha256sums="38ccd1ceff41760ccfbaaa5394ebb6117d69bd0ea2e00bf07c0d1353c41be6ac  cryptsetup-1.6.6.tar.gz
6ac335bb14ff2f90de00769be20da4c5527101fab6593259a4d87be84904ae67  flush-stdout.patch
f95844d176b46c85dbe66bb7d929cfbc9f220bd41bc84b2a9047ad6e1dfdb559  strerror_r.patch"
sha512sums="ce8ea9402f0eb9f3ab920df51837492802dd35394422ef4643a0eb82e6aad67cf72ac428b7caf622539af188f9fe5ba530f06b522f65ed55b0133c5c67ab2723  cryptsetup-1.6.6.tar.gz
301e3e3da5a899e0a6f01f44fbf37bb6a3f5b6a4fb41243bae6d3b7aea747276e784626cd1b19721cc264652c10ae8c560c4d20094e33bb82fb2fae0160682c0  flush-stdout.patch
c522c28b010d44fc8f14a8e997fd411505214c54b2c7070ed646e7ac0960dbfd0bbf450c9554361d8bdb45197812874ef14cb8508e00cf83601b05fc5bc2cd47  strerror_r.patch"