]>
Commit | Line | Data |
---|---|---|
987f958e ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without static_libs # don't build static libraries | |
4 | ||
94baf25c | 5 | Summary: Library of C++11 components designed with practicality and efficiency in mind |
987f958e ER |
6 | Name: folly |
7 | Version: 0.1 | |
a801c479 | 8 | Release: 0.9 |
987f958e ER |
9 | License: Apache v2.0 |
10 | Group: Libraries | |
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 | |
a801c479 | 15 | Patch1: install-headers.patch |
4c898fa9 | 16 | URL: https://github.com/facebook/folly/blob/master/folly/docs/Overview.md |
987f958e ER |
17 | BuildRequires: boost-devel >= 1.20.0 |
18 | BuildRequires: double-conversion-devel | |
75aeafe8 | 19 | BuildRequires: double-conversion-static |
987f958e | 20 | BuildRequires: gflags-devel |
3a553404 | 21 | BuildRequires: glog-devel |
987f958e ER |
22 | BuildRequires: gtest-devel >= 1.6.0 |
23 | BuildRequires: libstdc++-devel | |
423f0b7b | 24 | ExclusiveArch: %{x8664} |
987f958e ER |
25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
26 | ||
27 | %description | |
4c898fa9 ER |
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. | |
34 | ||
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. | |
987f958e ER |
39 | |
40 | %package devel | |
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} | |
45 | ||
46 | %description devel | |
47 | Header files for %{name} library. | |
48 | ||
49 | %description devel -l pl.UTF-8 | |
50 | Pliki nagłówkowe biblioteki %{name}. | |
51 | ||
52 | %package static | |
53 | Summary: Static %{name} library | |
54 | Summary(pl.UTF-8): Statyczna biblioteka %{name} | |
55 | Group: Development/Libraries | |
56 | Requires: %{name}-devel = %{version}-%{release} | |
57 | ||
58 | %description static | |
59 | Static %{name} library. | |
60 | ||
61 | %description static -l pl.UTF-8 | |
62 | Statyczna biblioteka %{name}. | |
63 | ||
64 | %prep | |
65 | %setup -qc | |
66 | mv folly-*/* . | |
67 | %patch0 -p1 | |
a801c479 | 68 | %patch1 -p1 |
987f958e ER |
69 | |
70 | # this is gtest-1.6 seem to work | |
71 | ln -s %{_usrsrc}/gtest folly/test/gtest-1.6.0 | |
72 | ||
73 | %build | |
74 | cd folly | |
75 | %{__libtoolize} | |
76 | %{__aclocal} | |
77 | %{__autoconf} | |
78 | %{__autoheader} | |
79 | %{__automake} | |
80 | CPPFLAGS="%{rpmcppflags} -I/usr/include/double-conversion" | |
81 | %configure \ | |
82 | %{!?with_static_libs:--disable-static} | |
83 | %{__make} | |
84 | ||
85 | %install | |
86 | rm -rf $RPM_BUILD_ROOT | |
87 | %{__make} -C folly install \ | |
88 | DESTDIR=$RPM_BUILD_ROOT | |
89 | ||
90 | # these aren't supposed to be installed! | |
91 | rm $RPM_BUILD_ROOT%{_libdir}/libgtest* | |
92 | ||
93 | %clean | |
94 | rm -rf $RPM_BUILD_ROOT | |
95 | ||
96 | %post -p /sbin/ldconfig | |
97 | %postun -p /sbin/ldconfig | |
98 | ||
99 | %files | |
100 | %defattr(644,root,root,755) | |
101 | %doc README LICENSE | |
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 | |
110 | ||
111 | %files devel | |
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 | |
121 | %{_includedir}/folly | |
122 | ||
123 | %if %{with static_libs} | |
124 | %files static | |
125 | %defattr(644,root,root,755) | |
126 | %{_libdir}/libfolly.a | |
127 | %{_libdir}/libfollybenchmark.a | |
128 | %{_libdir}/libfollyfingerprint.a | |
129 | %{_libdir}/libfollytimeout_queue.a | |
130 | %endif |