opt/protobuf/Pkgfile

25 lines
739 B
Plaintext
Raw Normal View History

2017-10-22 05:03:52 +02:00
# Description: Protocol Buffers are a way of encoding structured data in an efficient yet extensible format.
# URL: https://developers.google.com/protocol-buffers/
# Maintainer: Danny Rawlins, crux at romster dot me
# Depends on: zlib
name=protobuf
2022-12-17 12:40:51 +01:00
version=21.12
2017-10-22 05:03:52 +02:00
release=1
2021-05-16 09:39:03 +02:00
source=(https://github.com/protocolbuffers/$name/archive/v$version/$name-$version.tar.gz)
2017-10-22 05:03:52 +02:00
build() {
2022-10-02 08:43:12 +02:00
cmake -S $name-$version -B build -G Ninja \
-D CMAKE_INSTALL_PREFIX=/usr \
-D CMAKE_INSTALL_LIBDIR=lib \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_CXX_FLAGS_RELEASE="$CXXFLAGS" \
-D CMAKE_C_FLAGS_RELEASE="$CFLAGS" \
-D protobuf_BUILD_SHARED_LIBS=ON \
-D protobuf_BUILD_TESTS=OFF \
-Wno-dev
2017-10-22 05:03:52 +02:00
2022-10-02 08:43:12 +02:00
cmake --build build
DESTDIR=$PKG cmake --install build
2017-10-22 05:03:52 +02:00
}