# Maintainer: Timo Teras pkgname=openssl pkgver=1.0.1m pkgrel=0 pkgdesc="Toolkit for SSL v2/v3 and TLS v1" url="http://openssl.org" depends= makedepends="perl zlib-dev" depends_dev="zlib-dev" arch="all" license="openssl" subpackages="$pkgname-dev $pkgname-doc libcrypto1.0:libcrypto libssl1.0:libssl" source="http://www.openssl.org/source/${pkgname}-${pkgver}.tar.gz 0001-fix-manpages.patch 0002-busybox-basename.patch 0003-use-termios.patch 0004-fix-default-ca-path-for-apps.patch 0005-fix-parallel-build.patch 0006-add-ircv3-tls-3.1-extension-support-to-s_client.patch 0007-reimplement-c_rehash-in-C.patch 0008-maintain-abi-compat-with-no-freelist-and-regular-bui.patch 0009-crypto-hmac-support-EVP_MD_CTX_FLAG_ONESHOT-and-set-.patch 0010-backport-changes-from-upstream-padlock-module.patch 0011-engines-e_padlock-implement-sha1-sha224-sha256-accel.patch 0012-crypto-engine-autoload-padlock-dynamic-engine.patch " _builddir="$srcdir"/$pkgname-$pkgver prepare() { cd "$_builddir" for patch in $source; do case $patch in *.patch) msg "Applying patch $patch" patch -p1 -i "$srcdir"/$patch || return 1 ;; esac done # force generate apps, due to c_rehash patch rm -rf "$_builddir"/apps/progs.h } build() { cd "$_builddir" ./config --prefix=/usr \ --libdir=lib \ --openssldir=/etc/ssl \ shared zlib enable-montasm enable-md2 \ -Wa,--noexecstack \ || return 1 make && make build-shared || return 1 } package() { cd "$_builddir" make -j1 INSTALL_PREFIX="$pkgdir" MANDIR=/usr/share/man install || return 1 # c_rehash compat link ln -sf openssl "$pkgdir"/usr/bin/c_rehash # rename man pages that conflict with man-pages local m for m in rand.3 err.3 threads.3 passwd.1; do mv "$pkgdir"/usr/share/man/man${m/*.}/$m \ "$pkgdir"/usr/share/man/man${m/*.}/openssl-$m \ || return 1 done } libcrypto() { pkgdesc="Crypto library from openssl" replaces="openssl libcrypto" 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/ } libssl() { pkgdesc="SSL shared libraries" replaces="openssl" mkdir -p "$subpkgdir"/lib "$subpkgdir"/usr/lib for i in "$pkgdir"/usr/lib/libssl*; do mv $i "$subpkgdir"/lib/ ln -s ../../lib/${i##*/} "$subpkgdir"/usr/lib/${i##*/} done } md5sums="d143d1555d842a069cb7cc34ba745a06 openssl-1.0.1m.tar.gz d0e8c6e64fef345fed08010915e12c73 0001-fix-manpages.patch 67bdfe450143a41042d2c318003e963a 0002-busybox-basename.patch 84c03f201f55ca7fbfde364cfdfc9cf4 0003-use-termios.patch 451efb6471e55a57064b73bfe6edddee 0004-fix-default-ca-path-for-apps.patch 99753d86ab1334ac61415d6152168e91 0005-fix-parallel-build.patch 5a5753f52b9f54f769f1ad915d0119bd 0006-add-ircv3-tls-3.1-extension-support-to-s_client.patch 106b2c7590d49a28c782cf3f5d623543 0007-reimplement-c_rehash-in-C.patch 7a2f9c883ecdfca3087062df4a68150a 0008-maintain-abi-compat-with-no-freelist-and-regular-bui.patch 25091afb907de2b504f8bad6bf70002c 0009-crypto-hmac-support-EVP_MD_CTX_FLAG_ONESHOT-and-set-.patch aa16c89b283faf0fe546e3f897279c44 0010-backport-changes-from-upstream-padlock-module.patch 57cca845e22c178c3b317010be56edf0 0011-engines-e_padlock-implement-sha1-sha224-sha256-accel.patch 2ac874d1249f5f68d8c7cd58d157d29a 0012-crypto-engine-autoload-padlock-dynamic-engine.patch" sha256sums="095f0b7b09116c0c5526422088058dc7e6e000aa14d22acca6a4e2babcdfef74 openssl-1.0.1m.tar.gz 75ce7e499e12f65db12181282198ab8172bd63265d6ec469b58680d74f8438c7 0001-fix-manpages.patch b449fb998b5f60a3a1779ac2f432b2c7f08ae52fc6dfa98bca37d735f863d400 0002-busybox-basename.patch c3e6a9710726dac72e3eeffd78961d3bae67a480f6bde7890e066547da25cdfd 0003-use-termios.patch d438a36b2b0adf342ebef4b5e9793bcdae3b3027061100f660749c322acbe93d 0004-fix-default-ca-path-for-apps.patch 722079e4c758b51c955d4e31befbd0b1f77193db91f8a6505e7a431626ce3218 0005-fix-parallel-build.patch 9baecc8024bd5004ef045c6c53537f7453029c1e273874ce639834145564ca6d 0006-add-ircv3-tls-3.1-extension-support-to-s_client.patch c934b5d1a2cb58b5235da2dfee423f0f66bb83e1d479f511b444751899637c37 0007-reimplement-c_rehash-in-C.patch 1030f885dc76f352854a7a95d73e68cfd1479c5f9ee198d6afef6b0755ee1c81 0008-maintain-abi-compat-with-no-freelist-and-regular-bui.patch 2eddcb7ab342285cb637ce6b6be143cca835f449f35dd9bb8c7b9167ba2117a7 0009-crypto-hmac-support-EVP_MD_CTX_FLAG_ONESHOT-and-set-.patch aee88a24622ce9d71e38deeb874e58435dcf8ff5690f56194f0e4a00fb09b260 0010-backport-changes-from-upstream-padlock-module.patch c10b8aaf56a4f4f79ca195fc587e0bb533f643e777d7a3e6fb0350399a6060ea 0011-engines-e_padlock-implement-sha1-sha224-sha256-accel.patch 2f7c850af078a3ae71b2dd38d5d0b3964ea4262e52673e36ff33498cc6223e6c 0012-crypto-engine-autoload-padlock-dynamic-engine.patch" sha512sums="f37b60cb4449674d5c06a4056acc3d11f1c9773da6111148fa3fbf8d14362ba1ff5eb5e0c0e06c2b5c84543b2b974584617e393ca83de2230cbbe69b52975afc openssl-1.0.1m.tar.gz 04baa895f0f8f893c3109e7eb03e019e6e6217b1c2a69dcee70f48907d63d83079e61ee54d21f1282c699d2fc8c7201905fda8dfc26f61f70a59d20892098cfb 0001-fix-manpages.patch 2244f46cb18e6b98f075051dd2446c47f7590abccd108fbab707f168a20cad8d32220d704635973f09e3b2879f523be5160f1ffbc12ab3900f8a8891dc855c5c 0002-busybox-basename.patch 58e42058a0c8086c49d681b1e226da39a8cf8cb88c51cf739dec2ff12e1bb5d7208ac5033264b186d58e9bdfe992fe9ddb95701d01caf1824396b2cefe30c0a4 0003-use-termios.patch 82340da695de51a8df9e76289ea1cbb9b3ad2f10d3b793b0d2155ddfce573d497ed1e35e68fdfea8e3b6c1007908698e1a5354041f9567175f2d480920d86f63 0004-fix-default-ca-path-for-apps.patch c8a393db2fef476f8c1fb7618e9231166f0a00fbdf3538f3eb0cf4095e751fbb671ce03a6dcab71461f936e2012332f5c0ec97c4163aa1dd2b9554b84995b2e3 0005-fix-parallel-build.patch 820d4ce1c222696fe3f1dd0d11815c06262ec230fdb174532fd507286667a0aefbf858ea5edac4245a54b950cd0556545ecd0c5cf494692a2ba131c667e7bcd5 0006-add-ircv3-tls-3.1-extension-support-to-s_client.patch fc4e383ec85c6543e4e82520904122a5a5601c68042ece1e95a0cae95e02d89174f06f78ba2f8aacae8df16052df6ec628b568519a41706428a3fa07984cc8e3 0007-reimplement-c_rehash-in-C.patch 17ad683bb91a3a3c5bcc456c8aed7f0b42414c6de06ebafa4753af93c42d9827c9978a43d4d53d741a45df7f7895c6f6163172af57cc7b391cfd15f45ce6c351 0008-maintain-abi-compat-with-no-freelist-and-regular-bui.patch 8c181760d7a149aa18d246d50f1c0438ffb63c98677b05306dfc00400ad0429b47d31e7c8d85126005c67f743d23e7a8a81174ffe98556f4caf9cf6b04d9ff17 0009-crypto-hmac-support-EVP_MD_CTX_FLAG_ONESHOT-and-set-.patch a3555440b5f544bfd6b9ad97557d8f4c1d673f6a35219f65056a72035d186be5f354717ddf9784899b602464d48657b090ade24379552d43af97609c0f48c389 0010-backport-changes-from-upstream-padlock-module.patch 6353c7a94016c20db5d683dde37775f6780952ecdb1a5f39f878d04ba37f6ad79ae10fb6d65d181d912505a5d1e22463004cd855d548b364c00b120da2b0fdbc 0011-engines-e_padlock-implement-sha1-sha224-sha256-accel.patch b72436eb8d4dac42d8da76a51d46cfc03e92e162f692a7a1761201221b9c6d66b738c08270b2260f02ce47b42043538474df73a7185dd4a809dd3b14cc8af7c3 0012-crypto-engine-autoload-padlock-dynamic-engine.patch"