summaryrefslogblamecommitdiff
path: root/user/bearssl/APKBUILD
blob: b79ca366cc644863318de7db7ca544cffea98996 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
                                                      
                                                     
               


                                                   
                                                            
                          

             

              
                          
                                                                                                     

                                   
 
                                                                       
 
         
              









                                                                              


           

                                                                                                   






                                                                                
                                                                                                                                                                            
                                                                                                                                                              
# Contributor: Laurent Bercot <ska-adelie@skarnet.org>
# Maintainer: Laurent Bercot <ska-adelie@skarnet.org>
pkgname=bearssl
pkgver=0.6_git20230221
_pkgcommit=79c060eea3eea1257797f15ea1608a9a9923aa6f
pkgrel=0
pkgdesc="The BearSSL implementation of the SSL/TLS protocol"
url="https://bearssl.org/"
arch="all"
license="MIT"
depends=""
makedepends=""
subpackages="$pkgname-dev"
source="bearssl-$pkgver.tar.gz::https://bearssl.org/gitweb/?p=BearSSL;a=snapshot;h=$_pkgcommit;sf=tgz
	bearssl-brssl-dynamic.patch
	"

builddir="${srcdir}"/BearSSL-$(printf "%s" "${_pkgcommit}" | cut -c -7)

build() {
	make \
		CC=gcc \
		LD=gcc \
		LDDLL=gcc \
		LDDLLFLAGS="-shared -Wl,-soname,libbearssl.so.${pkgver%%.*}" \
		D=".so.$pkgver"
}

check() {
	build/testx509
	build/testcrypto all
}

package() {
	mkdir -p -m 0755 -- "$pkgdir"/usr/bin "$pkgdir"/lib "$pkgdir"/usr/include "$pkgdir"/usr/lib
	cp -f "$builddir/build/brssl" "$pkgdir/usr/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"
}

sha512sums="bffe5171f3ef27d8f141a43f5b485dcb659b20f1fc65d68c8f6e04f26dd99aadfc39a5943f5d6952f032533e2a709da9083c634f3dcc387b5c2ad64c1785bf6b  bearssl-0.6_git20230221.tar.gz
f5fe047862eb355a662ccb1b95c2ca4a870ac0f8d3f4cada5396d2f6a6635647db53fbeb038f9a7651b84d6cda32b6415ce0f69a8da92636d3b3b76578114d5c  bearssl-brssl-dynamic.patch"