Skip to content

Commit

Permalink
New package: libtls-3.2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
leahneukirchen authored and Johnnynator committed Mar 5, 2021
1 parent 47733b8 commit 5d5c473
Show file tree
Hide file tree
Showing 4 changed files with 98 additions and 0 deletions.
1 change: 1 addition & 0 deletions srcpkgs/libressl-netcat
1 change: 1 addition & 0 deletions srcpkgs/libtls-devel
95 changes: 95 additions & 0 deletions srcpkgs/libtls/template
@@ -0,0 +1,95 @@
# Template file for 'libtls'
pkgname=libtls
version=3.2.4
revision=1
wrksrc="libressl-${version}"
build_style=gnu-configure
#configure_args="$(vopt_enable asm)"
short_desc="Version of the TLS/crypto stack forked from OpenSSL"
maintainer="Leah Neukirchen <leah@vuxu.org>"
license="OpenSSL, ISC"
homepage="http://www.libressl.org/"
changelog="https://raw.githubusercontent.com/libressl-portable/portable/master/ChangeLog"
distfiles="http://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-${version}.tar.gz"
checksum=ac1dbb9e05a64910856599b1ac61118fdec1b3d0c700e42444d81c0d5f507a5a
_lssl_asm_ver="1.2.0"
replaces="libtls20>0"

build_options="asm"
desc_option_asm="Use platform assembly for faster crypto"

if [ "$build_option_asm" ]; then
distfiles+=" https://github.com/q66/libressl-portable-asm/archive/v${_lssl_asm_ver}.tar.gz"
checksum+=" e1c76178c4deb1cd20a0cd7ba553d6607f8131acb2e0844223f797e42f0d6f60"
fi

# only enable asm for full chroots by default
# otherwise we'd be introducing an autotools dependency on the host
if [ "$CHROOT_READY" ]; then
build_options_default="asm"
fi

case "$XBPS_TARGET_MACHINE" in
# disable ssp
i686-musl) configure_args+=" --disable-hardening";;
# on armv5 always disable asm as it's not supported
armv5*) configure_args+=" --disable-asm";;
esac

if [ "$CROSS_BUILD" -o "$build_option_asm" ]; then
_regen_build=yes
fi

if [ -n "$_regen_build" ]; then
hostmakedepends=" automake libtool"
fi

post_extract() {
[ -z "$build_option_asm" ] && return 0
mv ../libressl-portable-asm-${_lssl_asm_ver} .
}

pre_configure() {
[ -z "$_regen_build" ] && return 0
if [ "$build_option_asm" ]; then
./libressl-portable-asm-${_lssl_asm_ver}/patch_libressl.sh .
fi
autoreconf -if
}

do_install() {
make -C tls install DESTDIR="$DESTDIR"
make -C apps/nc install DESTDIR="$DESTDIR"
}

post_install() {
vlicense COPYING
if [ "$build_option_asm" ]; then
vlicense libressl-portable-asm-${_lssl_asm_ver}/LICENSE.cryptogams
vlicense libressl-portable-asm-${_lssl_asm_ver}/LICENSE.openssl
fi
#find ${DESTDIR}/usr/share/man/man1 -type f ! -name openssl.1 -delete
}

libtls-devel_package() {
short_desc+=" - development files"
depends="libtls-${version}_${revision}"
pkg_install() {
vinstall include/tls.h 644 usr/include
vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
vinstall libtls.pc 644 usr/lib/pkgconfig
for m in man/tls_*; do vman $m; done
}
}

libressl-netcat_package() {
short_desc="TCP/IP swiss army knife (LibreSSL variant)"
alternatives="
nc:nc:/usr/bin/libressl-nc
nc:nc.1:/usr/share/man/man1/libressl-nc.1"
pkg_install() {
vbin apps/nc/.libs/nc libressl-nc
vman apps/nc/nc.1 libressl-nc.1
}
}
1 change: 1 addition & 0 deletions srcpkgs/libtls/update
@@ -0,0 +1 @@
ignore="*.0 *.1"

0 comments on commit 5d5c473

Please sign in to comment.