Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions extra/protobuf-c/APKBUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Alpine-Contributor: TBK <[email protected]>
# Alpine-Maintainer: Leonardo Arena <[email protected]>
# Maintainer: jscaffidi <[email protected]>
pkgname=protobuf-c
pkgver=1.5.2
pkgrel=0
pkgdesc="Protocol Buffers implementation in C"
url="https://github.com/protobuf-c/protobuf-c"
arch="all"
license="BSD-2-Clause"
depends_dev="$pkgname-compiler=$pkgver-r$pkgrel"
makedepends="autoconf automake libtool abseil-cpp-dev protobuf-dev"
subpackages="$pkgname-compiler $pkgname-dev"
source="https://github.com/protobuf-c/protobuf-c/releases/download/v$pkgver/protobuf-c-$pkgver.tar.gz"

# secfixes:
# 1.4.1-r0:
# - CVE-2022-33070
# 1.3.2-r0:
# - CVE-2021-3121

build() {
CFLAGS="$CFLAGS -fPIC" \
CXXFLAGS="$CXXFLAGS -std=c++17 -fPIC" \
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--mandir=/usr/share/man \
--infodir=/usr/share/info

make
}

check() {
make check
}

package() {
make DESTDIR="$pkgdir" install
}

compiler() {
pkgdesc="Protocol Buffers C compiler"

amove usr/bin/protoc-c
amove usr/bin/protoc-gen-c
}

sha512sums="
78dc72988d7e8232c1b967849aa00939bc05ab7d39b86a8e2af005e38aa4ef4c9b03920d51fb5337399d980e65f35d11bd4742bea745a893ecc909f56a51c9ac protobuf-c-1.5.2.tar.gz
"