diff options
author | Patrick J Volkerding <volkerdi@slackware.com> | 2018-05-28 19:12:29 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2018-05-31 23:39:35 +0200 |
commit | 646a5c1cbfd95873950a87b5f75d52073a967023 (patch) | |
tree | b8b8d2ab3b0d432ea69ad1a64d1c789649d65020 /source/n/openssl/openssl.SlackBuild | |
parent | d31c50870d0bee042ce660e445c9294a59a3a65b (diff) | |
download | current-646a5c1cbfd95873950a87b5f75d52073a967023.tar.gz |
Mon May 28 19:12:29 UTC 201820180528191229
a/pkgtools-15.0-noarch-13.txz: Rebuilt.
installpkg: default line length for --terselength is the number of columns.
removepkg: added --terse mode.
upgradepkg: default line length for --terselength is the number of columns.
upgradepkg: accept -option in addition to --option.
ap/vim-8.1.0026-x86_64-1.txz: Upgraded.
d/bison-3.0.5-x86_64-1.txz: Upgraded.
e/emacs-26.1-x86_64-1.txz: Upgraded.
kde/kopete-4.14.3-x86_64-8.txz: Rebuilt.
Recompiled against libidn-1.35.
n/conntrack-tools-1.4.5-x86_64-1.txz: Upgraded.
n/libnetfilter_conntrack-1.0.7-x86_64-1.txz: Upgraded.
n/libnftnl-1.1.0-x86_64-1.txz: Upgraded.
n/links-2.16-x86_64-2.txz: Rebuilt.
Rebuilt to enable X driver for -g mode.
n/lynx-2.8.9dev.19-x86_64-1.txz: Upgraded.
n/nftables-0.8.5-x86_64-1.txz: Upgraded.
n/p11-kit-0.23.11-x86_64-1.txz: Upgraded.
n/ulogd-2.0.7-x86_64-1.txz: Upgraded.
n/whois-5.3.1-x86_64-1.txz: Upgraded.
xap/network-manager-applet-1.8.12-x86_64-1.txz: Upgraded.
xap/vim-gvim-8.1.0026-x86_64-1.txz: Upgraded.
Diffstat (limited to 'source/n/openssl/openssl.SlackBuild')
-rwxr-xr-x | source/n/openssl/openssl.SlackBuild | 95 |
1 files changed, 69 insertions, 26 deletions
diff --git a/source/n/openssl/openssl.SlackBuild b/source/n/openssl/openssl.SlackBuild index 00b80226..c5ecb829 100755 --- a/source/n/openssl/openssl.SlackBuild +++ b/source/n/openssl/openssl.SlackBuild @@ -1,8 +1,8 @@ -#!/bin/sh +#!/bin/bash # Copyright 2000 BSDi, Inc. Concord, CA, USA # Copyright 2001, 2002 Slackware Linux, Inc. Concord, CA, USA -# Copyright 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 Patrick J. Volkerding, Sebeka, MN, USA +# Copyright 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015, 2018 Patrick J. Volkerding, Sebeka, MN, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -22,13 +22,13 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - # Set initial variables: -CWD=$(pwd) +cd $(dirname $0) ; CWD=$(pwd) TMP=${TMP:-/tmp} +PKGNAM=openssl VERSION=${VERSION:-$(echo openssl-*.tar.gz | rev | cut -f 3- -d . | cut -f 1 -d - | rev)} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} # Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then @@ -45,6 +45,15 @@ PKG2=$TMP/package-ossllibs NAME1=openssl-$VERSION-$ARCH-$BUILD NAME2=openssl-solibs-$VERSION-$ARCH-$BUILD +# If the variable PRINT_PACKAGE_NAME is set, then this script will report what +# the name of the created package would be, and then exit. This information +# could be useful to other scripts. +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "${NAME1}.txz" + echo "${NAME2}.txz" + exit 0 +fi + # Parallel build doesn't link properly. #NUMJOBS=${NUMJOBS:--j6} @@ -60,8 +69,9 @@ cd openssl-$VERSION # Fix pod syntax errors which are fatal wih a newer perl: find . -name "*.pod" -exec sed -i "s/^\=item \([0-9]\)\(\ \|$\)/\=item C<\1>/g" {} \; -# Use .so.1, not .so.1.0.0: -sed -i "s/soname=\$\$SHLIB\$\$SHLIB_SOVER\$\$SHLIB_SUFFIX/soname=\$\$SHLIB.1/g" Makefile.shared +## For openssl-1.1.x, don't try to change the soname. +## Use .so.1, not .so.1.0.0: +#sed -i "s/soname=\$\$SHLIB\$\$SHLIB_SOVER\$\$SHLIB_SUFFIX/soname=\$\$SHLIB.1/g" Makefile.shared if [ "$ARCH" = "i586" ]; then # Build with -march=i586 -mtune=i686: @@ -75,19 +85,23 @@ elif [ "$ARCH" = "x86_64" ]; then LIBDIRSUFFIX="64" fi +# Fix a lack of quotes in two c_rehash lines: +zcat $CWD/openssl-1.1.0h.fix_c_rehash_quoting.diff.gz | patch -p1 --verbose || exit 1 + # OpenSSL has a (nasty?) habit of bumping the internal version number with # every release. This wouldn't be so bad, but some applications are so # paranoid that they won't run against a different OpenSSL version than # what they were compiled against, whether or not the ABI has changed. # -# So, we will use the OPENSSL_VERSION_NUMBER from openssl-1.0.2e unless ABI +# So, we will use the OPENSSL_VERSION_NUMBER from openssl-1.1.0h unless ABI # breakage forces it to change. Yes, we're finally using this old trick. :) -sed -i "s/#define OPENSSL_VERSION_NUMBER.*/\/* Use 0x1000205fL (1.0.2e) below to avoid pointlessly breaking the ABI *\/\n#define OPENSSL_VERSION_NUMBER 0x1000205fL/g" crypto/opensslv.h || exit 1 +sed -i "s/#define OPENSSL_VERSION_NUMBER.*/\/* Use 0x1010008fL (1.1.0h) below to avoid pointlessly breaking the ABI *\/\n#define OPENSSL_VERSION_NUMBER 0x1000205fL/g" include/openssl/opensslv.h || exit 1 chown -R root:root . mkdir -p $PKG1/usr/doc/openssl-$VERSION -cp -a CHANGES CHANGES.SSLeay FAQ INSTALL INSTALL.MacOS INSTALL.VMS INSTALL.W32 \ - LICENSE NEWS README README.ENGINE doc $PKG1/usr/doc/openssl-$VERSION +cp -a ACKNOWLEDGEMENTS AUTHORS CHANGES* CONTRIBUTING FAQ INSTALL* \ + LICENSE* NEWS NOTES* README* doc \ + $PKG1/usr/doc/openssl-$VERSION find $PKG1/usr/doc/openssl-$VERSION -type d -exec chmod 755 {} \; find $PKG1/usr/doc/openssl-$VERSION -type f -exec chmod 644 {} \; @@ -103,7 +117,6 @@ fi # name # expires # MDC-2: 4,908,861 2007-03-13, not included. # IDEA: 5,214,703 2010-05-25, not included. -# RC5: 5,724,428 2015-03-03, not included. # # Although all of the above are expired, it's still probably # not a good idea to include them as there are better @@ -112,19 +125,33 @@ fi ./config \ --prefix=/usr \ --openssldir=/etc/ssl \ + zlib \ + enable-camellia \ + enable-seed \ + enable-rfc3779 \ + enable-cms \ + enable-md2 \ + enable-rc5 \ + enable-ssl3 \ + enable-ssl3-method \ + no-weak-ssl-ciphers \ no-mdc2 \ + no-ec2m \ no-idea \ - no-rc5 \ no-sse2 \ - no-ssl2 \ - no-weak-ssl-ciphers \ shared make $NUMJOBS depend || make depend || exit 1 make $NUMJOBS || make || exit 1 -make install INSTALL_PREFIX=$PKG1 || exit 1 +make install DESTDIR=$PKG1 || exit 1 + +# No thanks on the static libraries: +rm -f $PKG1/usr/lib${LIBDIRSUFFIX}/*.a + +# No thanks on manpages duplicated as html: +rm -rf $PKG1/usr/share/doc # Make the .so.? library symlinks: ( cd $PKG1/usr/lib${LIBDIRSUFFIX} ; ldconfig -l lib*.so.* ) @@ -146,17 +173,33 @@ mkdir -p $PKG1/etc/cron.daily zcat $CWD/certwatch.gz > $PKG1/etc/cron.daily/certwatch.new chmod 755 $PKG1/etc/cron.daily/certwatch.new +# Make config file non-clobber: mv $PKG1/etc/ssl/openssl.cnf $PKG1/etc/ssl/openssl.cnf.new +# Remove duplicate config file: +rm -f $PKG1/etc/ssl/openssl.cnf.dist + ( cd $PKG1 find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null ) -mv $PKG1/etc/ssl/man $PKG1/usr -( cd $PKG1/usr/man/man1 ; mv passwd.1 ssl_passwd.1 ) -( cd $PKG1/usr/man/man3 ; mv rand.3 ssl_rand.3 ) -( cd $PKG1/usr/man/man3 ; mv err.3 ssl_err.3 ) +# Relocate the manpages: +mv $PKG1/usr/share/man $PKG1/usr +rmdir $PKG1/usr/share + +# Fix manpage name collisions, and relink anything that linked to the old name: +( cd $PKG1/usr/man/man1 + mv passwd.1 ssl_passwd.1 + for file in *.1 ; do + if [ -L $file ]; then + if [ "$(readlink $file)" = "passwd.1" ]; then + rm -f $file + ln -sf ssl_passwd.1 $file + fi + fi + done ) + # Compress and symlink the man pages: if [ -d $PKG1/usr/man ]; then ( cd $PKG1/usr/man @@ -172,18 +215,18 @@ if [ -d $PKG1/usr/man ]; then ) fi -# If there's an openssl0 directory, then build openssl-0 shared libraries for +# If there's an openssl1 directory, then build openssl-1.0 shared libraries for # compatibility with programs linked to those: -if [ -d $CWD/openssl0 ]; then - ( cd $CWD/openssl0 - ./openssl0.build || exit 1 +if [ -d $CWD/openssl1 ]; then + ( cd $CWD/openssl1 + ./openssl1.build || exit 1 ) || exit 1 # Don't put these in the openssl package... openssl-solibs is enough. #mkdir -p $PKG1/lib${LIBDIRSUFFIX} - #cp -a $TMP/package-openssl0/usr/lib/lib*.so.?.?.? $PKG1/lib${LIBDIRSUFFIX} + #cp -a $TMP/package-openssl1/usr/lib/lib*.so.?.?.? $PKG1/lib${LIBDIRSUFFIX} #( cd $PKG1/lib${LIBDIRSUFFIX} ; ldconfig -l lib*.so.?.?.? ) mkdir -p $PKG2/lib${LIBDIRSUFFIX} - cp -a $TMP/package-openssl0/usr/lib/lib*.so.?.?.? $PKG2/lib${LIBDIRSUFFIX} + cp -a $TMP/package-openssl1/usr/lib${LIBDIRSUFFIX}/lib*.so.?.?.? $PKG2/lib${LIBDIRSUFFIX} ( cd $PKG2/lib${LIBDIRSUFFIX} ; ldconfig -l lib*.so.?.?.? ) fi |