aboutsummaryrefslogblamecommitdiffstats
path: root/community/tpm2-tss/APKBUILD
blob: 306df5050a8b993a767618554efc24e6650f7afa (plain) (tree)
1
2
3
4
5
6
7
8
9
                                                     

                                                 
                
            
        
                     
                                                
          
                      
                                                               

                                                               






                            

                           

                        
                     

                       
         




                                                                                                 




                       

         
                     

                                 
                               
                                   
                                      
                                        
                                                 


                                                      


            



                  

                                      

                                       

 

                                              
                                     
                                                                 



                                              
                                     
                                                                  



                                                       
                                     
                                                                   





                                     
                                     
                                                                          





                                        
                                     
                                                                         



                                      
                                     
                                                                 



                                               
                                     
                                                                      

 


                                                               
                                                                   



                                                                            















                                                                         
                                                                                                                                                                   
                                                                                                                                                                
# Contributor: Erik Larsson <who+alpine@cnackers.org>
# Contributor: Alexander Sack <asac@pantacor.com>
# Maintainer: Alexander Sack <asac@pantacor.com>
pkgname=tpm2-tss
pkgver=3.0.2
pkgrel=0
pkgdesc="TPM 2.0 TSS"
url="https://github.com/tpm2-software/tpm2-tss/"
arch="all"
license="BSD-2-Clause"
makedepends="automake autoconf libtool openssl-dev doxygen perl
	linux-headers cmocka-dev autoconf-archive libgcrypt-dev
	json-c-dev curl-dev"
subpackages="
	$pkgname-doc
	$pkgname-mu
	$pkgname-sys
	$pkgname-esys
	$pkgname-tcti-device
	$pkgname-tcti-mssim
	$pkgname-tcti-swtpm
	$pkgname-tcti-cmd
	$pkgname-rc
	$pkgname-tctildr
	$pkgname-fapi
	$pkgname-static
	$pkgname-dev
	"
source="
	$pkgname-$pkgver.tar.gz::https://github.com/tpm2-software/tpm2-tss/archive/$pkgver.tar.gz

	disable_tctildr-dl_test.patch
"

prepare() {
	default_prepare
	./bootstrap
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--localstatedir=/var \
		--without-udevrulesdir \
		--with-tctidefaultmodule=device \
		--with-tctidefaultconfig=/dev/tpmrm0 \
		--with-crypto=ossl \
		--enable-unit
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
	rm -rf "$pkgdir"/etc/tmpfiles.d
	rm -rf "$pkgdir"/etc/sysusers.d
}

mu() {
	pkgdesc="TPM 2.0 Marshaling libraries"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/libtss2-mu.so.* "$subpkgdir"/usr/lib
}

sys() {
	pkgdesc="TPM 2.0 System API libraries"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/libtss2-sys.so.* "$subpkgdir"/usr/lib
}

esys() {
	pkgdesc="TPM 2.0 Enhanced System API libraries"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/libtss2-esys.so.* "$subpkgdir"/usr/lib
}

device() {
	pkgdesc="TPM 2.0 Device TCTI"
	provides="libtss2-tcti"
	provider_priority="100"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/libtss2-tcti-device.so.* "$subpkgdir"/usr/lib
}

mssim() {
	pkgdesc="TPM 2.0 Simulator TCTI"
	provides="libtss2-tcti"
	provider_priority="10"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/libtss2-tcti-mssim.so.* "$subpkgdir"/usr/lib
}

rc() {
	pkgdesc="TPM 2.0 RC libraries"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/libtss2-rc.so.* "$subpkgdir"/usr/lib
}

tctildr() {
	pkgdesc="TPM 2.0 TCTI loader libraries"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/libtss2-tctildr.so.* "$subpkgdir"/usr/lib
}

fapi() {
	pkgdesc="TPM 2.0 FAPI libraries"
	mkdir -p "$subpkgdir"/usr/lib "$subpkgdir"/etc/tpm2-tss
	mv "$pkgdir"/usr/lib/libtss2-fapi.so.* "$subpkgdir"/usr/lib
	mv "$pkgdir"/etc/tpm2-tss/fapi-config.json "$subpkgdir"/etc/tpm2-tss
	mv "$pkgdir"/etc/tpm2-tss/fapi-profiles "$subpkgdir"/etc/tpm2-tss
}

swtpm() {
	pkgdesc="TPM 2.0 SWTPM TCTI"
	provides="libtss2-tcti"
	provider_priority="10"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/libtss2-tcti-swtpm.so.* "$subpkgdir"/usr/lib
}

cmd() {
	pkgdesc="TPM 2.0 CMD TCTI"
	provides="libtss2-tcti"
	provider_priority="10"
	mkdir -p "$subpkgdir"/usr/lib
	mv "$pkgdir"/usr/lib/libtss2-tcti-cmd.so.* "$subpkgdir"/usr/lib
}

sha512sums="a1098b75e3276e93f83bcdc7be8d50b55c772237c44cf6fbea67e144558a68e133cad276c057204c996beb04a92fe84fb3c0c312f904c8e09d72b860b283b602  tpm2-tss-3.0.2.tar.gz
535a24560b3dd8c498b4f87815fc23c39fde9a27e7aa21a51c49dc854bca4bc26a2a0df8b48b557cbe339789f0cdbd2dd341526887a2c03bb1cd2e6af9d7aa9f  disable_tctildr-dl_test.patch"