# Contributor: Sören Tempel # Contributor: Orion # Maintainer: Orion pkgname=libressl pkgver=2.2.6 pkgrel=1 pkgdesc="version of the TLS/crypto stack forked from OpenSSL" url="http://www.libressl.org/" arch="all" license="custom" depends="$pkgname-libcrypto=$pkgver-r$pkgrel $pkgname-libssl=$pkgver-r$pkgrel" depends_dev="" makedepends="linux-headers" install="" replaces="openssl" subpackages="$pkgname-libcrypto $pkgname-libssl $pkgname-libtls $pkgname-dev $pkgname-doc" source="http://ftp.openbsd.org/pub/OpenBSD/LibreSSL/${pkgname}-${pkgver}.tar.gz" _builddir="$srcdir"/$pkgname-$pkgver prepare() { local i 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 \ --sysconfdir=/etc \ --mandir=/usr/share/man \ --localstatedir=/var \ || return 1 make || return 1 } package() { cd "$_builddir" make DESTDIR="$pkgdir" install || return 1 install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING } dev() { default_dev replaces="openssl-dev" } _libs() { pkgdesc="libressl $1 library" depends= mkdir -p "$subpkgdir"/lib "$subpkgdir"/usr/lib for i in "$pkgdir"/usr/lib/$1.so.*; do mv $i "$subpkgdir"/lib/ ln -s ../../lib/${i##*/} "$subpkgdir"/usr/lib/${i##*/} done } libcrypto() { _libs libcrypto; } libssl() { _libs libssl; } libtls() { _libs libtls; } md5sums="d91d57161bcf40b22f78190224c4f028 libressl-2.2.6.tar.gz" sha256sums="1ee19994cffd047d40f63ba149115dba18a681b0cc923beec301bf424b58d64f libressl-2.2.6.tar.gz" sha512sums="41e29431ad9e8b18e2dbc30fe9df1d7be3ca372d5d7757b5b01f8904515bafd5333446957fbc9874f64f384dae56cf6bf29d6808a7c0df1836b55ea64804a4bf libressl-2.2.6.tar.gz"