Subject: [alpine-aports] [PATCH] testing/libressl: new aport

From: systmkor <[email-masked]>
Date: Wed, 31 Dec 2014 13:31:41 -0800

SSL/TLS protocol forked from OpenSSL by the OpenBSD community. This is
the Portable Edition.
http://www.libressl.org/
---
 testing/libressl/APKBUILD                      | 59 ++++++++++++++++++++++++++
 testing/libressl/libressl-dummy-rand-egd.patch | 29 +++++++++++++
 2 files changed, 88 insertions(+)
 create mode 100644 testing/libressl/APKBUILD
 create mode 100644 testing/libressl/libressl-dummy-rand-egd.patch

diff --git a/testing/libressl/APKBUILD b/testing/libressl/APKBUILD
new file mode 100644
index 0000000..c632b5c
--- /dev/null
+++ b/testing/libressl/APKBUILD
@@ -0,0 +1,59 @@
+# Contributor: Orion <[email-masked]>
+# Maintainer: Orion <[email-masked]>
+# Reference Material
+#   https://aur.archlinux.org/packages/li/libressl/PKGBUILD
+# Note
+#   I don't know if the libressl-dummy-rand-egd.patch is needed
+
+pkgname=libressl
+pkgver=2.1.2
+pkgrel=0
+pkgdesc="FREE version of the SSL/TLS protocol forked from OpenSSL - Portable edition"
+url="http://www.libressl.org/"
+arch="x86 x86_64"
+license="custom:OpenSSL"
+depends=""
+depends_dev=""
+makedepends="$depends_dev"
+install=""
+subpackages="$pkgname-dev $pkgname-doc"
+source="http://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-$pkgver.tar.gz"
+
+_builddir="$srcdir/$pkgname-$pkgver"
+prepare() {
+	local i
+	cd "$_builddir"
+	for i in $source; do
+		case $i in
+		*.patch) msg $i; patch -p1 -i "$srcdir"/$i || return 1;;
+		esac
+	done
+}
+
+build() {
+	cd "$_builddir"
+	./configure \
+		--build=$CBUILD \
+		--host=$CHOST \
+		--prefix=/usr \
+		--sysconfdir=/etc \
+		--mandir=/usr/share/man \
+		--infodir=/usr/share/info \
+		--localstatedir=/var \
+		|| return 1
+	make || return 1
+	make check
+}
+
+package() {
+	cd "$_builddir"
+	make DESTDIR="$pkgdir" install || return 1
+	rm -f "$pkgdir"/usr/lib/*.la
+	rename ".1" ".lssl" "$pkgdir"/usr/share/man/man1/*
+	rename ".3" ".3ssl" "$pkgdir"/usr/share/man/man3/*
+	install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING
+}
+
+md5sums="c979a977e3b54fbecfa762c74a631bc3  libressl-2.1.2.tar.gz"
+sha256sums="07c05f12e5d49dbfcf82dd23b6b4877b7cdb1c8e4c8dd27cb4d9e5758a6caf52  libressl-2.1.2.tar.gz"
+sha512sums="3c6f5165d7ab65e792fb065219723030aa84c7aa31b1a5712398dfaf04747c3dffaf11a4e864892b86433b3707e5007e309fb75a455652787c6ea2b3034de081  libressl-2.1.2.tar.gz"
diff --git a/testing/libressl/libressl-dummy-rand-egd.patch b/testing/libressl/libressl-dummy-rand-egd.patch
new file mode 100644
index 0000000..42ad5f8
--- /dev/null
+++ b/testing/libressl/libressl-dummy-rand-egd.patch
@@ -0,0 +1,29 @@
+--- libressl-2.0.0/crypto/rand/rand_lib.c	2014-07-11 19:41:26.000000000 +0200
++++ libressl-2.0.0/crypto/rand/rand_lib.c	2014-07-12 00:16:22.583713400 +0200
+@@ -98,3 +98,15 @@
+ 		arc4random_buf(buf, num);
+ 	return 1;
+ }
++
++int
++RAND_egd(const char *path)
++{
++	return -1;
++}
++
++int
++RAND_egd_bytes(const char *path, int bytes)
++{
++	return -1;
++}
+--- libressl-2.0.0/include/openssl/rand.h	2014-07-11 19:41:25.000000000 +0200
++++ libressl-2.0.0/include/openssl/rand.h	2014-07-12 00:08:44.893435315 +0200
+@@ -96,6 +96,8 @@
+ int  RAND_write_file(const char *file);
+ const char *RAND_file_name(char *file, size_t num);
+ int RAND_status(void);
++int RAND_egd(const char *path);
++int RAND_egd_bytes(const char *path,int bytes);
+ int RAND_poll(void);
+ 
+ /* BEGIN ERROR CODES */
-- 
2.2.1

---
Unsubscribe:  [email-masked]
Help:         [email-masked]
---