88 lines
2.2 KiB
Bash
88 lines
2.2 KiB
Bash
# Template file for 'protobuf'
|
|
pkgname=protobuf
|
|
version=3.7.0
|
|
revision=1
|
|
build_style=gnu-configure
|
|
hostmakedepends="pkg-config"
|
|
makedepends="zlib-devel"
|
|
short_desc="Protocol buffers compiler"
|
|
maintainer="Michael Aldridge <maldridge@voidlinux.org>"
|
|
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/protocolbuffers/protobuf/releases/download/v${version}/protobuf-all-${version}.tar.gz"
|
|
checksum=3e933375ecc58d01e52705479b82f155aea2d02cc55d833f8773213e74f88363
|
|
|
|
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*|ppc|ppc-musl)
|
|
makedepends+=" libatomic-devel"
|
|
LDFLAGS+=" -latomic"
|
|
;;
|
|
esac
|
|
|
|
post_install() {
|
|
vlicense LICENSE
|
|
}
|
|
|
|
libprotobuf18_package() {
|
|
short_desc="Protocol buffers C++ library"
|
|
pkg_install() {
|
|
vmove "usr/lib/libprotobuf.so.*"
|
|
vlicense LICENSE
|
|
}
|
|
}
|
|
|
|
libprotobuf-lite18_package() {
|
|
short_desc="Protocol buffers C++ library (lite version)"
|
|
pkg_install() {
|
|
vmove "usr/lib/libprotobuf-lite.so.*"
|
|
vlicense LICENSE
|
|
}
|
|
}
|
|
|
|
libprotoc18_package() {
|
|
short_desc="Protocol buffers compiler library"
|
|
pkg_install() {
|
|
vmove "usr/lib/libprotoc*.so.*"
|
|
vlicense LICENSE
|
|
}
|
|
}
|
|
|
|
libprotoc-devel_package() {
|
|
depends="libprotoc18-${version}_${revision}"
|
|
short_desc="Protocol buffers compiler library - development files"
|
|
pkg_install() {
|
|
vmove usr/lib/libprotoc.a
|
|
vmove usr/lib/libprotoc.so
|
|
vmove usr/include/google/protobuf/compiler
|
|
}
|
|
}
|
|
|
|
protobuf-devel_package() {
|
|
depends="zlib-devel
|
|
libprotobuf18-${version}_${revision}
|
|
libprotobuf-lite18-${version}_${revision}"
|
|
short_desc+="Protocol buffers C++ library - development files"
|
|
pkg_install() {
|
|
vmove usr/include
|
|
vmove usr/lib/libprotobuf.a
|
|
vmove usr/lib/libprotobuf-lite.a
|
|
vmove usr/lib/libprotobuf.so
|
|
vmove usr/lib/libprotobuf-lite.so
|
|
vmove usr/lib/pkgconfig
|
|
}
|
|
}
|
|
|
|
protobuf-lite_package() {
|
|
build_style=meta
|
|
short_desc="Protocol buffers C++ library (lite version)"
|
|
depends="libprotobuf-lite18-${version}_${revision}"
|
|
archs=noarch
|
|
}
|