# Maintainer: Natanael Copa pkgname=cryptsetup pkgver=1.6.6 pkgrel=0 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 " _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" sha256sums="38ccd1ceff41760ccfbaaa5394ebb6117d69bd0ea2e00bf07c0d1353c41be6ac cryptsetup-1.6.6.tar.gz" sha512sums="ce8ea9402f0eb9f3ab920df51837492802dd35394422ef4643a0eb82e6aad67cf72ac428b7caf622539af188f9fe5ba530f06b522f65ed55b0133c5c67ab2723 cryptsetup-1.6.6.tar.gz"