]>
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 |
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 |
987f958e | 22 | 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 | ||
d4b12164 ER |
34 | # missing openssl linking |
35 | %define skip_post_check_so libfolly.so.31.0.0 | |
36 | ||
987f958e | 37 | %description |
4c898fa9 ER |
38 | Folly (acronymed loosely after Facebook Open Source Library) is a |
39 | library of C++11 components designed with practicality and efficiency | |
40 | in mind. It complements (as opposed to competing against) offerings | |
41 | such as Boost and of course std. In fact, we embark on defining our | |
42 | own component only when something we need is either not available, or | |
43 | does not meet the needed performance profile. | |
44 | ||
45 | Performance concerns permeate much of Folly, sometimes leading to | |
46 | designs that are more idiosyncratic than they would otherwise be (see | |
47 | e.g. PackedSyncPtr.h, SmallLocks.h). Good performance at large scale | |
48 | is a unifying theme in all of Folly. | |
987f958e ER |
49 | |
50 | %package devel | |
51 | Summary: Header files for %{name} library | |
52 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki %{name} | |
53 | Group: Development/Libraries | |
54 | Requires: %{name} = %{version}-%{release} | |
55 | ||
56 | %description devel | |
57 | Header files for %{name} library. | |
58 | ||
59 | %description devel -l pl.UTF-8 | |
60 | Pliki nagłówkowe biblioteki %{name}. | |
61 | ||
62 | %package static | |
63 | Summary: Static %{name} library | |
64 | Summary(pl.UTF-8): Statyczna biblioteka %{name} | |
65 | Group: Development/Libraries | |
66 | Requires: %{name}-devel = %{version}-%{release} | |
67 | ||
68 | %description static | |
69 | Static %{name} library. | |
70 | ||
71 | %description static -l pl.UTF-8 | |
72 | Statyczna biblioteka %{name}. | |
73 | ||
74 | %prep | |
d4b12164 | 75 | %setup -q |
987f958e | 76 | |
d4b12164 | 77 | #ln -s %{_usrsrc}/gtest folly/test/gtest-1.7.0 |
987f958e ER |
78 | |
79 | %build | |
80 | cd folly | |
81 | %{__libtoolize} | |
82 | %{__aclocal} | |
83 | %{__autoconf} | |
84 | %{__autoheader} | |
85 | %{__automake} | |
987f958e ER |
86 | %configure \ |
87 | %{!?with_static_libs:--disable-static} | |
88 | %{__make} | |
89 | ||
90 | %install | |
91 | rm -rf $RPM_BUILD_ROOT | |
92 | %{__make} -C folly install \ | |
93 | DESTDIR=$RPM_BUILD_ROOT | |
94 | ||
95 | # these aren't supposed to be installed! | |
d4b12164 | 96 | #rm $RPM_BUILD_ROOT%{_libdir}/libgtest* |
987f958e ER |
97 | |
98 | %clean | |
99 | rm -rf $RPM_BUILD_ROOT | |
100 | ||
101 | %post -p /sbin/ldconfig | |
102 | %postun -p /sbin/ldconfig | |
103 | ||
104 | %files | |
105 | %defattr(644,root,root,755) | |
106 | %doc README LICENSE | |
107 | %attr(755,root,root) %{_libdir}/libfolly.so.*.*.* | |
d4b12164 | 108 | %ghost %{_libdir}/libfolly.so.31 |
987f958e | 109 | %attr(755,root,root) %{_libdir}/libfollybenchmark.so.*.*.* |
d4b12164 | 110 | %ghost %{_libdir}/libfollybenchmark.so.31 |
987f958e ER |
111 | |
112 | %files devel | |
113 | %defattr(644,root,root,755) | |
114 | %{_libdir}/libfolly.so | |
115 | %{_libdir}/libfollybenchmark.so | |
987f958e ER |
116 | %{_libdir}/libfolly.la |
117 | %{_libdir}/libfollybenchmark.la | |
987f958e ER |
118 | %{_includedir}/folly |
119 | ||
120 | %if %{with static_libs} | |
121 | %files static | |
122 | %defattr(644,root,root,755) | |
123 | %{_libdir}/libfolly.a | |
124 | %{_libdir}/libfollybenchmark.a | |
987f958e | 125 | %endif |