# Maintainer: Natanael Copa pkgname=openssl pkgver=0.9.8n pkgrel=1 pkgdesc="Toolkit for SSL v2/v3 and TLS v1" url=http://openssl.org depends= makedepends="perl" license="openssl" subpackages="$pkgname-dev $pkgname-doc libcrypto" source="http://www.openssl.org/source/${pkgname}-${pkgver}.tar.gz http://www.linuxfromscratch.org/patches/downloads/openssl/openssl-0.9.8g-fix_manpages-1.patch openssl-bb-basename.patch openssl-0.9.8k-padlock-sha.patch " _builddir="$srcdir"/$pkgname-$pkgver prepare() { cd "$_builddir" for i in ../*.patch; do msg "Applying $i..." patch -p1 -N < $i || return 1 done } build() { cd "$_builddir" ./config --prefix=/usr --openssldir=/etc/ssl shared enable-montasm make -j1 || return 1 } package() { cd "$_builddir" make -j1 INSTALL_PREFIX="$pkgdir" MANDIR=/usr/share/man install } libcrypto() { pkgdesc="Crypto library from openssl" replaces="openssl" mkdir -p "$subpkgdir"/lib "$subpkgdir"/usr/lib for i in "$pkgdir"/usr/lib/libcrypto*; do mv $i "$subpkgdir"/lib/ ln -s ../../lib/${i##*/} "$subpkgdir"/usr/lib/${i##*/} done mv "$pkgdir"/usr/lib/engines "$subpkgdir"/usr/lib/ } md5sums="076d8efc3ed93646bd01f04e23c07066 openssl-0.9.8n.tar.gz 04a6a88c2ee4badd4f8649792b73eaf3 openssl-0.9.8g-fix_manpages-1.patch c6a9857a5dbd30cead0404aa7dd73977 openssl-bb-basename.patch 86b7f1bf50e1f3ba407ec62001a51a0d openssl-0.9.8k-padlock-sha.patch"