-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathliblog4cpp.spec
More file actions
67 lines (54 loc) · 2.03 KB
/
liblog4cpp.spec
File metadata and controls
67 lines (54 loc) · 2.03 KB
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
# Define the version once to ensure consistency
%define _version 4.0.5
Name: liblog4cpp
Version: %{_version}
Release: 1%{?dist}
Summary: A log4j-style C++ logging library
License: LGPLv3
URL: https://github.com/lwhttpdorg/log4cpp
Vendor: log4cpp.org
# Source tarball expected in ~/rpmbuild/SOURCES/
Source0: %{name}-%{version}.tar.gz
# Build-time dependencies: nlohmann-json is required only for compilation
BuildRequires: cmake
BuildRequires: gcc-c++
BuildRequires: json-devel >= 3.0.0
%description
A log4j-style C++ logging library.
%package devel
Summary: Development files for %{name}
# The development package must depend on the specific version of the runtime package
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%prep
# Unpack the source. -n specifies the directory name inside the tarball
%setup -q -n log4cpp
%build
# Standard CMake macro that handles build types and library paths (e.g., /usr/lib64)
%cmake -DPROJECT_VERSION=%{version}
%cmake_build
%install
# Install files into the virtual build root
%cmake_install
# Refresh dynamic linker cache after installation or removal
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
# Runtime package: Contains the shared library and SONAME symlink
# %%{_libdir} automatically resolves to /usr/lib64 on 64-bit RPM systems
%{_libdir}/liblog4cpp.so.*
%files devel
# Development package: Contains headers, development symlinks, and pkg-config
# 1. Public header directory
%{_includedir}/log4cpp/
# 2. Unversioned symlink for linking during development (-llog4cpp)
%{_libdir}/liblog4cpp.so
# 3. Pkg-config metadata file
%{_libdir}/pkgconfig/log4cpp.pc
%changelog
* Mon Jan 19 2026 Developer <developer@log4cpp.org> - 4.0.5-1
- Initial native RPM release
- Internalized nlohmann-json dependency to hide implementation details
- Unified include path to /usr/include/log4cpp for standard API usage