Repository navigation
Expand file tree
/
Copy pathlibmongocrypt.spec
More file actions
161 lines (136 loc) · 4.21 KB
/
Copy pathlibmongocrypt.spec
File metadata and controls
161 lines (136 loc) · 4.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
#
# Conditional build:
%bcond_without apidocs # Doxygen API documentation
%bcond_without static_libs # static library
%bcond_with tests # test suite
%if %{without static_libs}
# tests rely on static libs (internal symbols)
%undefine with_tests
%endif
Summary: The companion C library for client side encryption in drivers
Summary(pl.UTF-8): Biblioteka towarzysząca C do szyfrowania w sterownikach po stronie klienta
Name: libmongocrypt
# 1.16+ require libbson2
Version: 1.15.2
Release: 1
# see kms-message/THIRD_PARTY_NOTICES
# kms-message/src/kms_b64.c is ISC
# everything else is Apache v2.0
License: Apache v2.0 and ISC
Group: Libraries
#Source0Download: https://github.com/mongodb/libmongocrypt/releases
Source0: https://github.com/mongodb/libmongocrypt/archive/%{version}/%{name}-%{version}.tar.gz
# Source0-md5: 4b5235a225256bebcf8cde2e1f5c0c5b
Patch0: no-Werror.patch
Patch1: %{name}-types.patch
Patch2: %{name}-tests.patch
URL: https://github.com/mongodb/libmongocrypt
BuildRequires: cmake >= 3.15
%{?with_apidocs:BuildRequires: doxygen}
BuildRequires: libbson-devel >= 1.30
%{?with_static_libs:BuildRequires: libbson-static >= 1.30}
BuildRequires: libstdc++-devel
BuildRequires: openssl-devel
BuildRequires: pkgconfig
BuildRequires: rpm-build >= 4.6
BuildRequires: rpmbuild(macros) >= 1.605
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
The companion C library for client side encryption in drivers.
%description -l pl.UTF-8
Biblioteka towarzysząca C do szyfrowania w sterownikach po stronie
klienta.
%package devel
Summary: Header files for libmongocrypt library
Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libmongocrypt
Group: Development/Libraries
Requires: %{name}%{?_isa} = %{version}-%{release}
Requires: libbson-devel >= 1.30
%description devel
This package contains the header files and other development files for
libmongocrypt library.
%description devel -l pl.UTF-8
Ten pakiet zawiera pliki nagłówkowe i inne pliki programistyczne
biblioteki libmongocrypt.
%package static
Summary: Static libmongocrypt libraries
Summary(pl.UTF-8): Statyczne biblioteki libmongocrypt
Group: Development/Libraries
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
Requires: libbson-static >= 1.30
Requires: openssl-devel
%description static
Static libmongocrypt libraries.
%description static -l pl.UTF-8
Statyczne biblioteki libmongocrypt.
%package apidocs
Summary: API documentation for libmongocrypt library
Summary(pl.UTF-8): Dokumentacja API biblioteki libmongocrypt
Group: Documentation
BuildArch: noarch
%description apidocs
API documentation for libmongocrypt library.
%description apidocs -l pl.UTF-8
Dokumentacja API biblioteki libmongocrypt.
%prep
%setup -q
%patch -P0 -p1
%patch -P1 -p1
%patch -P2 -p1
echo "%{version}" > VERSION_CURRENT
%build
# .pc file generation expects relative CMAKE_INSTALL_{INSTALL,LIB}DIR
%cmake -B build \
%{!?with_tests:-DBUILD_TESTING:BOOL=OFF} \
-DCMAKE_INSTALL_INCLUDEDIR=include \
-DCMAKE_INSTALL_LIBDIR=%{_lib} \
-DENABLE_ONLINE_TESTS:BOOL=OFF \
%{!?with_static_libs:-DENABLE_STATIC:BOOL=OFF} \
-DMONGOCRYPT_MONGOC_DIR:STRING="USE-SYSTEM" \
-DUSE_SHARED_LIBBSON:BOOL=ON
%{__make} -C build
%if %{with tests}
%{__make} -C build test
%endif
%if %{with apidocs}
doxygen doc/Doxygen
%endif
%install
rm -rf $RPM_BUILD_ROOT
%{__make} -C build install \
DESTDIR=$RPM_BUILD_ROOT
%clean
rm -rf $RPM_BUILD_ROOT
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(644,root,root,755)
%doc CHANGELOG.md LICENSE README.md
%{_libdir}/libkms_message.so.*.*.*
%ghost %{_libdir}/libkms_message.so.0
%{_libdir}/libmongocrypt.so.*.*.*
%ghost %{_libdir}/libmongocrypt.so.0
%files devel
%defattr(644,root,root,755)
%doc integrating.md
%{_libdir}/libkms_message.so
%{_libdir}/libmongocrypt.so
%{_includedir}/kms_message
%{_includedir}/mongocrypt
%{_libdir}/cmake/kms_message
%{_libdir}/cmake/mongocrypt
%{_pkgconfigdir}/libkms_message.pc
%{_pkgconfigdir}/libmongocrypt.pc
%if %{with static_libs}
%files static
%defattr(644,root,root,755)
%{_libdir}/libbson-static-for-libmongocrypt.a
%{_libdir}/libkms_message-static.a
%{_libdir}/libmongocrypt-static.a
%{_pkgconfigdir}/libmongocrypt-static.pc
%endif
%if %{with apidocs}
%files apidocs
%defattr(644,root,root,755)
%doc doc/html/*
%endif