Created
July 26, 2021 10:32
-
-
Save jonathanschilling/b4aac25486b5bf47a4a1ff4daec94379 to your computer and use it in GitHub Desktop.
protobuf Arch Linux package using cmake
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Maintainer: Lukas Fleischer <lfleischer@archlinux.org> | |
# Contributor: David Runge <dvzrv@archlinux.org> | |
# Contributor: Aleksey Filippov <sarum9in@gmail.com> | |
# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org> | |
# Contributor: Sven-Hendrik Haase <sh@lutzhaase.com> | |
# Contributor: Thomas S Hatch <thatch45@gmail.com> | |
# Contributor: Geoffroy Carrier <geoffroy@archlinux.org> | |
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us> | |
pkgbase='protobuf' | |
pkgname=('protobuf') | |
pkgver=3.17.3 | |
pkgrel=1 | |
pkgdesc="Protocol Buffers - Google's data interchange format" | |
arch=('x86_64') | |
url='https://developers.google.com/protocol-buffers/' | |
license=('BSD') | |
depends=('gcc-libs' 'glibc' 'zlib') | |
makedepends=('unzip') | |
source=("https://github.com/protocolbuffers/$pkgname/releases/download/v$pkgver/$pkgname-all-$pkgver.tar.gz") | |
sha512sums=('4a5e2ba080310492eb4fd8f6d89d46591254544f4fc1ef1b6a3a285aa12089e3124ff41994455b4b77e79eb1e993c68ec9c54e13a78052b9fb29b8cbf1dc67e1') | |
build() { | |
cd "$pkgbase-$pkgver" | |
cmake -DCMAKE_INSTALL_PREFIX=/usr \ | |
-DCMAKE_BUILD_TYPE=Release \ | |
-Dprotobuf_BUILD_SHARED_LIBS=ON \ | |
-Dprotobuf_BUILD_TESTS=OFF \ | |
cmake | |
make -j | |
} | |
package() { | |
replaces=('protobuf-cpp') | |
provides=('libprotoc.so' 'libprotobuf.so' 'libprotobuf-lite.so') | |
cd "$pkgbase-$pkgver" | |
make DESTDIR="$pkgdir" install | |
# hotfix for grpc_cpp_plugin | |
cd "$pkgdir"/usr/lib | |
ln -s libprotobuf.so libprotobuf.so.28 | |
ln -s libprotoc.so libprotoc.so.28 | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment