]>
Commit | Line | Data |
---|---|---|
251816fb ER |
1 | Summary: Building, parsing, and iterating BSON documents |
2 | Name: libbson | |
40833aed | 3 | Version: 1.9.5 |
251816fb ER |
4 | Release: 1 |
5 | License: ASL 2.0 and ISC and MIT and zlib | |
6 | Group: Libraries | |
7 | Source0: https://github.com/mongodb/libbson/releases/download/%{version}/%{name}-%{version}.tar.gz | |
40833aed | 8 | # Source0-md5: 716127054644aec0cf751a2c0c7693b1 |
251816fb | 9 | Patch0: %{name}-1.5.0-rc3-Install-documentation-according-to-guidelines.patch |
0a91ed35 | 10 | Patch1: sphinx-no-fatal-warn.patch |
251816fb ER |
11 | URL: https://github.com/mongodb/libbson |
12 | BuildRequires: autoconf | |
13 | BuildRequires: automake | |
14 | BuildRequires: coreutils | |
15 | BuildRequires: libtool | |
66ef46d4 | 16 | BuildRequires: pkgconfig |
251816fb ER |
17 | BuildRequires: sphinx-pdg |
18 | # Modified (with bson allocator and some warning fixes and huge indentation | |
19 | # refactoring) jsonsl is bundled <https://github.com/mnunberg/jsonsl>. | |
20 | # jsonsl upstream likes copylib approach and does not plan a release | |
21 | # <https://github.com/mnunberg/jsonsl/issues/14>. | |
22 | Provides: bundled(jsonsl) | |
23 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
24 | ||
25 | %description | |
26 | This is a library providing useful routines related to building, | |
27 | parsing, and iterating BSON documents <http://bsonspec.org/>. | |
28 | ||
29 | %package devel | |
30 | Summary: Development files for %{name} | |
31 | License: Apache v2.0 | |
32 | Group: Development/Libraries | |
33 | Requires: %{name} = %{version}-%{release} | |
34 | ||
35 | %description devel | |
36 | This package contains libraries and header files needed for developing | |
37 | applications that use %{name}. | |
38 | ||
39 | %prep | |
40 | %setup -q | |
41 | %patch0 -p1 | |
0a91ed35 | 42 | %patch1 -p1 |
251816fb ER |
43 | |
44 | # Remove pregenerated documentation | |
45 | rm -r doc/html/_static doc/html/*.{html,inv,js} doc/man/*.3 | |
46 | ||
47 | %build | |
48 | %{__aclocal} -I build/autotools/m4 | |
49 | %{__libtoolize} | |
50 | %{__autoconf} | |
51 | %{__automake} | |
52 | ||
53 | # Switching experimental-features support changes ABI (bson_visitor_t type) | |
54 | %configure \ | |
55 | --disable-coverage \ | |
56 | --disable-debug \ | |
57 | --disable-debug-symbols \ | |
58 | --enable-examples \ | |
59 | --enable-extra-align \ | |
60 | --disable-html-docs \ | |
61 | --enable-libtool-lock \ | |
62 | --disable-lto \ | |
63 | --disable-maintainer-flags \ | |
64 | --enable-man-pages \ | |
65 | --disable-optimizations \ | |
66 | --enable-shared \ | |
67 | --disable-silent-rules \ | |
68 | --disable-static \ | |
89fad65f | 69 | %{?with_tests:--enable-tests} |
251816fb ER |
70 | |
71 | # Explicit man target is needed for generating manual pages. | |
72 | # If you produced HTML pages be ware doc/conf.py injects tracking JavaScript | |
73 | # code (search for add_ga_javascript function). | |
74 | %{__make} all doc/man | |
75 | ||
76 | %if %{with tests} | |
77 | %{__make} check | |
78 | %endif | |
79 | ||
80 | %install | |
81 | rm -rf $RPM_BUILD_ROOT | |
82 | %{__make} install \ | |
83 | DESTDIR=$RPM_BUILD_ROOT | |
84 | ||
85 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libbson-1.0.la | |
86 | ||
87 | # Install examples here because it's forbidden to use relative %%doc with | |
88 | # installing into %%_pkgdocdir | |
89 | install -d $RPM_BUILD_ROOT%{_docdir}/%{name}-devel/examples | |
90 | install -t $RPM_BUILD_ROOT%{_docdir}/%{name}-devel/examples examples/*.c | |
91 | ||
92 | %clean | |
93 | rm -rf $RPM_BUILD_ROOT | |
94 | ||
95 | %post -p /sbin/ldconfig | |
96 | %postun -p /sbin/ldconfig | |
97 | ||
98 | %files | |
99 | %defattr(644,root,root,755) | |
100 | %doc COPYING THIRD_PARTY_NOTICES | |
101 | # AUTHORS is empty, README etc. are installed by "make install" | |
102 | %{_docdir}/%{name} | |
103 | %attr(755,root,root) %{_libdir}/libbson-1.0.so.*.*.* | |
104 | %ghost %{_libdir}/libbson-1.0.so.0 | |
105 | ||
106 | %files devel | |
107 | %defattr(644,root,root,755) | |
108 | %{_docdir}/%{name}-devel | |
109 | %{_includedir}/libbson-1.0 | |
110 | %{_libdir}/libbson-1.0.so | |
5b623771 | 111 | %{_libdir}/cmake/libbson-1.0 |
251816fb ER |
112 | %{_pkgconfigdir}/libbson-1.0.pc |
113 | %{_mandir}/man3/bson_*.3* |