]>
Commit | Line | Data |
---|---|---|
987f958e ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without static_libs # don't build static libraries | |
98eebf8c | 4 | %bcond_with tests # build with tests |
987f958e | 5 | |
94baf25c | 6 | Summary: Library of C++11 components designed with practicality and efficiency in mind |
987f958e | 7 | Name: folly |
b214efb1 JR |
8 | Version: 0.57.0 |
9 | Release: 1 | |
987f958e ER |
10 | License: Apache v2.0 |
11 | Group: Libraries | |
d4b12164 | 12 | Source0: https://github.com/facebook/folly/archive/v%{version}/%{name}-%{version}.tar.gz |
b214efb1 | 13 | # Source0-md5: 226d9dc1b12819c9a53735dc6fa8cc8a |
f55375ac | 14 | Patch0: gcc5.patch |
98eebf8c | 15 | URL: https://github.com/facebook/folly |
c09b0dc4 ER |
16 | BuildRequires: autoconf |
17 | BuildRequires: automake | |
987f958e ER |
18 | BuildRequires: boost-devel >= 1.20.0 |
19 | BuildRequires: double-conversion-devel | |
20 | BuildRequires: gflags-devel | |
3a553404 | 21 | BuildRequires: glog-devel |
98eebf8c | 22 | %{?with_tests:BuildRequires: gtest-devel >= 1.6.0} |
c09b0dc4 | 23 | BuildRequires: libevent-devel |
987f958e | 24 | BuildRequires: libstdc++-devel |
c09b0dc4 ER |
25 | BuildRequires: libtool |
26 | BuildRequires: m4 | |
27 | BuildRequires: openssl-devel | |
28 | BuildRequires: python | |
29 | BuildRequires: python-modules | |
d4b12164 | 30 | BuildRequires: rpmbuild(macros) >= 1.583 |
423f0b7b | 31 | ExclusiveArch: %{x8664} |
987f958e ER |
32 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
33 | ||
98eebf8c ER |
34 | %define sover %(echo %{version} | cut -d. -f2) |
35 | ||
d4b12164 | 36 | # missing openssl linking |
98eebf8c | 37 | %define skip_post_check_so libfolly.so.%{sover}.0.0 |
d4b12164 | 38 | |
987f958e | 39 | %description |
4c898fa9 ER |
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. | |
46 | ||
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. | |
987f958e ER |
51 | |
52 | %package devel | |
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} | |
57 | ||
58 | %description devel | |
59 | Header files for %{name} library. | |
60 | ||
61 | %description devel -l pl.UTF-8 | |
62 | Pliki nagłówkowe biblioteki %{name}. | |
63 | ||
64 | %package static | |
65 | Summary: Static %{name} library | |
66 | Summary(pl.UTF-8): Statyczna biblioteka %{name} | |
67 | Group: Development/Libraries | |
68 | Requires: %{name}-devel = %{version}-%{release} | |
69 | ||
70 | %description static | |
71 | Static %{name} library. | |
72 | ||
73 | %description static -l pl.UTF-8 | |
74 | Statyczna biblioteka %{name}. | |
75 | ||
76 | %prep | |
d4b12164 | 77 | %setup -q |
f55375ac | 78 | %patch0 -p1 |
987f958e | 79 | |
d4b12164 | 80 | #ln -s %{_usrsrc}/gtest folly/test/gtest-1.7.0 |
987f958e ER |
81 | |
82 | %build | |
83 | cd folly | |
84 | %{__libtoolize} | |
85 | %{__aclocal} | |
86 | %{__autoconf} | |
87 | %{__autoheader} | |
88 | %{__automake} | |
987f958e ER |
89 | %configure \ |
90 | %{!?with_static_libs:--disable-static} | |
91 | %{__make} | |
98eebf8c | 92 | %{?with_tests:%{__make} check} |
987f958e ER |
93 | |
94 | %install | |
95 | rm -rf $RPM_BUILD_ROOT | |
96 | %{__make} -C folly install \ | |
97 | DESTDIR=$RPM_BUILD_ROOT | |
98 | ||
99 | # these aren't supposed to be installed! | |
d4b12164 | 100 | #rm $RPM_BUILD_ROOT%{_libdir}/libgtest* |
987f958e ER |
101 | |
102 | %clean | |
103 | rm -rf $RPM_BUILD_ROOT | |
104 | ||
105 | %post -p /sbin/ldconfig | |
106 | %postun -p /sbin/ldconfig | |
107 | ||
108 | %files | |
109 | %defattr(644,root,root,755) | |
98eebf8c | 110 | %doc README.md LICENSE |
987f958e | 111 | %attr(755,root,root) %{_libdir}/libfolly.so.*.*.* |
98eebf8c | 112 | %ghost %{_libdir}/libfolly.so.%{sover} |
987f958e | 113 | %attr(755,root,root) %{_libdir}/libfollybenchmark.so.*.*.* |
98eebf8c | 114 | %ghost %{_libdir}/libfollybenchmark.so.%{sover} |
987f958e ER |
115 | |
116 | %files devel | |
117 | %defattr(644,root,root,755) | |
118 | %{_libdir}/libfolly.so | |
119 | %{_libdir}/libfollybenchmark.so | |
987f958e ER |
120 | %{_libdir}/libfolly.la |
121 | %{_libdir}/libfollybenchmark.la | |
987f958e ER |
122 | %{_includedir}/folly |
123 | ||
124 | %if %{with static_libs} | |
125 | %files static | |
126 | %defattr(644,root,root,755) | |
127 | %{_libdir}/libfolly.a | |
128 | %{_libdir}/libfollybenchmark.a | |
987f958e | 129 | %endif |