!2 package init

From: @fly_fzc 
Reviewed-by: @robertxw 
Signed-off-by: @robertxw
This commit is contained in:
openeuler-ci-bot 2025-04-08 01:43:36 +00:00 committed by Gitee
commit 13cc3486b2
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
3 changed files with 70 additions and 0 deletions

66
civetweb.spec Normal file
View File

@ -0,0 +1,66 @@
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

4
civetweb.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: github
src_repo: civetweb/civetweb
tag_prefix: ^v
separator: .

BIN
v1.12.tar.gz Normal file

Binary file not shown.