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


                                          
             
        
                                                                    
                      
                                                                                             
                    
                  
                                                                        
                                                                                    
                                       
                                                        
                                                        
                                                 
                    

                                                                                                                        
                                                                                                                        
                                                                                                                     
                                                                                            
                                                   
                 






                                                                                         


                                                                                         


                                                                                      


                                                                    


         










                                                   

                                            
            
                     


           
                      
                                      
                                    



                                                


                                                           

 
                                                                                                                                                                
                                                                                                                                                                                            
                                                                                                                                                                                            
                                                                                                                                                        
                                                                                                                                                                                     
                                                                                                                                                                      
# Contributor: wener <wenermail@gmail.com>
# Maintainer: wener <wenermail@gmail.com>
pkgname=grpc
pkgver=1.36.4
pkgrel=1
pkgdesc="The C based gRPC (C++, Python, Ruby, Objective-C, PHP, C#)"
url="https://grpc.io/"
arch="all !ppc64le !armv7 !armhf !s390x !mips64" # Fails to build on armhf/armv7/s390x/mips64
license="Apache-2.0"
depends="protobuf"
makedepends="autoconf automake libtool libstdc++ protobuf-dev c-ares-dev
	openssl-dev gtest-dev zlib-dev yaml-dev linux-headers cmake libexecinfo-dev"
subpackages="$pkgname-dev $pkgname-cli"
_googletest_rev=c9ccac7cb7345901884aabf5d1a786cfa6e2f397
_abseil_cpp_rev=6f9d96a1f41439ac172ee2ef7ccd8edf0e5d068c
_re2_rev=aecba11114cf1fac5497aeb844b6966106de3eb6
_benchmark_ver=1.5.1
source="$pkgname-$pkgver.tar.gz::https://github.com/grpc/grpc/archive/v$pkgver.tar.gz
		googletest-$_googletest_rev.tar.gz::https://github.com/google/googletest/archive/$_googletest_rev.tar.gz
		abseil-cpp-$_abseil_cpp_rev.tar.gz::https://github.com/abseil/abseil-cpp/archive/$_abseil_cpp_rev.tar.gz
		benchmark-$_benchmark_ver.tar.gz::https://github.com/google/benchmark/archive/v$_benchmark_ver.tar.gz
		re2-$_re2_rev.tar.gz::https://github.com/google/re2/archive/$_re2_rev.tar.gz
		01-chttp2-maybe-uninitialized.patch
		"
options="!check"

unpack() {
	default_unpack
	cd "$srcdir"
	rm -rf $pkgname-$pkgver/third_party/googletest
	ln -sfn $PWD/googletest-$_googletest_rev/ $pkgname-$pkgver/third_party/googletest

	rm -rf $pkgname-$pkgver/third_party/abseil-cpp
	ln -sfn $PWD/abseil-cpp-$_abseil_cpp_rev/ $pkgname-$pkgver/third_party/abseil-cpp

	rm -rf $pkgname-$pkgver/third_party/benchmark
	ln -sfn $PWD/benchmark-$_benchmark_ver/ $pkgname-$pkgver/third_party/benchmark

	rm -rf $pkgname-$pkgver/third_party/re2
	ln -sfn $PWD/re2-$_re2_rev/ $pkgname-$pkgver/third_party/re2
}

build() {
	mkdir -p cmake/build
	cd cmake/build
	# gRPC_BUILD_TESTS for grpc_cli - very slow
	cmake ../..                        \
	  -DgRPC_INSTALL=ON                \
	  -DgRPC_CARES_PROVIDER=package    \
	  -DgRPC_PROTOBUF_PROVIDER=package \
	  -DgRPC_SSL_PROVIDER=package      \
	  -DgRPC_ZLIB_PROVIDER=package     \
	  -DBUILD_TESTING=OFF              \
	  -DgRPC_BUILD_TESTS=ON            \
	  -DCMAKE_INSTALL_PREFIX="/usr"	   \
	  -DCMAKE_INSTALL_LIBDIR=lib
	make
	make grpc_cli
}

package() {
	cd cmake/build
	make DESTDIR="$pkgdir" install
	cp grpc_cli $pkgdir/usr/bin/
	rm -f "$pkgdir/usr/share/grpc/roots.pem"
}

cli() {
	pkgdesc="gRPC command line tool"
	mkdir -p "$subpkgdir"/usr/bin
	mv "$pkgdir"/usr/bin/grpc_cli "$subpkgdir"/usr/bin/
}

sha512sums="bc712ef27954fc8b2e130ca3ff3c982d2286ffea37193c5b4acafc1b711121754b968f60e67edadf94dd50c1cc978d5335753c7e03383f40f94b9a89b7275083  grpc-1.36.4.tar.gz
7dda1e090d5054896899a250433d78ba9fcc004a60c886c93098c726ff12f70bb8d222112f8845e98c1ceacdb060b96699bb90d8f4207496546996195ae90343  googletest-c9ccac7cb7345901884aabf5d1a786cfa6e2f397.tar.gz
f64fee62863f2103c1991136fd3bc2b71cd28c7ff62138ac991b5a7f81780a05e0e2bdd6a119d02e1d70dd54f989f584093957efaec94f26c9d6c3f4ee37f8ae  abseil-cpp-6f9d96a1f41439ac172ee2ef7ccd8edf0e5d068c.tar.gz
1e8782ab6846b8b29c5eea41ed1ba19dd92a46a135cf74acdc588e2cd5ef05581c644d20fc0d6403456d65417538e1db80109ae87989601298b2fc56ae3c3161  benchmark-1.5.1.tar.gz
bbe972e3fd65da69e0d7ac0e0b025fb09ad894315cb6c0e1268fa296599274f9f7c2e771aa577b340c8fa9412d8539fe3db2171d0e9ab9714f3f10910a1d5529  re2-aecba11114cf1fac5497aeb844b6966106de3eb6.tar.gz
7fa146ce86ddd4f160bb1ca9ff01cb7aca6b2b8c9aa50e4fa6b84504b9117b104be0d1e31ccb452d846549dfe1e9012ceccfcdc1f2357ed567621d71fb8b08c5  01-chttp2-maybe-uninitialized.patch"