civetweb/civetweb.spec
2025-04-07 15:47:51 +08:00

67 lines
1.7 KiB
RPMSpec

Name: civetweb
Summary: Embedded C/C++ web server
Version: 1.12
Release: 1
License: MIT
URL: https://github.com/%{name}/%{name}
Source: https://github.com/%{name}/%{name}/archive/refs/tags/v%{version}.tar.gz
BuildRequires: cmake make gcc-c++
%description
Civetweb is an easy to use, powerful, C (C/C++) embeddable web server
with optional CGI, SSL and Lua support.
CivetWeb can be used by developers as a library, to add web server
functionality to an existing application. It can also be used by end
users as a stand-alone web server running on a Windows or Linux PC.
It is available as single executable, no installation is required.
%package devel
Summary: Civetweb Client Library C and C++ header files
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
Civetweb shared libs and associated header files
%prep
%setup -q -n %{name}-%{version}
%build
rm -rf build
mkdir -p build
cd build
cmake .. \
-G "Unix Makefiles" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DBUILD_CONFIG=rpmbuild \
-DCIVETWEB_ENABLE_CXX:BOOL=ON \
-DBUILD_SHARED_LIBS:BOOL=ON \
-DCIVETWEB_BUILD_TESTING:BOOL=OFF
export GCC_COLORS=
export VERBOSE=1
cmake --build . %{?_smp_mflags}
%install
mkdir -p %{buildroot}/usr/lib64/cmake/civetweb
cd build
DESTDIR="%{buildroot}" cmake --install . --prefix=/usr
%files
%{_bindir}/civetweb
%{_libdir}/libcivetweb.so.*
%{_libdir}/libcivetweb-cpp.so.*
%license LICENSE.md
%doc README.md RELEASE_NOTES.md
%files devel
%{_includedir}/*.h
%{_libdir}/libcivetweb.so
%{_libdir}/libcivetweb-cpp.so
%dir %{_libdir}/cmake/civetweb/
%{_libdir}/cmake/civetweb/*
%changelog
* Mon Apr 7 2025 fuanan <fuanan3@h-partners.com> - 1.12-1
- package init