Compare commits

..
2 Commits
Author SHA1 Message Date
EnumDev a705821885 Build python bindings 2026-09-04 17:22:07 +03:00
EnumDev c4494d7285 Update package version to 36.0 2026-09-04 15:58:02 +03:00
2 changed files with 28 additions and 5 deletions
+18 -3
View File
@@ -1,6 +1,6 @@
name: protobuf-compiler name: protobuf-compiler
description: Protocol buffer compiler description: Protocol buffer compiler
version: "35.1" version: "36.0"
revision: 1 revision: 1
url: https://protobuf.dev/ url: https://protobuf.dev/
license: BSD-3-Clause license: BSD-3-Clause
@@ -9,15 +9,30 @@ maintainers:
architecture: any architecture: any
type: source type: source
depends: depends:
- abseil-cpp=20260526.* - abseil-cpp=20260817.*
- gcc-libs - gcc-libs
- glibc - glibc
- zlib - zlib
make_depends: make_depends:
- bazelisk
- cmake - cmake
- googletest - googletest
- python-build
- python-installer
- python-setuptools
- python-wheel
check_depends:
- python-numpy
- python-pytest
downloads: downloads:
- url: https://github.com/protocolbuffers/protobuf/archive/refs/tags/v${BPM_PKG_VERSION}.tar.gz - url: https://github.com/protocolbuffers/protobuf/archive/refs/tags/v${BPM_PKG_VERSION}.tar.gz
extract_to: ${BPM_SOURCE} extract_to: ${BPM_SOURCE}
extract_strip_components: 1 extract_strip_components: 1
checksum: 22775f9376938295efa2d59a59bde4cd075a42df5a9b4d27aa9b99fa6a413bd2 checksum: d120933b88a2857c1b5fb6dafe387cca1b96762c2263cb53d945dcae34e88a3f
split_packages:
- name: protobuf-compiler
- name: python-protobuf
description: Python 3 bindings for Google Protocol Buffers
depends:
- protobuf-compiler
- python3=3.14.*
+9 -1
View File
@@ -7,6 +7,8 @@
build() { build() {
cmake -B build -DCMAKE_INSTALL_PREFIX=/usr -Dprotobuf_BUILD_SHARED_LIBS=ON -Dprotobuf_USE_EXTERNAL_GTEST=ON -Dprotobuf_ABSL_PROVIDER=package -Wno-dev cmake -B build -DCMAKE_INSTALL_PREFIX=/usr -Dprotobuf_BUILD_SHARED_LIBS=ON -Dprotobuf_USE_EXTERNAL_GTEST=ON -Dprotobuf_ABSL_PROVIDER=package -Wno-dev
cmake --build build cmake --build build
bazel build //python/dist:binary_wheel "${bazel_options[@]}"
} }
# The check function is executed in the source directory # The check function is executed in the source directory
@@ -17,7 +19,7 @@ check() {
# The package function is executed in the source directory # The package function is executed in the source directory
# This function is used to move the compiled files into the output directory # This function is used to move the compiled files into the output directory
package() { package_protobuf-compiler() {
DESTDIR="$BPM_OUTPUT" cmake --install build DESTDIR="$BPM_OUTPUT" cmake --install build
install -Dm644 "$BPM_SOURCE"/editors/protobuf-mode.el -t "$BPM_OUTPUT/usr/share/emacs/site-lisp/protobuf-mode.el" install -Dm644 "$BPM_SOURCE"/editors/protobuf-mode.el -t "$BPM_OUTPUT/usr/share/emacs/site-lisp/protobuf-mode.el"
@@ -25,5 +27,11 @@ package() {
# Install package license # Install package license
install -Dm644 "$BPM_SOURCE"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/protobuf-compiler/LICENSE install -Dm644 "$BPM_SOURCE"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/protobuf-compiler/LICENSE
}
package_python-protobuf() {
python -m installer --destdir="$BPM_OUTPUT" bazel-bin/python/dist/*.whl
# Install package license
install -Dm644 "$BPM_SOURCE"/LICENSE "$BPM_OUTPUT"/usr/share/licenses/python-protobuf/LICENSE
} }