aboutsummaryrefslogtreecommitdiffstats
path: root/main/openssl/APKBUILD
blob: a9179f59fc9011203efa0e3e56e27e2f83020ae8 (plain) (blame)
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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=openssl
pkgver=0.9.8x
pkgrel=0
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
	openssl-0.9.8o-fix-manpages.patch
	openssl-bb-basename.patch
	0001-crypto-hmac-support-EVP_MD_CTX_FLAG_ONESHOT-and-set-.patch
	0002-apps-speed-fix-digest-speed-measurement-and-add-hmac.patch
	0003-engine-padlock-implement-sha1-sha224-sha256-accelera.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="ee17e9bc805c8cc7d0afac3b0ef78eda  openssl-0.9.8x.tar.gz
19615785a671129bae790478f073da2c  openssl-0.9.8o-fix-manpages.patch
c6a9857a5dbd30cead0404aa7dd73977  openssl-bb-basename.patch
5e5366fbc7c60c110dbcc603d2fb3a94  0001-crypto-hmac-support-EVP_MD_CTX_FLAG_ONESHOT-and-set-.patch
d193bee38f342b1eeb24bd0f444d15fa  0002-apps-speed-fix-digest-speed-measurement-and-add-hmac.patch
f920a35ac705a9ce0f44547f96441d77  0003-engine-padlock-implement-sha1-sha224-sha256-accelera.patch"