summaryrefslogtreecommitdiff
path: root/spdlog.spec
blob: f247974f08e98ec0c5ee2bb4cbddabc7619b07e2 (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
# topdir: spdlog-1.17.0
Name:           spdlog
Version:        1.17.0
Release:        1%{?dist}
Summary:        Fast C++ logging library

License:        MIT
URL:            https://github.com/gabime/spdlog
Source0:        https://github.com/gabime/spdlog/archive/refs/tags/v%{version}/%{name}-%{version}.tar.gz

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

BuildRequires:  cmake
BuildRequires:  gcc
BuildRequires:  gcc-c++

%description
spdlog is a very fast, header-only/compiled, C++ logging library.

%package devel
Summary:        Development files for %{name}
Group:          Development/Libraries
Packager:       openEuler Builder <builder@openeuler.org>
Requires:       %{name} = %{version}-%{release}

%description devel
Header files, CMake configuration files and development libraries for %{name}.

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

%build
# openEuler's cmake package ships an old-style in-source %cmake macro (no -B),
# while cmake-rpm-macros provides new-style %cmake_build/%cmake_install that
# operate on %_vpath_builddir. Align them: configure into %_vpath_builddir so
# %cmake_build finds the build directory it expects.
%cmake -B %{_vpath_builddir} \
    -DSPDLOG_BUILD_SHARED=ON \
    -DSPDLOG_BUILD_TESTS=OFF \
    -DSPDLOG_BUILD_TESTS_HO=OFF \
    -DSPDLOG_BUILD_EXAMPLE=OFF \
    -DSPDLOG_BUILD_EXAMPLE_HO=OFF \
    -DSPDLOG_BUILD_BENCH=OFF \
    -DSPDLOG_BUILD_WARNINGS=OFF \
    -DSPDLOG_FMT_EXTERNAL=OFF \
    -DSPDLOG_FMT_EXTERNAL_HO=OFF \
    -DSPDLOG_INSTALL=ON
%cmake_build

%install
%cmake_install

%files
%license LICENSE
%doc README.md
%{_libdir}/libspdlog.so.*

%files devel
%{_includedir}/spdlog/
%{_libdir}/libspdlog.so
%{_libdir}/cmake/spdlog/
%{_libdir}/pkgconfig/spdlog.pc

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