%global _default_patch_fuzz 2 %global commit 22afb86087a77037cd296d27134756c9b0d2cb75 %global shortcommit %(c=%{commit}; echo ${c:0:7}) Name: restbed Version: 4.7 Release: 3%{?dist} Summary: RESTful functionality for C++11 applications License: AGPLv3+ URL: https://github.com/Corvusoft/restbed Source0: https://github.com/Corvusoft/restbed/archive/%{version}.tar.gz Source1: https://github.com/chriskohlhoff/asio/archive/%{commit}.tar.gz#/asio-%{shortcommit}.tar.gz Patch0: https://github.com/aberaud/restbed/commit/cb9caf20724c6c73782f3b42c580b8aec31e989a.patch Patch1: get_authority_fix.patch BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: catch-devel %if 0%{?fedora} BuildRequires: openssl-devel BuildRequires: openssl-static Requires: openssl %endif %description Restbed is a comprehensive and consistent programming model for building applications that require seamless and secure communication over HTTP, with the ability to model a range of business processes, designed to target mobile, tablet, desktop and embedded production environments. %package devel Summary: Development files for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description devel The %{name}-devel package contains libraries and header files for developing applications that use %{name}. %package static Summary: Static library for %{name} Requires: %{name}%{?_isa} = %{version}-%{release} %description static This package contains the static library for applications that use %{name}. %prep %setup -q %setup -q -D -T -a1 %patch0 -p1 %patch1 -p1 sed -i -e 's/include_directories( SYSTEM /include_directories( ${INCLUDE_DIR} SYSTEM /' test/{integration,unit,regression,feature}/CMakeLists.txt sed -i -e '/^target_link_libraries/ s#${STATIC_LIBRARY_NAME}#restbed-shared#' test/{integration,unit,regression,feature}/CMakeLists.txt rmdir dependency/asio && ln -s ../asio-%{commit} dependency/asio %build %cmake -DBUILD_TESTS=ON \ %if !0%{?fedora} -DBUILD_SSL=OFF \ %endif -DCMAKE_INSTALL_LIBDIR=%{_lib} %cmake_build %install %cmake_install %check cd %__cmake_builddir ctest %files %license LICENSE %doc README.md %{_libdir}/librestbed.so.* %files devel %{_includedir}/restbed %{_includedir}/corvusoft/ %{_libdir}/librestbed.so %files static %{_libdir}/librestbed.a