void-packages/srcpkgs/protobuf/template

57 lines
1.3 KiB
Bash

# Template file for 'protobuf'
pkgname=protobuf
version=3.6.0.1
revision=2
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>"
license="BSD-3-Clause"
homepage="https://developers.google.com/protocol-buffers/"
#changelog="https://raw.githubusercontent.com/google/protobuf/master/CHANGES.txt"
distfiles="https://github.com/google/protobuf/archive/v${version}.tar.gz"
checksum=1144ef1fa9c50d3c04880f363b988df6ca6a66e337a945f1661cf4256ffba749
CXXFLAGS="-std=c++14"
if [ "$CROSS_BUILD" ]; then
# needs host protoc
hostmakedepends+=" protobuf"
configure_args+=" --with-protoc=/usr/bin/protoc"
fi
case "$XBPS_TARGET_MACHINE" in
armv[56]*|mips*)
makedepends+=" libatomic-devel"
LDFLAGS+=" -latomic"
;;
esac
pre_configure() {
autoreconf -fi
}
post_install() {
vlicense LICENSE
}
protobuf-devel_package() {
depends="zlib-devel protobuf-${version}_${revision}
protobuf-lite-${version}_${revision}"
short_desc+=" - development files"
pkg_install() {
vmove usr/include
vmove usr/lib/pkgconfig
vmove "usr/lib/*.a"
vmove "usr/lib/*.so"
}
}
protobuf-lite_package() {
short_desc+=" - Lite version"
pkg_install() {
vmove "usr/lib/libprotobuf-lite.so.*"
}
}