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

                                                      


                     

                      
                      
         















                                                 



                              


                  

                                          
                                                     
                                     


                                                                  










                                                              
                                                                                                                                                                  
                                                                                                                                                                                
# Contriburo: Łukasz Jendrysik <scadu@yandex.com>
# Contributor: Michael Mason <ms13sp@gmail.com>
# Maintainer: 
pkgname=gnutls
pkgver=3.6.15
pkgrel=0
pkgdesc="A TLS protocol implementation"
url="https://www.gnutls.org/"
arch="all"
license="LGPL-2.1+"
makedepends="libtasn1-dev libunistring-dev nettle-dev p11-kit-dev texinfo
	unbound-dev cmd:which zlib-dev"
checkdepends="diffutils"
subpackages="$pkgname-dbg $pkgname-doc $pkgname-dev $pkgname-lang
	$pkgname-c++:xx $pkgname-dane $pkgname-utils"
_v=${pkgver%.*}
_v2=$pkgver
case $pkgver in
*.*.*.*)
	_v=${_v%.*}
	_v2=${pkgver%.*}
	;;
esac
source="https://www.gnupg.org/ftp/gcrypt/gnutls/v${_v}/$pkgname-$pkgver.tar.xz
	gnulib-tests-dont-require-gpg-passphrase.patch
	disable-certtool-test.patch
	"

# secfixes:
#   3.5.13-r0:
#     - CVE-2017-7507
#   3.6.14-r0:
#     - CVE-2020-11501
#     - CVE-2020-13777
#   3.6.15-r0:
#     - CVE-2020-24659

build() {
	LIBS="-lgmp" ./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--infodir=/usr/share/info \
		--disable-openssl-compatibility \
		--disable-rpath \
		--disable-static \
		--disable-guile \
		--disable-valgrind-tests \
		--without-included-libtasn1 \
		--enable-cxx \
		--enable-manpages \
		--enable-tests \
		--disable-full-test-suite \
		--with-p11-kit
	make
}

check() {
	make check
}

package() {
	make -j1 DESTDIR="$pkgdir" install
}

dane() {
	pkgdesc="$pkgdesc (DNS DANE support library)"
	mkdir -p "$subpkgdir"/usr/bin
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/bin/danetool "$subpkgdir"/usr/bin/
	mv "$pkgdir"/usr/lib/libgnutls-dane* "$subpkgdir"/usr/lib/
}

utils() {
	pkgdesc="Command line tools for TLS protocol"
	mkdir -p "$subpkgdir"/usr/
	mv "$pkgdir"/usr/bin "$subpkgdir"/usr/
}

xx() {
	pkgdesc="The C++ interface to GnuTLS"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/lib*xx.so.* "$subpkgdir"/usr/lib/
}

sha512sums="f757d1532198f44bcad7b73856ce6a05bab43f6fb77fcc81c59607f146202f73023d0796d3e1e7471709cf792c8ee7d436e19407e0601bc0bda2f21512b3b01c  gnutls-3.6.15.tar.xz
abc24ee59cc67805fe953535b0bae33080fc8b0bf788304377f6d10ec8c162c4cf203a69c98a4ba3483b4c60ed7a204433cc7db9b8190eddb0d68f6fb6dad52d  gnulib-tests-dont-require-gpg-passphrase.patch
25400be364c1f27b88451002a471cbf841b9738dd93c42dcbeaf7644c3deea6afc85300b40d5ae32d29dc4d441237e8b311f3e07f0af2fb4788701ee4e240c0f  disable-certtool-test.patch"