]> git.pld-linux.org Git - packages/libbson.git/blob - libbson.spec
5a3804b7367a078ceb7c09ec53803dc043debabd
[packages/libbson.git] / libbson.spec
1 Summary:        Building, parsing, and iterating BSON documents
2 Name:           libbson
3 Version:        1.8.0
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
8 # Source0-md5:  8b3c64570eec721f951831958e707a5a
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)
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
42
43 # Remove pregenerated documentation
44 rm -r doc/html/_static doc/html/*.{html,inv,js} doc/man/*.3
45
46 %build
47 %{__aclocal} -I build/autotools/m4
48 %{__libtoolize}
49 %{__autoconf}
50 %{__automake}
51
52 # Switching experimental-features support changes ABI (bson_visitor_t type)
53 %configure \
54         --disable-coverage \
55         --disable-debug \
56         --disable-debug-symbols \
57         --enable-examples \
58         --enable-extra-align \
59         --disable-html-docs \
60         --enable-libtool-lock \
61         --disable-lto \
62         --disable-maintainer-flags \
63         --enable-man-pages \
64         --disable-optimizations \
65         --enable-shared \
66         --disable-silent-rules \
67         --disable-static \
68         --enable-tests
69
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).
73 %{__make} all doc/man
74
75 %if %{with tests}
76 %{__make} check
77 %endif
78
79 %install
80 rm -rf $RPM_BUILD_ROOT
81 %{__make} install \
82         DESTDIR=$RPM_BUILD_ROOT
83
84 %{__rm} $RPM_BUILD_ROOT%{_libdir}/libbson-1.0.la
85
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
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 COPYING THIRD_PARTY_NOTICES
100 # AUTHORS is empty, README etc. are installed by "make install"
101 %{_docdir}/%{name}
102 %attr(755,root,root) %{_libdir}/libbson-1.0.so.*.*.*
103 %ghost %{_libdir}/libbson-1.0.so.0
104
105 %files devel
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*
This page took 0.056684 seconds and 2 git commands to generate.