3 %bcond_without static_libs # don't build static libraries
5 Summary: Folly is an open-source C++ library developed and used at Facebook
11 Source0: https://github.com/facebook/folly/archive/master/%{name}.tar.gz
12 # Source0-md5: d7ff084fbd77dc34bfd9469c7a974547
13 Patch0: https://github.com/facebook/folly/pull/29.patch
14 # Patch0-md5: 8745f0742d7199a5d3b2864620812f89
15 Patch1: install-headers.patch
16 URL: https://github.com/facebook/folly/blob/master/folly/docs/Overview.md
17 BuildRequires: boost-devel >= 1.20.0
18 BuildRequires: double-conversion-devel
19 BuildRequires: double-conversion-static
20 BuildRequires: gflags-devel
21 BuildRequires: glog-devel
22 BuildRequires: gtest-devel >= 1.6.0
23 BuildRequires: libstdc++-devel
24 ExclusiveArch: %{x8664}
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28 Folly (acronymed loosely after Facebook Open Source Library) is a
29 library of C++11 components designed with practicality and efficiency
30 in mind. It complements (as opposed to competing against) offerings
31 such as Boost and of course std. In fact, we embark on defining our
32 own component only when something we need is either not available, or
33 does not meet the needed performance profile.
35 Performance concerns permeate much of Folly, sometimes leading to
36 designs that are more idiosyncratic than they would otherwise be (see
37 e.g. PackedSyncPtr.h, SmallLocks.h). Good performance at large scale
38 is a unifying theme in all of Folly.
41 Summary: Header files for %{name} library
42 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki %{name}
43 Group: Development/Libraries
44 Requires: %{name} = %{version}-%{release}
47 Header files for %{name} library.
49 %description devel -l pl.UTF-8
50 Pliki nagłówkowe biblioteki %{name}.
53 Summary: Static %{name} library
54 Summary(pl.UTF-8): Statyczna biblioteka %{name}
55 Group: Development/Libraries
56 Requires: %{name}-devel = %{version}-%{release}
59 Static %{name} library.
61 %description static -l pl.UTF-8
62 Statyczna biblioteka %{name}.
70 # this is gtest-1.6 seem to work
71 ln -s %{_usrsrc}/gtest folly/test/gtest-1.6.0
80 CPPFLAGS="%{rpmcppflags} -I/usr/include/double-conversion"
82 %{!?with_static_libs:--disable-static}
86 rm -rf $RPM_BUILD_ROOT
87 %{__make} -C folly install \
88 DESTDIR=$RPM_BUILD_ROOT
90 # these aren't supposed to be installed!
91 rm $RPM_BUILD_ROOT%{_libdir}/libgtest*
94 rm -rf $RPM_BUILD_ROOT
96 %post -p /sbin/ldconfig
97 %postun -p /sbin/ldconfig
100 %defattr(644,root,root,755)
102 %attr(755,root,root) %{_libdir}/libfolly.so.*.*.*
103 %ghost %{_libdir}/libfolly.so.0
104 %attr(755,root,root) %{_libdir}/libfollybenchmark.so.*.*.*
105 %ghost %{_libdir}/libfollybenchmark.so.0
106 %attr(755,root,root) %{_libdir}/libfollyfingerprint.so.*.*.*
107 %ghost %{_libdir}/libfollyfingerprint.so.0
108 %attr(755,root,root) %{_libdir}/libfollytimeout_queue.so.*.*.*
109 %ghost %{_libdir}/libfollytimeout_queue.so.0
112 %defattr(644,root,root,755)
113 %{_libdir}/libfolly.so
114 %{_libdir}/libfollybenchmark.so
115 %{_libdir}/libfollyfingerprint.so
116 %{_libdir}/libfollytimeout_queue.so
117 %{_libdir}/libfolly.la
118 %{_libdir}/libfollybenchmark.la
119 %{_libdir}/libfollyfingerprint.la
120 %{_libdir}/libfollytimeout_queue.la
123 %if %{with static_libs}
125 %defattr(644,root,root,755)
126 %{_libdir}/libfolly.a
127 %{_libdir}/libfollybenchmark.a
128 %{_libdir}/libfollyfingerprint.a
129 %{_libdir}/libfollytimeout_queue.a