aboutsummaryrefslogtreecommitdiffstats
path: root/main/bearssl
diff options
context:
space:
mode:
authorLaurent Bercot <ska-devel@skarnet.org>2018-02-25 14:02:03 +0100
committerWilliam Pitcock <nenolod@dereferenced.org>2018-02-27 20:49:32 +0000
commit5e1e8b7c4c807ac2ca0bfe173943b5751025a862 (patch)
treebdb6fd07c8727eecb5de7d7435323c7ee73553f2 /main/bearssl
parent27f745096f932378c69ecbbe8844370f0c5cbd1c (diff)
downloadaports-5e1e8b7c4c807ac2ca0bfe173943b5751025a862.tar.bz2
aports-5e1e8b7c4c807ac2ca0bfe173943b5751025a862.tar.xz
main/bearssl: new APKBUILD (bearssl-0.5)
Diffstat (limited to 'main/bearssl')
-rw-r--r--main/bearssl/APKBUILD40
-rw-r--r--main/bearssl/bearssl-brssl-dynamic.patch13
2 files changed, 53 insertions, 0 deletions
diff --git a/main/bearssl/APKBUILD b/main/bearssl/APKBUILD
new file mode 100644
index 0000000000..b4867d3ad3
--- /dev/null
+++ b/main/bearssl/APKBUILD
@@ -0,0 +1,40 @@
+# Maintainer: Laurent Bercot <ska-devel@skarnet.org>
+# Contributor: Laurent Bercot <ska-devel@skarnet.org>
+pkgname=bearssl
+pkgver=0.5
+pkgrel=0
+pkgdesc="The BearSSL implementation of the SSL/TLS protocol"
+url="https://bearssl.org/"
+arch="all"
+license="MIT"
+subpackages="$pkgname-dev"
+source="https://bearssl.org/$pkgname-$pkgver.tar.gz bearssl-brssl-dynamic.patch"
+builddir="$srcdir/$pkgname-$pkgver"
+
+build() {
+ cd "$builddir"
+ make \
+ CC=gcc \
+ LD=gcc \
+ LDDLL=gcc \
+ LDDLLFLAGS="-shared -Wl,-soname,libbearssl.so.${pkgver%%.*}" \
+ D=".so.$pkgver"
+}
+
+package() {
+ mkdir -p -m 0755 -- "$pkgdir"/bin "$pkgdir"/lib "$pkgdir"/usr/include "$pkgdir"/usr/lib
+ cp -f "$builddir/build/brssl" "$pkgdir/bin/"
+ cp -f "$builddir"/inc/* "$pkgdir/usr/include/"
+ cp -f "$builddir/build/libbearssl.a" "$pkgdir/usr/lib/"
+ cp -f "$builddir/build/libbearssl.so.$pkgver" "$pkgdir/lib/"
+ ln -sf "libbearssl.so.$pkgver" "$pkgdir/lib/libbearssl.so.${pkgver%%.*}"
+ ln -sf "libbearssl.so.${pkgver%%.*}" "$pkgdir/lib/libbearssl.so"
+}
+
+check() {
+ cd "$builddir/build"
+ ./testx509 && ./testcrypto all
+}
+
+sha512sums="1bd510f62f36620cda5317509e72bd0c6f3538c30aca2695e80c26d1ea7270d174ed3fbb6d690b3ced5d51ce3f6bfc776d78a196492900296a452bc4c8185e45 bearssl-0.5.tar.gz
+f5fe047862eb355a662ccb1b95c2ca4a870ac0f8d3f4cada5396d2f6a6635647db53fbeb038f9a7651b84d6cda32b6415ce0f69a8da92636d3b3b76578114d5c bearssl-brssl-dynamic.patch"
diff --git a/main/bearssl/bearssl-brssl-dynamic.patch b/main/bearssl/bearssl-brssl-dynamic.patch
new file mode 100644
index 0000000000..e41bb138ee
--- /dev/null
+++ b/main/bearssl/bearssl-brssl-dynamic.patch
@@ -0,0 +1,13 @@
+--- bearssl-0.5.old/mk/Rules.mk
++++ bearssl-0.5/mk/Rules.mk
+@@ -49,8 +49,8 @@
+ $(BEARSSLDLL): $(OBJDIR) $(OBJ)
+ $(LDDLL) $(LDDLLFLAGS) $(LDDLLOUT)$(BEARSSLDLL) $(OBJ)
+
+-$(BRSSL): $(BEARSSLLIB) $(OBJBRSSL)
+- $(LD) $(LDFLAGS) $(LDOUT)$(BRSSL) $(OBJBRSSL) $(BEARSSLLIB)
++$(BRSSL): $(BEARSSLDLL) $(OBJBRSSL)
++ $(LD) $(LDFLAGS) $(LDOUT)$(BRSSL) $(OBJBRSSL) $(BEARSSLDLL)
+
+ $(TESTCRYPTO): $(BEARSSLLIB) $(OBJTESTCRYPTO)
+ $(LD) $(LDFLAGS) $(LDOUT)$(TESTCRYPTO) $(OBJTESTCRYPTO) $(BEARSSLLIB)