]> git.pld-linux.org Git - SPECS.git/blob - libmongocrypt.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / libmongocrypt.spec
1 #
2 # Conditional build:
3 %bcond_without  apidocs         # do not build and package API docs
4
5 Summary:        The companion C library for client side encryption in drivers
6 Name:           libmongocrypt
7 Version:        1.0.4
8 Release:        1
9 # see kms-message/THIRD_PARTY_NOTICES
10 # kms-message/src/kms_b64.c is ISC
11 # everything else is ASL 2.0
12 License:        ASL 2.0 and ISC
13 Group:          Libraries
14 Source0:        https://github.com/mongodb/libmongocrypt/archive/%{version}/%{name}-%{version}.tar.gz
15 # Source0-md5:  e8939c3ed5c8b797dd8d4ea1290f7652
16 URL:            https://github.com/mongodb/libmongocrypt
17 BuildRequires:  cmake >= 3.5
18 %{?with_apidocs:BuildRequires:  doxygen}
19 BuildRequires:  libbson-devel >= 1.11
20 BuildRequires:  libstdc++-devel
21 BuildRequires:  openssl-devel
22 BuildRequires:  pkgconfig
23 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
24
25 %description
26 The companion C library for client side encryption in drivers.
27
28 %package devel
29 Summary:        Header files and development libraries for %{name}
30 Group:          Development/Libraries
31 Requires:       %{name} = %{version}-%{release}
32
33 %description devel
34 This package contains the header files and development libraries for
35 %{name}.
36
37 %prep
38 %setup -q
39 echo "%{version}" > VERSION_CURRENT
40
41 %build
42 %cmake \
43         -DCMAKE_C_FLAGS="%{optflags} -fPIC" \
44         -DENABLE_SHARED_BSON:BOOL=ON \
45         -DENABLE_STATIC:BOOL=OFF \
46         .
47
48 %{__make}
49
50 %if %{with tests}
51 %{__make} test
52 %endif
53
54 %if %{with apidocs}
55 doxygen doc/Doxygen
56 %endif
57
58 %install
59 rm -rf $RPM_BUILD_ROOT
60 %{__make} install \
61         DESTDIR=$RPM_BUILD_ROOT
62
63 %clean
64 rm -rf $RPM_BUILD_ROOT
65
66 %post   -p /sbin/ldconfig
67 %postun -p /sbin/ldconfig
68
69 %files
70 %defattr(644,root,root,755)
71 %doc LICENSE
72 %ghost %{_libdir}/libmongocrypt.so.0
73 %attr(755,root,root) %{_libdir}/libmongocrypt.so.*.*.*
74 %ghost %{_libdir}/libkms_message.so.0
75 %attr(755,root,root) %{_libdir}/libkms_message.so.*.*.*
76
77 %files devel
78 %defattr(644,root,root,755)
79 %doc *.md
80 %if %{with apidocs}
81 %doc doc/html
82 %endif
83 %{_libdir}/libkms_message.so
84 %{_libdir}/libmongocrypt.so
85 %{_includedir}/kms_message
86 %{_includedir}/mongocrypt
87 %{_libdir}/cmake/kms_message
88 %{_libdir}/cmake/mongocrypt
89 %{_pkgconfigdir}/libkms_message.pc
90 %{_pkgconfigdir}/libmongocrypt.pc
This page took 0.383109 seconds and 3 git commands to generate.