aboutsummaryrefslogblamecommitdiffstats
path: root/community/libressl/APKBUILD
blob: d08408cab6b7eea20ec34d98af3829602d27ef88 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
                                                              

                                         

           

                     


                     


                     
                
            
                               
        
                                                             
                               
          
                

                                                            


                                                  
                                                                          
                                                         
                                                                            
                           
         
 


                       
                       


         
                                                


                                 
                                            


                                         

                                    

 
         
                  

 
           
                                      
                                                                            
 

                    
                                                              
                                           
                                                                     






                                             

 
         
                                             


                                        

                                
                                          
                         
          

 
            
                                                                                                                                                       

                                                                                                                                                     
# Contributor: Sören Tempel <soeren+alpine@soeren-tempel.net>
# Contributor: Orion <systmkor@gmail.com>
# Maintainer: Orion <systmkor@gmail.com>
#
# secfixes:
#   3.1.5-r0:
#     - CVE-2020-1971
#   2.7.4-r0:
#     - CVE-2018-0732
#     - CVE-2018-0495
#   2.5.3-r1:
#     - CVE-2017-8301
#
pkgname=libressl
pkgver=3.3.4
_namever=${pkgname}${pkgver%.*}
pkgrel=0
pkgdesc="Version of the TLS/crypto stack forked from OpenSSL"
url="https://www.libressl.org/"
arch="all"
license="custom"
pcprefix="libressl:"  # avoid mix up with openssl pkg-config
sonameprefix="libressl:"  # avoid mix up with libretls
makedepends_build="automake autoconf libtool"
makedepends_host="linux-headers"
makedepends="$makedepends_host $makedepends_build"
subpackages="$pkgname-dbg $_namever-libcrypto:_libs $_namever-libssl:_libs
	$_namever-libtls:_libs $pkgname-dev $pkgname-doc"
source="https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-$pkgver.tar.gz
	ssl-libcompat.patch
	"

prepare() {
	default_prepare

	autoreconf -vif
}

build() {
	CFLAGS="-L$CBUILDROOT/usr/lib $CFLAGS" \
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--with-sysroot=$CBUILDROOT \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
	install -Dm644 COPYING "$pkgdir"/usr/share/licenses/$pkgname/COPYING

	cd "$pkgdir"

	# /usr/bin/openssl is provided by the openssl package.
	mv usr/bin/openssl usr/bin/libressl
	mv usr/share/man/man1/openssl.1 usr/share/man/man1/libressl.1

	# Provided by ca-certificates-cacerts
	rm etc/ssl/cert.pem
	rmdir etc/ssl/certs

	# Provided by openssl's libcrypto1.1
	rm etc/ssl/openssl.cnf
}

_libs() {
	local name="${subpkgname#$_namever-}"
	pkgdesc="libressl $name library"
	depends=""

	amove usr/lib/$name.so.*

	if [ "$name" = "libcrypto" ]; then
		amove etc
	fi
}

sha512sums="
11defdde8169d3653c24e149e698ffc5a8ead5ac0808111d1986cb11ef72e9912c463d4891d4635877021e73a8a045dbdbe5e83ec785a59150f170d2ca2031de  libressl-3.3.4.tar.gz
18e72b7db28664ee4e294a4a461e48daa90be9e9323584112a5878fd56a578d02f4730c7c788f57cc39b2bc35447df0a47a4391077d764d953419890ad511d35  ssl-libcompat.patch
"