]>
Commit | Line | Data |
---|---|---|
92b8d7f5 JB |
1 | # |
2 | # Conditional build: | |
3 | %bcond_without apidocs # do not build and package API docs | |
39222bee | 4 | |
92b8d7f5 JB |
5 | Summary: Kinetic C++ client library |
6 | Summary(pl.UTF-8): Biblioteka kliencka C++ Kinetic | |
7 | Name: kinetic-cpp-client | |
8 | Version: 0.1.1 | |
b948d43e | 9 | Release: 5 |
92b8d7f5 JB |
10 | License: GPL v2+ |
11 | Group: Libraries | |
7163ac44 | 12 | Source0: https://github.com/Kinetic/kinetic-cpp-client/archive/%{version}/%{name}-%{version}.tar.gz |
92b8d7f5 JB |
13 | # Source0-md5: ac77cc4ebf388e0e1d690317888373e6 |
14 | Patch0: %{name}-system-libs.patch | |
b948d43e JB |
15 | Patch1: %{name}-openssl.patch |
16 | Patch2: %{name}-protocol.patch | |
7163ac44 | 17 | URL: https://github.com/Kinetic/kinetic-cpp-client/ |
92b8d7f5 JB |
18 | BuildRequires: cmake >= 2.8.6 |
19 | %{?with_apidocs:BuildRequires: doxygen} | |
20 | BuildRequires: gflags-devel >= 2.0 | |
21 | BuildRequires: glog-devel >= 0.3.3 | |
5f5e703e | 22 | BuildRequires: gmock-devel >= 1.10.0 |
92b8d7f5 | 23 | BuildRequires: gtest-devel >= 1.6.0 |
b948d43e | 24 | BuildRequires: kinetic-protocol >= 4.0 |
92b8d7f5 JB |
25 | BuildRequires: libstdc++-devel |
26 | BuildRequires: openssl-devel >= 1.0.1g | |
27 | BuildRequires: protobuf-devel >= 2.5.0 | |
28 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
29 | ||
30 | %description | |
31 | This package contains a library for producing Kinetic C++ clients for | |
32 | interacting with Kinetic object-based storage. | |
33 | ||
34 | %description -l pl.UTF-8 | |
35 | Ten pakiet zawiera bibliotekę do tworzenia w języku C++ klientów | |
36 | Kinetic mających współpracować z opartym na obiektach systemem | |
37 | przechowywania danych Kinetic. | |
38 | ||
39 | %package devel | |
40 | Summary: Header files for Kinetic C++ client library | |
41 | Summary(pl.UTF-8): Pliki nagłówkowe biblioteki klienckiej C++ Kinetic | |
42 | Group: Development/Libraries | |
43 | Requires: %{name} = %{version}-%{release} | |
44 | Requires: libstdc++-devel | |
45 | Requires: openssl-devel | |
b948d43e | 46 | %requires_ge protobuf-devel |
92b8d7f5 JB |
47 | |
48 | %description devel | |
49 | Header files for Kinetic C++ client library. | |
50 | ||
51 | %description devel -l pl.UTF-8 | |
52 | Pliki nagłówkowe biblioteki klienckiej C++ Kinetic. | |
53 | ||
54 | %package apidocs | |
55 | Summary: Kinetic C++ client API documentation | |
56 | Summary(pl.UTF-8): Dokumentacja API biblioteki klienckiej C++ Kinetic | |
57 | Group: Documentation | |
b948d43e | 58 | %if "%{_rpmversion}" >= "4.6" |
39222bee ER |
59 | BuildArch: noarch |
60 | %endif | |
92b8d7f5 JB |
61 | |
62 | %description apidocs | |
63 | API documentation for Kinetic C++ client library. | |
64 | ||
65 | %description apidocs -l pl.UTF-8 | |
66 | Dokumentacja API biblioteki klienckiej C++ Kinetic. | |
67 | ||
68 | %prep | |
69 | %setup -q | |
70 | %patch0 -p1 | |
b948d43e JB |
71 | %patch1 -p1 |
72 | %patch2 -p1 | |
92b8d7f5 JB |
73 | |
74 | %build | |
75 | install -d build | |
76 | cd build | |
77 | %cmake .. | |
78 | ||
79 | %{__make} | |
80 | ||
81 | %{?with_apidocs:%{__make} doc} | |
82 | ||
83 | %install | |
84 | rm -rf $RPM_BUILD_ROOT | |
85 | install -d $RPM_BUILD_ROOT{%{_includedir},%{_libdir}} | |
86 | ||
87 | install build/libkinetic_client.so $RPM_BUILD_ROOT%{_libdir} | |
88 | cp -pr include/kinetic $RPM_BUILD_ROOT%{_includedir} | |
27dcb35b | 89 | cp -p src/main/generated/kinetic_client.pb.h $RPM_BUILD_ROOT%{_includedir}/kinetic |
92b8d7f5 JB |
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 README.md | |
100 | %attr(755,root,root) %{_libdir}/libkinetic_client.so | |
101 | ||
102 | %files devel | |
103 | %defattr(644,root,root,755) | |
104 | %{_includedir}/kinetic | |
105 | ||
106 | %if %{with apidocs} | |
107 | %files apidocs | |
108 | %defattr(644,root,root,755) | |
109 | %doc docs/*.{css,html,js,png} | |
110 | %endif |