wok-next annotate openssl10/receipt @ rev 21020

Cleaning is almost finished... I should proceed to upgrades.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Fri Nov 02 14:15:08 2018 +0200 (2018-11-02)
parents f48456621a9d
children 65a6a7062c8e
rev   line source
al@20443 1 # SliTaz package receipt v2.
al@20443 2
al@20443 3 PACKAGE="openssl10"
erkan@20689 4 VERSION="1.0.2o"
al@20443 5 CATEGORY="security"
al@20443 6 SHORT_DESC="Open source Secure Sockets Layer"
al@20443 7 MAINTAINER="pascal.bellard@slitaz.org"
al@20443 8 LICENSE="BSD"
al@20443 9 WEB_SITE="https://www.openssl.org/"
al@21017 10 LFS="http://www.linuxfromscratch.org/blfs/view/svn/postlfs/openssl10.html"
al@20884 11 REPOLOGY="openssl"
al@20443 12
al@20443 13 TARBALL="openssl-$VERSION.tar.gz"
al@20443 14 WGET_URL="https://www.openssl.org/source/$TARBALL"
al@20443 15 # Integrity check: https://www.openssl.org/source/
erkan@20690 16 TARBALL_SHA256="ec3f5c9714ba0fd45cb4e087301eb1336c317e0d20b575a125050470e8089e4d"
al@20443 17
al@20443 18 BUILD_DEPENDS="perl zlib-dev"
al@21020 19 SPLIT="$PACKAGE-dev"
al@20443 20
al@20443 21 compile_rules() {
al@20443 22 # MAKEFLAGS make OpenSSL build fail.
al@20443 23 unset MAKEFLAGS MAKE_ARGS
al@20443 24
al@20443 25 # Add -Wa,--noexecstack here so that libcrypto's assembler modules will be
al@20443 26 # marked as not requiring an executable stack (compatibility improvement).
al@20443 27 case "$ARCH" in
al@20443 28 i?86) ARCH_ARGS='zlib-dynamic linux-elf';;
al@20443 29 x86_64) ARCH_ARGS='zlib-dynamic enable-ec_nistp_64_gcc_128 linux-x86_64';;
al@20443 30 esac
al@20443 31
al@20443 32 ./Configure \
al@20443 33 --prefix=/usr \
al@20443 34 --openssldir=/etc/ssl \
al@20443 35 --libdir=lib/openssl-1.0 \
al@20443 36 shared zlib enable-md2 no-ssl3-method $ARCH_ARGS \
al@20443 37 "-Wa,--noexecstack $CPPFLAGS $CFLAGS $LDFLAGS" &&
al@20443 38
al@20443 39 make depend &&
al@20443 40 make $MAKE_ARGS -j1 &&
al@20443 41 make \
al@20443 42 CC=${HOST_SYSTEM}-gcc \
al@20443 43 INSTALL_PREFIX=$install \
al@20443 44 install_sw || return 1
al@20443 45
al@20443 46 mv $install/usr/bin/openssl $install/usr/bin/openssl-1.0
al@20443 47
al@20443 48 mv $install/usr/lib/openssl-1.0/libcrypto.so.1.0.0 $install/usr/lib
al@20443 49 mv $install/usr/lib/openssl-1.0/libssl.so.1.0.0 $install/usr/lib
al@20443 50 ln -s ../libssl.so.1.0.0 $install/usr/lib/openssl-1.0
al@20443 51 ln -s ../libcrypto.so.1.0.0 $install/usr/lib/openssl-1.0
al@20443 52
al@20443 53 mkdir -p $install/usr/include/openssl-1.0
al@20443 54 mv $install/usr/include/openssl $install/usr/include/openssl-1.0
al@20443 55
al@20443 56 sed -i 's|/include$|/include/openssl-1.0|' \
al@20443 57 $install/usr/lib/openssl-1.0/pkgconfig/*.pc
al@20443 58
al@20443 59 rm -rf $install/etc $install/usr/bin/c_rehash
al@20443 60
al@20443 61 # change mode 0555 -> 0755
al@20443 62 find $install -type f -name '*.so*' -exec chmod 0755 '{}' \;
al@20443 63 }
al@20443 64
al@20443 65 testsuite() {
al@20443 66 readelf -h $install/usr/bin/openssl*
al@20443 67 }
al@20443 68
al@20443 69 genpkg_rules() {
al@20443 70 case $PACKAGE in
al@20443 71 openssl10)
al@20443 72 copy @std
al@20443 73 CAT="security|v. 1.0"
al@20443 74 TAGS="SSL security"
al@20443 75 ;;
al@20443 76 openssl10-dev)
al@20443 77 copy @dev
al@20443 78 CAT="development|v. 1.0 development files"
al@20443 79 ;;
al@20443 80 esac
al@20443 81 }