APKBUILD 1.71 KB
Newer Older
1
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
Natanael Copa's avatar
Natanael Copa committed
2
pkgname=openssl
Timo Teräs's avatar
Timo Teräs committed
3
pkgver=0.9.8r
4
pkgrel=0
5
pkgdesc="Toolkit for SSL v2/v3 and TLS v1"
Natanael Copa's avatar
Natanael Copa committed
6
url=http://openssl.org
7
depends=
Natanael Copa's avatar
Natanael Copa committed
8
makedepends="perl"
9
license="openssl"
10

11
subpackages="$pkgname-dev $pkgname-doc libcrypto"
12

Natanael Copa's avatar
Natanael Copa committed
13
source="http://www.openssl.org/source/${pkgname}-${pkgver}.tar.gz
Natanael Copa's avatar
Natanael Copa committed
14
	openssl-0.9.8o-fix-manpages.patch
Natanael Copa's avatar
Natanael Copa committed
15
	openssl-bb-basename.patch
16 17 18
	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
Natanael Copa's avatar
Natanael Copa committed
19
	"
20 21 22 23

_builddir="$srcdir"/$pkgname-$pkgver
prepare() {
	cd "$_builddir"
24 25
	for i in ../*.patch; do
		msg "Applying $i..."
26
		patch -p1 -N < $i || return 1
27
	done
28
}
Natanael Copa's avatar
Natanael Copa committed
29

30 31
build() {
	cd "$_builddir"
32
	./config --prefix=/usr --openssldir=/etc/ssl shared enable-montasm
Natanael Copa's avatar
Natanael Copa committed
33 34

	make -j1 || return 1
35 36 37 38
}

package() {
	cd "$_builddir"
39
	make -j1 INSTALL_PREFIX="$pkgdir" MANDIR=/usr/share/man install
Natanael Copa's avatar
Natanael Copa committed
40 41
}

42 43
libcrypto() {
	pkgdesc="Crypto library from openssl"
44
	replaces="openssl"
45
	mkdir -p "$subpkgdir"/lib "$subpkgdir"/usr/lib
46 47 48 49
	for i in "$pkgdir"/usr/lib/libcrypto*; do
		mv $i "$subpkgdir"/lib/
		ln -s ../../lib/${i##*/} "$subpkgdir"/usr/lib/${i##*/}
	done
50 51 52
	mv "$pkgdir"/usr/lib/engines "$subpkgdir"/usr/lib/
}

Timo Teräs's avatar
Timo Teräs committed
53
md5sums="0352932ea863bc02b056cda7c9ac5b79  openssl-0.9.8r.tar.gz
Natanael Copa's avatar
Natanael Copa committed
54
19615785a671129bae790478f073da2c  openssl-0.9.8o-fix-manpages.patch
55
c6a9857a5dbd30cead0404aa7dd73977  openssl-bb-basename.patch
56
2f370b846d8f27ac45dd6e5341366e16  0001-crypto-hmac-support-EVP_MD_CTX_FLAG_ONESHOT-and-set-.patch
57
9ba0ecf53f8b60ff8703a1ffe5b3e701  0002-apps-speed-fix-digest-speed-measurement-and-add-hmac.patch
58
e262418b20a05c2af12d464ac194ea21  0003-engine-padlock-implement-sha1-sha224-sha256-accelera.patch"