From da1009ec073e8f58acdbfea192599462df16d0a2 Mon Sep 17 00:00:00 2001 From: Michel Alexandre Salim Date: Oct 29 2020 17:12:06 +0000 Subject: Initial import Signed-off-by: Michel Alexandre Salim --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..633129e --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/wangle-v2020.10.26.00.tar.gz diff --git a/sources b/sources new file mode 100644 index 0000000..742b310 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (wangle-v2020.10.26.00.tar.gz) = 151615ad87a3f59eaecd2f0eadae02a82f10b9719da17af8c2416cc288967171723691a5e6106eb98e6caa0c220060d7a8091f7f5dd895e3f07592c7b36a7f60 diff --git a/wangle-2020.10.26.00-allow_overriding_version.patch b/wangle-2020.10.26.00-allow_overriding_version.patch new file mode 100644 index 0000000..ad4e785 --- /dev/null +++ b/wangle-2020.10.26.00-allow_overriding_version.patch @@ -0,0 +1,47 @@ +From 101e328981ddc7c7c6601f9cbb7eb9b2de38ef79 Mon Sep 17 00:00:00 2001 +From: Michel Salim +Date: Mon, 26 Oct 2020 17:25:45 -0700 +Subject: [PATCH] Allow overriding version + +Summary: +Upstream doesn't currently guarantee ABI stability, we want to let +downstream distributions override the version themselves when they +update Wangle. + +Differential Revision: D24551628 + +fbshipit-source-id: 75ccf4aed41bfa097f6d7c15af9b4e893468e8ba +--- + wangle/CMakeLists.txt | 12 ++++++++++-- + 1 file changed, 10 insertions(+), 2 deletions(-) + +diff --git a/wangle/CMakeLists.txt b/wangle/CMakeLists.txt +index 8df7c76f..4d3ee858 100644 +--- a/wangle/CMakeLists.txt ++++ b/wangle/CMakeLists.txt +@@ -14,7 +14,15 @@ + + cmake_minimum_required(VERSION 3.0.2) + +-project("wangle" VERSION 1.0.0 LANGUAGES CXX C) ++if (NOT DEFINED PACKAGE_VERSION) ++ set(PACKAGE_VERSION "1.0.0") ++endif() ++ ++if (NOT DEFINED SO_VERSION) ++ set(SO_VERSION 1) ++endif() ++ ++project("wangle" VERSION ${PACKAGE_VERSION} LANGUAGES CXX C) + + if (NOT DEFINED CPACK_GENERATOR) + set(CPACK_GENERATOR "RPM") +@@ -145,7 +153,7 @@ endif() + + if (BUILD_SHARED_LIBS) + set_target_properties(wangle +- PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION 1) ++ PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${SO_VERSION}) + endif() + + target_include_directories( diff --git a/wangle.spec b/wangle.spec new file mode 100644 index 0000000..e996cfd --- /dev/null +++ b/wangle.spec @@ -0,0 +1,79 @@ +# Tests are not currently passing +%bcond_with tests + +Name: wangle +Version: 2020.10.26.00 +Release: 2%{?dist} +Summary: Framework for building services in a consistent/modular/composable way + +License: ASL 2.0 +URL: https://github.com/facebook/wangle +Source0: %{url}/releases/download/v%{version}/%{name}-v%{version}.tar.gz +Patch0: %{url}/commit/101e328981ddc7c7c6601f9cbb7eb9b2de38ef79.patch#/%{name}-%{version}-allow_overriding_version.patch + +# Folly is known not to work on big-endian CPUs +# https://bugzilla.redhat.com/show_bug.cgi?id=1892807 +ExcludeArch: s390x + +BuildRequires: cmake +BuildRequires: gcc-c++ +# Library dependencies +BuildRequires: fizz-devel +BuildRequires: folly-devel + +%description +Wangle is a library that makes it easy to build protocols, application clients, +and application servers. + +It's like Netty + Finagle smooshed together, but in C++. + + +%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}. + + +%prep +%autosetup -c -p1 + + +%build +%cmake wangle \ + -DCMAKE_INSTALL_DIR=%{_libdir}/cmake/%{name} \ + -DPACKAGE_VERSION=%{version} \ + -DSO_VERSION=%{version} +%cmake_build + + +%install +%cmake_install +find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';' + + +%if %{with tests} +%check +%ctest +%endif + + +%files +%license LICENSE +%{_libdir}/*.so.* + +%files devel +%doc CONTRIBUTING.md README.md tutorial.md +%{_includedir}/* +%{_libdir}/*.so +%{_libdir}/cmake/%{name} + + +%changelog +* Wed Oct 28 2020 Michel Alexandre Salim - 2020.10.26.00-2 +- Add ExcludeArch on s390x due to dependency on folly + +* Mon Oct 26 2020 Michel Alexandre Salim - 2020.10.26.00-1 +- Initial package