]>
Commit | Line | Data |
---|---|---|
d4b12164 ER |
1 | # TODO |
2 | # - add testing | |
987f958e ER |
3 | # |
4 | # Conditional build: | |
5 | %bcond_without static_libs # don't build static libraries | |
6 | ||
94baf25c | 7 | Summary: Library of C++11 components designed with practicality and efficiency in mind |
987f958e | 8 | Name: folly |
d4b12164 ER |
9 | Version: 0.31.0 |
10 | Release: 1 | |
987f958e ER |
11 | License: Apache v2.0 |
12 | Group: Libraries | |
d4b12164 ER |
13 | Source0: https://github.com/facebook/folly/archive/v%{version}/%{name}-%{version}.tar.gz |
14 | # Source0-md5: 40c654db9055e9dd735907b0a430c16b | |
4c898fa9 | 15 | URL: https://github.com/facebook/folly/blob/master/folly/docs/Overview.md |
987f958e ER |
16 | BuildRequires: boost-devel >= 1.20.0 |
17 | BuildRequires: double-conversion-devel | |
75aeafe8 | 18 | BuildRequires: double-conversion-static |
987f958e | 19 | BuildRequires: gflags-devel |
3a553404 | 20 | BuildRequires: glog-devel |
987f958e ER |
21 | BuildRequires: gtest-devel >= 1.6.0 |
22 | BuildRequires: libstdc++-devel | |
d4b12164 | 23 | BuildRequires: rpmbuild(macros) >= 1.583 |
423f0b7b | 24 | ExclusiveArch: %{x8664} |
987f958e ER |
25 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
26 | ||
d4b12164 ER |
27 | # missing openssl linking |
28 | %define skip_post_check_so libfolly.so.31.0.0 | |
29 | ||
987f958e | 30 | %description |
4c898fa9 ER |
31 | Folly (acronymed loosely after Facebook Open Source Library) is a |
32 | library of C++11 components designed with practicality and efficiency | |
33 | in mind. It complements (as opposed to competing against) offerings | |
34 | such as Boost and of course std. In fact, we embark on defining our | |
35 | own component only when something we need is either not available, or | |
36 | does not meet the needed performance profile. | |
37 | ||
38 | Performance concerns permeate much of Folly, sometimes leading to | |
39 | designs that are more idiosyncratic than they would otherwise be (see | |
40 | e.g. PackedSyncPtr.h, SmallLocks.h). Good performance at large scale | |
41 | is a unifying theme in all of Folly. | |
987f958e ER |
42 | |
43 | %package devel | |
44 | Summary: Header files for %{name} library | |
45 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki %{name} | |
46 | Group: Development/Libraries | |
47 | Requires: %{name} = %{version}-%{release} | |
48 | ||
49 | %description devel | |
50 | Header files for %{name} library. | |
51 | ||
52 | %description devel -l pl.UTF-8 | |
53 | Pliki nagłówkowe biblioteki %{name}. | |
54 | ||
55 | %package static | |
56 | Summary: Static %{name} library | |
57 | Summary(pl.UTF-8): Statyczna biblioteka %{name} | |
58 | Group: Development/Libraries | |
59 | Requires: %{name}-devel = %{version}-%{release} | |
60 | ||
61 | %description static | |
62 | Static %{name} library. | |
63 | ||
64 | %description static -l pl.UTF-8 | |
65 | Statyczna biblioteka %{name}. | |
66 | ||
67 | %prep | |
d4b12164 | 68 | %setup -q |
987f958e | 69 | |
d4b12164 | 70 | #ln -s %{_usrsrc}/gtest folly/test/gtest-1.7.0 |
987f958e ER |
71 | |
72 | %build | |
73 | cd folly | |
74 | %{__libtoolize} | |
75 | %{__aclocal} | |
76 | %{__autoconf} | |
77 | %{__autoheader} | |
78 | %{__automake} | |
987f958e ER |
79 | %configure \ |
80 | %{!?with_static_libs:--disable-static} | |
81 | %{__make} | |
82 | ||
83 | %install | |
84 | rm -rf $RPM_BUILD_ROOT | |
85 | %{__make} -C folly install \ | |
86 | DESTDIR=$RPM_BUILD_ROOT | |
87 | ||
88 | # these aren't supposed to be installed! | |
d4b12164 | 89 | #rm $RPM_BUILD_ROOT%{_libdir}/libgtest* |
987f958e ER |
90 | |
91 | %clean | |
92 | rm -rf $RPM_BUILD_ROOT | |
93 | ||
94 | %post -p /sbin/ldconfig | |
95 | %postun -p /sbin/ldconfig | |
96 | ||
97 | %files | |
98 | %defattr(644,root,root,755) | |
99 | %doc README LICENSE | |
100 | %attr(755,root,root) %{_libdir}/libfolly.so.*.*.* | |
d4b12164 | 101 | %ghost %{_libdir}/libfolly.so.31 |
987f958e | 102 | %attr(755,root,root) %{_libdir}/libfollybenchmark.so.*.*.* |
d4b12164 | 103 | %ghost %{_libdir}/libfollybenchmark.so.31 |
987f958e ER |
104 | |
105 | %files devel | |
106 | %defattr(644,root,root,755) | |
107 | %{_libdir}/libfolly.so | |
108 | %{_libdir}/libfollybenchmark.so | |
987f958e ER |
109 | %{_libdir}/libfolly.la |
110 | %{_libdir}/libfollybenchmark.la | |
987f958e ER |
111 | %{_includedir}/folly |
112 | ||
113 | %if %{with static_libs} | |
114 | %files static | |
115 | %defattr(644,root,root,755) | |
116 | %{_libdir}/libfolly.a | |
117 | %{_libdir}/libfollybenchmark.a | |
987f958e | 118 | %endif |