diff options
Diffstat (limited to 'libs_security/openssl/openssl.build')
-rwxr-xr-x | libs_security/openssl/openssl.build | 107 |
1 files changed, 107 insertions, 0 deletions
diff --git a/libs_security/openssl/openssl.build b/libs_security/openssl/openssl.build new file mode 100755 index 0000000..a25420d --- /dev/null +++ b/libs_security/openssl/openssl.build @@ -0,0 +1,107 @@ +#!/bin/bash +# +# Maintainer: Deposite Pirate <ofni.sknuplatem@etaripd> + +source /usr/src/ports/Build/build.sh + +NAME=openssl +VERSION=1.0.1g +BUILD=1 + +# These are the known patent issues with OpenSSL: +# name # expires +# RC5: 5,724,428 2015-03-03, not included. + +# Description + +cat > ${PKG}/install/slack-desc <<EOF +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. Line +# up the first '|' above the ':' following the base package name, and the '|' +# on the right side marks the last column you can put a character in. You must +# make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':'. + +$(padd)|-----handy-ruler------------------------------------------------------| +${NAME}: openssl (Secure Sockets Layer toolkit) +${NAME}: +${NAME}: The OpenSSL certificate management tool and the shared libraries that +${NAME}: provide various encryption and decryption algorithms and protocols. +${NAME}: +${NAME}: This product includes software developed by the OpenSSL Project for +${NAME}: use in the OpenSSL Toolkit (http://www.openssl.org). This product +${NAME}: includes cryptographic software written by Eric Young +${NAME}: (eay@cryptsoft.com). This product includes software written by Tim +${NAME}: Hudson (tjh@cryptsoft.com). +${NAME}: +EOF + +cat >> ${PKG}/install/doinst.sh <<EOF +#!/bin/sh + +config() { + NEW="\$1" + OLD="\$(dirname \$NEW)/\$(basename \$NEW .new)" + # If there's no config file by that name, mv it over: + if [ ! -r \$OLD ]; then + mv \$NEW \$OLD + elif [ "\$(cat \$OLD | md5sum)" = "\$(cat \$NEW | md5sum)" ]; then + # toss the redundant copy + rm \$NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} + +config etc/ssl/openssl.cnf.new +config etc/cron.daily/certwatch.new + +# Rehash certificates if the package is upgraded on a running system: + +if [ -x ${SYS_DIR[bin]}/c_rehash ]; then + ${SYS_DIR[bin]}/c_rehash 1> /dev/null 2> /dev/null +fi +EOF + +# $(uname -m) here is a kludge because we should take care of the arch stuff +# before we get to this point. I.e. ${ARCH} should work here. +case "$(uname -m)" in + x86) + OPENSSLTARGET="linux-elf" + OPTIONS="" + ;; + x86_64) + OPENSSLTARGET="linux-x86_64" + OPTIONS="enable-ec_nistp_64_gcc_128" + ;; +esac + +# Sources + +SRCNAME[0]=${NAME} +SRCVERS[0]=${VERSION} +SRCPACK[0]=http://www.openssl.org/source/${SRCNAME[0]}-${SRCVERS[0]}.tar.gz + +build0() +{ +sed -i 's|$(LIBDIR)/pkgconfig|$(PREFIX)/share/pkgconfig|g' Makefile.org +sed -i "s|@OPTFLAGS@|${FLAGS}|g" Configure +./Configure \ + --prefix="${SYS_DIR[usr]}" \ + --openssldir="${SYS_DIR[etc]}/ssl" \ + --libdir=lib \ + shared zlib-dynamic \ + no-rc5 no-mdc2 no-ec no-ec2m no-ecdh no-ecdsa no-srp no-sse2 \ + enable-md2 enable-tlsext enable-cms enable-rfc3779 ${OPTIONS} \ + "${OPENSSLTARGET}" +# ${JOBS} +make depend +make +make install INSTALL_PREFIX="${PKG}" MANDIR="${SYS_DIR[man]}" +doc ACKNOWLEDGMENTS FAQ +changelog NEWS +license LICENSE +install.dir ${PKG}${SYS_DIR[etc]}/cron.daily +install.bin certwatch ${PKG}${SYS_DIR[etc]}/cron.daily/certwatch.new +( cd ${PKG}${SYS_DIR[lib]} ; ldconfig -l lib*.so* ) +config ${PKG}${SYS_DIR[etc]}/ssl/openssl.cnf +} |