blob: 59168eb3eb669b8032218b3ccd9b7b8658c31773 (
plain)
1 # Description: Secure Sockets Layer and Transport Layer Security tools
2 # URL: http://www.openssl.org/
3 # Maintainer: CRUX compat-32 Team, compat-32-ports at crux dot nu
4
5 name=openssl-32
6 version=1.0.2c
7 release=1
8 source=(http://www.openssl.org/source/openssl-$version.tar.gz
9 openssl-1.0.2a-32bit_x86_64.patch
10 openssl-1.0.2a-parallel-build.patch)
11
12 build() {
13 cd openssl-$version
14
15 # Make sure we only ever touch Makefile.org and avoid patching a file
16 # that gets blown away anyways by the Configure script
17 rm Makefile
18
19 patch -p1 -i $SRC/openssl-1.0.2a-32bit_x86_64.patch
20 patch -p1 -i $SRC/openssl-1.0.2a-parallel-build.patch
21
22 # Disable fips and man pages
23 sed \
24 -e '/DIRS/s| fips | |g' \
25 -e '/^install:/s|install_docs||' \
26 -i Makefile.org
27
28 ./Configure \
29 linux-x86_64-32 \
30 --prefix=/usr \
31 --libdir=/usr/lib32 \
32 --openssldir=/etc/ssl shared
33
34 # Clean out hardcoded flags
35 local CFLAG=$(grep ^CFLAG= Makefile | LC_ALL=C sed \
36 -e 's|^CFLAG=||' \
37 -e 's|-fomit-frame-pointer ||g' \
38 -e 's|-O[0-9] ||g' \
39 -e 's|-march=[-a-z0-9]* ||g' \
40 -e 's|-mcpu=[-a-z0-9]* ||g' \
41 -e 's|-m[a-z0-9]* ||g' \
42 )
43 sed \
44 -e "/^CFLAG/s|=.*|=${CFLAG} ${CFLAGS}|" \
45 -e "/^SHARED_LDFLAGS=/s|$| ${LDFLAGS}|" \
46 -i Makefile
47
48 make
49 make \
50 INSTALL_PREFIX=$PKG \
51 LIBDIR=lib32 \
52 MANDIR=/usr/man \
53 MANSUFFIX=ssl \
54 install
55
56 chmod -R +w $PKG
57 rm -r $PKG/usr/{bin,include,man} $PKG/etc
58 }
|