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: 3c34637e6914a989dd5440d0f57dc2f4
9 # Do not install COPYING, install ChangeLog, distribution specific
10 Patch0: %{name}-1.5.0-rc3-Install-documentation-according-to-guidelines.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}.
43 # Remove pregenerated documentation
44 rm -r doc/html/_static doc/html/*.{html,inv,js} doc/man/*.3
47 %{__aclocal} -I build/autotools/m4
52 # Switching experimental-features support changes ABI (bson_visitor_t type)
56 --disable-debug-symbols \
58 --enable-extra-align \
60 --enable-libtool-lock \
62 --disable-maintainer-flags \
64 --disable-optimizations \
66 --disable-silent-rules \
70 # Explicit man target is needed for generating manual pages.
71 # If you produced HTML pages be ware doc/conf.py injects tracking JavaScript
72 # code (search for add_ga_javascript function).
80 rm -rf $RPM_BUILD_ROOT
82 DESTDIR=$RPM_BUILD_ROOT
84 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libbson-1.0.la
86 # Install examples here because it's forbidden to use relative %%doc with
87 # installing into %%_pkgdocdir
88 install -d $RPM_BUILD_ROOT%{_docdir}/%{name}-devel/examples
89 install -t $RPM_BUILD_ROOT%{_docdir}/%{name}-devel/examples examples/*.c
92 rm -rf $RPM_BUILD_ROOT
94 %post -p /sbin/ldconfig
95 %postun -p /sbin/ldconfig
98 %defattr(644,root,root,755)
99 %doc COPYING THIRD_PARTY_NOTICES
100 # AUTHORS is empty, README etc. are installed by "make install"
102 %attr(755,root,root) %{_libdir}/libbson-1.0.so.*.*.*
103 %ghost %{_libdir}/libbson-1.0.so.0
106 %defattr(644,root,root,755)
107 %{_docdir}/%{name}-devel
108 %{_includedir}/libbson-1.0
109 %{_libdir}/libbson-1.0.so
110 %{_libdir}/cmake/libbson-1.0
111 %{_pkgconfigdir}/libbson-1.0.pc
112 %{_mandir}/man3/bson_*.3*