protobuf: install cmake files

This commit is contained in:
classabbyamp 2025-02-19 23:12:27 -05:00 committed by classabbyamp
parent 1e2cd4ec3a
commit 7b39b6bc8e

View File

@ -1,7 +1,7 @@
# Template file for 'protobuf'
pkgname=protobuf
version=25.2
revision=1
revision=2
build_style=cmake
configure_args="-Dprotobuf_BUILD_SHARED_LIBS=ON -Dprotobuf_USE_EXTERNAL_GTEST=ON
-Dprotobuf_BUILD_LIBPROTOC=ON -Dprotobuf_ABSL_PROVIDER=package
@ -29,7 +29,6 @@ if [ "$CROSS_BUILD" ]; then
fi
post_install() {
rm -rf "${DESTDIR}/usr/lib/cmake"
vlicense LICENSE
}
@ -87,6 +86,11 @@ protobuf-devel_package() {
vmove usr/lib/libprotobuf.so
vmove usr/lib/libprotobuf-lite.so
vmove usr/lib/pkgconfig
vmove usr/lib/cmake
# when cross-building something that uses this cmake file,
# it barfs because it can't execute the target's protobuf binary
vsed -i -e 's,${_IMPORT_PREFIX}/bin,/usr/bin,g' \
"$PKGDESTDIR"/usr/lib/cmake/protobuf/protobuf-targets-none.cmake
vmove "usr/lib/*.a"
}
}