3 %bcond_without static_libs # don't build static libraries
4 %bcond_with tests # build with tests
6 Summary: Library of C++11 components designed with practicality and efficiency in mind
12 Source0: https://github.com/facebook/folly/archive/v%{version}/%{name}-%{version}.tar.gz
13 # Source0-md5: d7ff7682850ea0846881fb1fb42136e9
15 URL: https://github.com/facebook/folly
16 BuildRequires: autoconf
17 BuildRequires: automake
18 BuildRequires: boost-devel >= 1.20.0
19 BuildRequires: double-conversion-devel
20 BuildRequires: gflags-devel
21 BuildRequires: glog-devel
22 %{?with_tests:BuildRequires: gtest-devel >= 1.6.0}
23 BuildRequires: libevent-devel
24 BuildRequires: libstdc++-devel
25 BuildRequires: libtool
27 BuildRequires: openssl-devel
29 BuildRequires: python-modules
30 BuildRequires: rpmbuild(macros) >= 1.583
31 ExclusiveArch: %{x8664}
32 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
34 %define sover %(echo %{version} | cut -d. -f2)
36 # missing openssl linking
37 %define skip_post_check_so libfolly.so.%{sover}.0.0
40 Folly (acronymed loosely after Facebook Open Source Library) is a
41 library of C++11 components designed with practicality and efficiency
42 in mind. It complements (as opposed to competing against) offerings
43 such as Boost and of course std. In fact, we embark on defining our
44 own component only when something we need is either not available, or
45 does not meet the needed performance profile.
47 Performance concerns permeate much of Folly, sometimes leading to
48 designs that are more idiosyncratic than they would otherwise be (see
49 e.g. PackedSyncPtr.h, SmallLocks.h). Good performance at large scale
50 is a unifying theme in all of Folly.
53 Summary: Header files for %{name} library
54 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki %{name}
55 Group: Development/Libraries
56 Requires: %{name} = %{version}-%{release}
59 Header files for %{name} library.
61 %description devel -l pl.UTF-8
62 Pliki nagłówkowe biblioteki %{name}.
65 Summary: Static %{name} library
66 Summary(pl.UTF-8): Statyczna biblioteka %{name}
67 Group: Development/Libraries
68 Requires: %{name}-devel = %{version}-%{release}
71 Static %{name} library.
73 %description static -l pl.UTF-8
74 Statyczna biblioteka %{name}.
80 #ln -s %{_usrsrc}/gtest folly/test/gtest-1.7.0
90 %{!?with_static_libs:--disable-static}
92 %{?with_tests:%{__make} check}
95 rm -rf $RPM_BUILD_ROOT
96 %{__make} -C folly install \
97 DESTDIR=$RPM_BUILD_ROOT
99 # these aren't supposed to be installed!
100 #rm $RPM_BUILD_ROOT%{_libdir}/libgtest*
103 rm -rf $RPM_BUILD_ROOT
105 %post -p /sbin/ldconfig
106 %postun -p /sbin/ldconfig
109 %defattr(644,root,root,755)
110 %doc README.md LICENSE
111 %attr(755,root,root) %{_libdir}/libfolly.so.*.*.*
112 %ghost %{_libdir}/libfolly.so.%{sover}
113 %attr(755,root,root) %{_libdir}/libfollybenchmark.so.*.*.*
114 %ghost %{_libdir}/libfollybenchmark.so.%{sover}
117 %defattr(644,root,root,755)
118 %{_libdir}/libfolly.so
119 %{_libdir}/libfollybenchmark.so
120 %{_libdir}/libfolly.la
121 %{_libdir}/libfollybenchmark.la
124 %if %{with static_libs}
126 %defattr(644,root,root,755)
127 %{_libdir}/libfolly.a
128 %{_libdir}/libfollybenchmark.a