imported mbedtls

This commit is contained in:
gnastyle 2015-07-03 11:53:40 +02:00
parent 09acba9874
commit f90e48b4ed
2 changed files with 56 additions and 0 deletions

34
mbedtls/PKGBUILD Normal file
View File

@ -0,0 +1,34 @@
# Arch contribution https://www.archlinux.org/packages/community/x86_64/mbedtls/
pkgname=mbedtls
pkgver=1.3.11
pkgrel=1
pkgdesc="Portable cryptographic and SSL/TLS library, aka polarssl"
arch=('x86_64')
url="https://tls.mbed.org"
license=('Apache')
depends=('glibc')
options=('staticlibs')
source=("https://tls.mbed.org/download/mbedtls-$pkgver-gpl.tgz"
"programs.makefile.patch")
sha512sums=('242c486becc34d3b7ebba7624686aea6ed7713033aeabbfae7227284df322f191ddd5b9ded1228f100cd50bcfafb12396d93c30420afd3feb979b52a1860551e'
'e77310e9bdd8b152838eaaf3bfc2e9fe42ab00945772d6102577062e69cd7de0992753eebcb3ae720eae2b6a2b63a02310db165a950151aaba64bbc52fd78dcf')
build() {
cd "$pkgname-$pkgver"
sed -i 's|//\(#define POLARSSL_THREADING_C\)|\1|' include/polarssl/config.h
sed -i 's|//\(#define POLARSSL_THREADING_PTHREAD\)|\1|' include/polarssl/config.h
# enable cert_write
patch -p1 -d programs -i "$srcdir/programs.makefile.patch"
LDFLAGS+=" -I../include " make SHARED=1 no_test
}
check() {
cd "$pkgname-$pkgver"
make SHARED=1 check
}
package() {
cd "$pkgname-$pkgver"
make DESTDIR="$pkgdir/usr" install
}

View File

@ -0,0 +1,22 @@
--- programs/Makefile 2014-07-31 12:20:17.748459143 -0400
+++ programs/Makefile 2014-07-31 12:21:35.388454356 -0400
@@ -43,7 +43,7 @@
test/selftest$(EXEXT) test/ssl_test$(EXEXT) \
util/pem2der$(EXEXT) util/strerror$(EXEXT) \
x509/cert_app$(EXEXT) x509/crl_app$(EXEXT) \
- x509/cert_req$(EXEXT)
+ x509/cert_req$(EXEXT) x509/cert_write$(EXEXT)
ifdef OPENSSL
APPS += test/o_p_test
@@ -241,6 +241,10 @@
echo " CC x509/cert_req.c"
$(CC) $(CFLAGS) $(OFLAGS) x509/cert_req.c $(LDFLAGS) -o $@
+x509/cert_write$(EXEXT): x509/cert_write.c ../library/libmbedtls.a
+ echo " CC x509/cert_write.c"
+ $(CC) $(LOCAL_CFLAGS) $(CFLAGS) x509/cert_write.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
+
clean:
ifndef WINDOWS
rm -f $(APPS)