File drogon.spec of Package drogon
#
# spec file for package drogon
#
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define libtrantor libtrantor1
%define libdrogon libdrogon1
%if 0%{?sle_version} == 150200
%global force_gcc_version 9
%endif
%if 0%{?sle_version} >= 150300
%global force_gcc_version 10
%endif
Name: drogon
Version: 1.7.3
Release: 0
Summary: A C++14/17 based HTTP web application framework
License: MIT
URL: https://drogon.org/
Source: %{name}-%{version}.tar.xz
Source1: _service
BuildRequires: cmake
BuildRequires: gcc%{?force_gcc_version}-c++
BuildRequires: pkgconfig
BuildRequires: pkgconfig(libcares)
BuildRequires: pkgconfig(hiredis)
BuildRequires: pkgconfig(jsoncpp)
BuildRequires: pkgconfig(libbrotlienc)
BuildRequires: pkgconfig(libmariadb)
BuildRequires: pkgconfig(libpq)
BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(sqlite3)
BuildRequires: pkgconfig(uuid)
BuildRequires: pkgconfig(zlib)
%if %{with docs}
BuildRequires: dia
BuildRequires: doxygen
BuildRequires: graphviz
%endif
%description
Drogon is a C++14/17-based HTTP application framework. Drogon can be used to
easily build various types of web application server programs using C++. Drogon
is the name of a dragon in the American TV series "Game of Thrones" that I
really like.
%package -n %{libdrogon}
Summary: Shared libraries for drogon
%description -n %{libdrogon}
Drogon is a C++14/17-based HTTP application framework. Drogon can be used to
easily build various types of web application server programs using C++. Drogon
is the name of a dragon in the American TV series "Game of Thrones" that I
really like.
%package -n %{libtrantor}
Summary: Shared libraries for drogon
%description -n %{libtrantor}
Drogon is a C++14/17-based HTTP application framework. Drogon can be used to
easily build various types of web application server programs using C++. Drogon
is the name of a dragon in the American TV series "Game of Thrones" that I
really like.
%package devel
Summary: Development files for drogon
Requires: %{libdrogon} = %{version}
Requires: %{libtrantor} = %{version}
Requires: pkgconfig(libcares)
Requires: pkgconfig(hiredis)
Requires: pkgconfig(jsoncpp)
Requires: pkgconfig(libbrotlienc)
Requires: pkgconfig(libmariadb)
Requires: pkgconfig(libpq)
Requires: pkgconfig(openssl)
Requires: pkgconfig(sqlite3)
Requires: pkgconfig(uuid)
Requires: pkgconfig(zlib)
%description devel
Drogon is a C++14/17-based HTTP application framework. Drogon can be used to
easily build various types of web application server programs using C++. Drogon
is the name of a dragon in the American TV series "Game of Thrones" that I
really like.
This package holds the files to develop against libdrogon.
%prep
%autosetup -p1
%build
%if 0%{?force_gcc_version}
export CC="gcc-%{?force_gcc_version}"
export CXX="g++-%{?force_gcc_version}"
%endif
export LD_LIBRARY_PATH="${PWD}/build/:${PWD}/build/trantor/"
%cmake \
-DBUILD_DOC:BOOL=OFF \
-DUSE_COROUTINE:BOOL=ON \
-DBUILD_DROGON_SHARED:BOOL=ON \
%{nil}
%cmake_build
%install
export LD_LIBRARY_PATH="${PWD}/build/:${PWD}/build/trantor/"
%cmake_install
%files
%{_bindir}/dg_ctl
%{_bindir}/drogon_ctl
%post -n %{libdrogon} -p /sbin/ldconfig
%postun -n %{libdrogon} -p /sbin/ldconfig
%files -n %{libdrogon}
%{_libdir}/libdrogon.so.*
%post -n %{libtrantor} -p /sbin/ldconfig
%postun -n %{libtrantor} -p /sbin/ldconfig
%files -n %{libtrantor}
%{_libdir}/libtrantor.so.*
%files devel
%{_includedir}/drogon/
%{_includedir}/trantor/
%{_libdir}/libdrogon.so
%{_libdir}/libtrantor.so
%{_libdir}/cmake/Trantor/
%{_libdir}/cmake/Drogon/
%changelog