mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-06-08 15:46:22 +02:00
295 lines
5.6 KiB
Text
295 lines
5.6 KiB
Text
# Contributor: Holger Jaekel <holger.jaekel@gmx.de>
|
|
# Maintainer: Holger Jaekel <holger.jaekel@gmx.de>
|
|
pkgname=google-cloud-cpp
|
|
pkgver=2.35.0
|
|
_googleapis_commit_sha=280725e991516d4a0f136268faf5aa6d32d21b54
|
|
pkgrel=4
|
|
pkgdesc="C++ Client Libraries for Google Cloud Services"
|
|
url="https://cloud.google.com/sdk"
|
|
arch="all"
|
|
license="Apache-2.0"
|
|
makedepends="
|
|
abseil-cpp-dev
|
|
c-ares-dev
|
|
clang
|
|
cmake
|
|
crc32c-dev
|
|
curl-dev
|
|
grpc-dev
|
|
nlohmann-json
|
|
openssl-dev
|
|
protobuf-dev
|
|
re2-dev
|
|
samurai
|
|
"
|
|
checkdepends="benchmark-dev gtest-dev"
|
|
subpackages="$pkgname-dev"
|
|
source="google-cloud-cpp-$pkgver.tar.gz::https://github.com/googleapis/google-cloud-cpp/archive/refs/tags/v$pkgver.tar.gz
|
|
https://github.com/googleapis/googleapis/archive/$_googleapis_commit_sha.tar.gz
|
|
"
|
|
|
|
_ga_library="
|
|
accessapproval
|
|
accesscontextmanager
|
|
advisorynotifications
|
|
aiplatform
|
|
alloydb
|
|
apigateway
|
|
apigeeconnect
|
|
apikeys
|
|
appengine
|
|
apphub
|
|
artifactregistry
|
|
asset
|
|
assuredworkloads
|
|
automl
|
|
backupdr
|
|
baremetalsolution
|
|
batch
|
|
beyondcorp
|
|
bigquery
|
|
bigtable
|
|
billing
|
|
binaryauthorization
|
|
certificatemanager
|
|
channel
|
|
cloudbuild
|
|
cloudcontrolspartner
|
|
cloudquotas
|
|
commerce
|
|
composer
|
|
compute
|
|
confidentialcomputing
|
|
config
|
|
connectors
|
|
contactcenterinsights
|
|
containeranalysis
|
|
container
|
|
contentwarehouse
|
|
datacatalog
|
|
datafusion
|
|
datamigration
|
|
dataplex
|
|
dataproc
|
|
datastore
|
|
datastream
|
|
deploy
|
|
developerconnect
|
|
dialogflow_cx
|
|
dialogflow_es
|
|
discoveryengine
|
|
dlp
|
|
documentai
|
|
domains
|
|
edgecontainer
|
|
edgenetwork
|
|
essentialcontacts
|
|
eventarc
|
|
filestore
|
|
functions
|
|
gkebackup
|
|
gkeconnect
|
|
gkehub
|
|
gkemulticloud
|
|
iam
|
|
iap
|
|
ids
|
|
kms
|
|
language
|
|
logging
|
|
managedidentities
|
|
managedkafka
|
|
memcache
|
|
metastore
|
|
migrationcenter
|
|
monitoring
|
|
netapp
|
|
networkconnectivity
|
|
networkmanagement
|
|
networksecurity
|
|
networkservices
|
|
notebooks
|
|
oauth2
|
|
optimization
|
|
orgpolicy
|
|
osconfig
|
|
oslogin
|
|
parallelstore
|
|
policysimulator
|
|
policytroubleshooter
|
|
privateca
|
|
privilegedaccessmanager
|
|
profiler
|
|
publicca
|
|
pubsub
|
|
rapidmigrationassessment
|
|
recaptchaenterprise
|
|
recommender
|
|
redis
|
|
resourcemanager
|
|
resourcesettings
|
|
retail
|
|
run
|
|
scheduler
|
|
secretmanager
|
|
securesourcemanager
|
|
securitycenter
|
|
servicecontrol
|
|
servicedirectory
|
|
servicehealth
|
|
servicemanagement
|
|
serviceusage
|
|
shell
|
|
spanner
|
|
speech
|
|
sql
|
|
storageinsights
|
|
storagetransfer
|
|
storage
|
|
support
|
|
talent
|
|
tasks
|
|
telcoautomation
|
|
texttospeech
|
|
timeseriesinsights
|
|
tpu
|
|
trace
|
|
translate
|
|
videointelligence
|
|
video
|
|
vision
|
|
vmmigration
|
|
vmwareengine
|
|
vpcaccess
|
|
webrisk
|
|
websecurityscanner
|
|
workflows
|
|
workstations
|
|
"
|
|
_non_ga_library="
|
|
cloud-common-common-protos
|
|
cloud-extended-operations-protos
|
|
cloud_location_locations-protos
|
|
cloud-orgpolicy-v1-orgpolicy-protos
|
|
grafeas-protos
|
|
grpc-utils
|
|
longrunning-operations-protos
|
|
rest-internal
|
|
rest-protobuf-internal
|
|
rpc-code-protos
|
|
rpc-context-attribute-context-protos
|
|
rpc-error-details-protos
|
|
rpc-status-protos
|
|
"
|
|
_api_protos="
|
|
api-annotations
|
|
api-auth
|
|
api-backend
|
|
api-billing
|
|
api-client
|
|
api-config-change
|
|
api-consumer
|
|
api-context
|
|
api-control
|
|
api-distribution
|
|
api-documentation
|
|
api-endpoint
|
|
api-error-reason
|
|
api-field-behavior
|
|
api-field-info
|
|
api-httpbody
|
|
api-http
|
|
api-label
|
|
api-launch-stage
|
|
api-logging
|
|
api-log
|
|
api-metric
|
|
api-monitored-resource
|
|
api-monitoring
|
|
api-policy
|
|
api-quota
|
|
api-resource
|
|
api-routing
|
|
api-service
|
|
api-source-info
|
|
api-system-parameter
|
|
api-usage
|
|
api-visibility
|
|
"
|
|
_type_protos="
|
|
type-calendar-period
|
|
type-color
|
|
type-datetime
|
|
type-date
|
|
type-dayofweek
|
|
type-decimal
|
|
type-expr
|
|
type-fraction
|
|
type-interval
|
|
type-latlng
|
|
type-localized-text
|
|
type-money
|
|
type-month
|
|
type-phone-number
|
|
type-postal-address
|
|
type-quaternion
|
|
type-timeofday
|
|
"
|
|
|
|
for _lib in $_ga_library $_non_ga_library $_api_protos $_type_protos ; do
|
|
subpackages="$subpackages $pkgname-$_lib:library"
|
|
done
|
|
|
|
prepare() {
|
|
default_prepare
|
|
|
|
# google-cloud-cpp needs the proto and gRPC definitions for most
|
|
# Google Cloud services. By default these definitions are downloaded
|
|
# from GitHub during the build process. Using the same SHA is the
|
|
# recommended practice when the googleapis are downloaded outside the
|
|
# build process. In this APKBUILD, we download the googleapis as an
|
|
# additional source. In that case we have to make sure that the SHA
|
|
# match.
|
|
local sha256=$(awk '/_GOOGLE_CLOUD_CPP_GOOGLEAPIS_SHA256/ { getline; print $0 }' cmake/GoogleapisConfig.cmake | tr -d '") ')
|
|
echo "expected sha: $sha256"
|
|
echo "$sha256 *$srcdir/$_googleapis_commit_sha.tar.gz" | sha256sum -c -
|
|
}
|
|
|
|
build() {
|
|
if [ "$CBUILD" != "$CHOST" ]; then
|
|
local crossopts="-DCMAKE_SYSTEM_NAME=Linux -DCMAKE_HOST_SYSTEM_NAME=Linux"
|
|
fi
|
|
LDFLAGS="$LDFLAGS -Wl,--copy-dt-needed-entries" \
|
|
cmake -B build -G Ninja -Wno-dev \
|
|
-DCMAKE_INSTALL_PREFIX=/usr \
|
|
-DCMAKE_INSTALL_LIBDIR=lib \
|
|
-DBUILD_SHARED_LIBS=True \
|
|
-DCMAKE_BUILD_TYPE=None \
|
|
-DBUILD_TESTING="$(want_check && echo ON || echo OFF)" \
|
|
-DGOOGLE_CLOUD_CPP_ENABLE_EXAMPLES=OFF \
|
|
-DGOOGLE_CLOUD_CPP_ENABLE=__ga_libraries__ \
|
|
-DGOOGLE_CLOUD_CPP_OVERRIDE_GOOGLEAPIS_URL=$srcdir/googleapis-$_googleapis_commit_sha \
|
|
$crossopts
|
|
cmake --build build
|
|
}
|
|
|
|
check() {
|
|
cd build
|
|
timeout 1500 \
|
|
ctest -LE "integration-test"
|
|
}
|
|
|
|
package() {
|
|
DESTDIR="$pkgdir" cmake --install build
|
|
}
|
|
|
|
library() {
|
|
local name=${subpkgname#"$pkgname"-}
|
|
pkgdesc="$pkgdesc ($name)"
|
|
amove usr/lib/libgoogle_cloud_cpp_${name//-/_}*
|
|
}
|
|
|
|
sha512sums="
|
|
889afa01c67b2a6566bfd557a3a1990806888b967e7383d9fd8b67aff93ed1430e463715f0ba44f178d4ac241f08c08b2973f83b3c5e6e53e7c634a63e39d3ef google-cloud-cpp-2.35.0.tar.gz
|
|
80da8175c52ae83eaa300783377d9f3d86593fa0bcd4723c5afea4cafa8bf4a2575fb2af48f7e944eabdb11ec8c946a14d9d75f70384744a3bfb2cc71ec2b1ed 280725e991516d4a0f136268faf5aa6d32d21b54.tar.gz
|
|
"
|