1 Summary: Building, parsing, and iterating BSON documents
5 License: ASL 2.0 and ISC and MIT and zlib
7 Source0: https://github.com/mongodb/libbson/releases/download/%{version}/%{name}-%{version}.tar.gz
8 # Source0-md5: 716127054644aec0cf751a2c0c7693b1
9 Patch0: %{name}-1.5.0-rc3-Install-documentation-according-to-guidelines.patch
10 Patch1: sphinx-no-fatal-warn.patch
11 URL: https://github.com/mongodb/libbson
12 BuildRequires: autoconf
13 BuildRequires: automake
14 BuildRequires: coreutils
15 BuildRequires: libtool
16 BuildRequires: pkgconfig
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)
26 This is a library providing useful routines related to building,
27 parsing, and iterating BSON documents <http://bsonspec.org/>.
30 Summary: Development files for %{name}
32 Group: Development/Libraries
33 Requires: %{name} = %{version}-%{release}
36 This package contains libraries and header files needed for developing
37 applications that use %{name}.
44 # Remove pregenerated documentation
45 rm -r doc/html/_static doc/html/*.{html,inv,js} doc/man/*.3
48 %{__aclocal} -I build/autotools/m4
53 # Switching experimental-features support changes ABI (bson_visitor_t type)
57 --disable-debug-symbols \
59 --enable-extra-align \
61 --enable-libtool-lock \
63 --disable-maintainer-flags \
65 --disable-optimizations \
67 --disable-silent-rules \
69 %{?with_tests:--enable-tests}
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).
81 rm -rf $RPM_BUILD_ROOT
83 DESTDIR=$RPM_BUILD_ROOT
85 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libbson-1.0.la
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
93 rm -rf $RPM_BUILD_ROOT
95 %post -p /sbin/ldconfig
96 %postun -p /sbin/ldconfig
99 %defattr(644,root,root,755)
100 %doc COPYING THIRD_PARTY_NOTICES
101 # AUTHORS is empty, README etc. are installed by "make install"
103 %attr(755,root,root) %{_libdir}/libbson-1.0.so.*.*.*
104 %ghost %{_libdir}/libbson-1.0.so.0
107 %defattr(644,root,root,755)
108 %{_docdir}/%{name}-devel
109 %{_includedir}/libbson-1.0
110 %{_libdir}/libbson-1.0.so
111 %{_libdir}/cmake/libbson-1.0
112 %{_pkgconfigdir}/libbson-1.0.pc
113 %{_mandir}/man3/bson_*.3*