summaryrefslogtreecommitdiff
path: root/ros-humble-draco-devel.spec
blob: ca5748f1b6b7687a5f47b7f767c041ec6f26bfa5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
Name:           ros-humble-draco-devel
Version:        1.5.7
Release:        3%{?dist}
Summary:        Library for compressing and decompressing 3D geometric meshes and point clouds

License:        Apache-2.0
URL:            https://github.com/google/draco
# topdir: ros-humble-draco-devel-1.5.7
Source0:        https://github.com/google/draco/archive/refs/tags/1.5.7.tar.gz#/%{name}-%{version}.tar.gz

Group:          Development/Libraries
Packager:       openEuler Builder <builder@openeuler.org>

# Disable debuginfo/debugsource subpackages: Draco's Release build produces
# minimal DWARF info ("No debugging symbols" from gdb-add-index), leaving
# debugsourcefiles.list empty -> rpmbuild fails on "Empty %files file".
%define debug_package %{nil}

BuildRequires:  cmake
BuildRequires:  gcc
BuildRequires:  gcc-c++
BuildRequires:  make
BuildRequires:  python3

%description
Draco is a library for compressing and decompressing 3D geometric meshes and
point clouds. It is designed to reduce the complexity of transmitting 3D
content by compressing 3D source assets. Draco was created by the Google
Chrome media team to improve the graphics performance of web applications
and other contexts where bandwidth is constrained.

%prep
%autosetup -n %{name}-%{version}

%build
# Draco forbids in-source builds (CMakeLists.txt guard: CMAKE_SOURCE_DIR ==
# CMAKE_BINARY_DIR -> FATAL_ERROR). Use an out-of-source build directory.
mkdir -p build
cd build
cmake .. \
    -DCMAKE_INSTALL_PREFIX=%{_prefix} \
    -DCMAKE_BUILD_TYPE=Release \
    -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
    -DCMAKE_C_FLAGS_RELEASE:STRING=-DNDEBUG \
    -DCMAKE_CXX_FLAGS_RELEASE:STRING=-DNDEBUG \
    -DBUILD_SHARED_LIBS=ON \
    -DDRACO_TESTS=OFF \
    -DDRACO_TRANSCODER_SUPPORTED=OFF
%make_build

%install
cd build
%make_install

%files
%license LICENSE
%doc README.md
%{_bindir}/draco_encoder
%{_bindir}/draco_decoder
%{_libdir}/libdraco.so.9*
%{_libdir}/libdraco.so
%{_libdir}/libdraco.a
%{_includedir}/draco/
%{_datadir}/cmake/draco/
%{_libdir}/pkgconfig/draco.pc

%changelog
* Tue Oct 13 2026 openEuler Builder <builder@openeuler.org> - 1.5.7-3
- Disable debug_package: empty debugsourcefiles.list caused rpmbuild failure

* Tue Oct 13 2026 openEuler Builder <builder@openeuler.org> - 1.5.7-2
- Switch to out-of-source build: Draco CMakeLists forbids in-source builds

* Tue Oct 13 2026 openEuler Builder <builder@openeuler.org> - 1.5.7-1
- Initial package