void-packages/srcpkgs/protobuf/template
2018-03-08 00:13:49 -08:00

42 lines
1.1 KiB
Bash

# Template file for 'protobuf'
pkgname=protobuf
version=3.5.2
revision=1
build_style=gnu-configure
hostmakedepends="automake libtool pkg-config"
makedepends="zlib-devel"
short_desc="Google's data interchange format"
maintainer="Michael Aldridge <maldridge@voidlinux.eu>"
distfiles="https://github.com/google/protobuf/archive/v${version}.tar.gz"
homepage="https://developers.google.com/protocol-buffers/"
license="BSD-3-Clause"
checksum=4ffd420f39f226e96aebc3554f9c66a912f6cad6261f39f194f16af8a1f6dab2
CXXFLAGS="-std=c++14"
if [ "$CROSS_BUILD" ]; then
# needs host protoc
hostmakedepends+=" protobuf"
configure_args+=" --with-protoc=/usr/bin/protoc"
fi
pre_configure() {
autoreconf -fi
}
protobuf-devel_package() {
depends="zlib-devel protobuf>=${version}_${revision} protobuf-lite>=${version}_${revision}"
short_desc="Google's data interchange format - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
}
}
protobuf-lite_package() {
short_desc="Google's data interchange format - Lite version"
pkg_install() {
vmove "usr/lib/libprotobuf-lite.so.*"
}
}