compat-32/openssl-32/Pkgfile
2014-11-08 15:24:24 +11:00

62 lines
1.4 KiB
Plaintext

# Description: Secure Sockets Layer and Transport Layer Security tools
# URL: http://www.openssl.org/
# Maintainer: CRUX compat-32 Team, compat-32-ports at crux dot nu
name=openssl-32
version=1.0.1j
release=1
source=(http://www.openssl.org/source/openssl-$version.tar.gz
openssl-1.0.1c-32bit_x86_64-1.patch
openssl-1.0.1e-fix_parallel_build-1.patch)
# Patches from
# http://svn.cross-lfs.org/svn/repos/patches/openssl/
build() {
cd openssl-$version
# Make sure we only ever touch Makefile.org and avoid patching a file
# that gets blown away anyways by the Configure script
rm Makefile
patch -p1 -i $SRC/openssl-1.0.1c-32bit_x86_64-1.patch
patch -p1 -i $SRC/openssl-1.0.1e-fix_parallel_build-1.patch
# Disable fips and man pages
sed \
-e '/DIRS/s| fips | |g' \
-e '/^install:/s|install_docs||' \
-i Makefile.org
./Configure \
linux-x86_64-32 \
--prefix=/usr \
--libdir=/usr/lib32 \
--openssldir=/etc/ssl shared
# Clean out hardcoded flags
local CFLAG=$(grep ^CFLAG= Makefile | LC_ALL=C sed \
-e 's|^CFLAG=||' \
-e 's|-fomit-frame-pointer ||g' \
-e 's|-O[0-9] ||g' \
-e 's|-march=[-a-z0-9]* ||g' \
-e 's|-mcpu=[-a-z0-9]* ||g' \
-e 's|-m[a-z0-9]* ||g' \
)
sed \
-e "/^CFLAG/s|=.*|=${CFLAG} ${CFLAGS}|" \
-e "/^SHARED_LDFLAGS=/s|$| ${LDFLAGS}|" \
-i Makefile
make
make \
INSTALL_PREFIX=$PKG \
LIBDIR=lib32 \
MANDIR=/usr/man \
MANSUFFIX=ssl \
install
chmod -R +w $PKG
rm -r $PKG/usr/{bin,include,man} $PKG/etc
}