]> git.pld-linux.org Git - packages/libcbor.git/blob - libcbor.spec
- updated to 0.11.0
[packages/libcbor.git] / libcbor.spec
1 #
2 # Conditional build:
3 %bcond_without  apidocs         # (Sphinx based) API documentation
4 #
5 Summary:        CBOR protocol implementation
6 Summary(pl.UTF-8):      Implementacja protokołu CBOR
7 Name:           libcbor
8 Version:        0.11.0
9 Release:        1
10 License:        MIT
11 Group:          Libraries
12 #Source0Download: https://github.com/PJK/libcbor/releases
13 Source0:        https://github.com/PJK/libcbor/archive/v%{version}/%{name}-%{version}.tar.gz
14 # Source0-md5:  dd39ecd3e3c7adf2eccc585e5c2c2265
15 URL:            http://libcbor.org/
16 BuildRequires:  cmake >= 3.2
17 %if %{with apidocs}
18 BuildRequires:  python3-breathe
19 BuildRequires:  python3-sphinx_rtd_theme
20 BuildRequires:  sphinx-pdg-3
21 %endif
22 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
23
24 %description
25 libcbor is a C library for parsing and generating CBOR (RFC 7049), the
26 general-purpose schema-less binary data format.
27
28 %description -l pl.UTF-8
29 libcbor to biblioteka C do analizy i generowania formatu danych CBOR
30 (RFC 7049) - pozbawionego schematu binarnego formatu danych ogólnego
31 przeznaczenia.
32
33 %package devel
34 Summary:        Header files for libcbor library
35 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki libcbor
36 Group:          Development/Libraries
37 Requires:       %{name} = %{version}-%{release}
38
39 %description devel
40 Header files for libcbor library.
41
42 %description devel -l pl.UTF-8
43 Pliki nagłówkowe biblioteki libcbor.
44
45 %package apidocs
46 Summary:        API documentation for libcbor library
47 Summary(pl.UTF-8):      Dokumentacja API biblioteki libcbor
48 Group:          Documentation
49 BuildArch:      noarch
50
51 %description apidocs
52 API documentation for libcbor library.
53
54 %description apidocs -l pl.UTF-8
55 Dokumentacja API biblioteki libcbor.
56
57 %prep
58 %setup -q
59
60 %build
61 install -d build
62 cd build
63 # expects CMAKE_INSTALL_LIBDIR relative to prefix
64 %cmake .. \
65         -DCMAKE_INSTALL_LIBDIR=%{_lib}
66
67 %{__make}
68 cd ..
69
70 %if %{with apidocs}
71 %{__make} -C doc html \
72         SPHINXBULD=sphinx-build-3
73 %endif
74
75 %install
76 rm -rf $RPM_BUILD_ROOT
77
78 %{__make} -C build install \
79         DESTDIR=$RPM_BUILD_ROOT
80
81 %clean
82 rm -rf $RPM_BUILD_ROOT
83
84 %post   -p /sbin/ldconfig
85 %postun -p /sbin/ldconfig
86
87 %files
88 %defattr(644,root,root,755)
89 %doc CHANGELOG.md LICENSE.md README.md
90 %attr(755,root,root) %{_libdir}/libcbor.so.*.*.*
91 %attr(755,root,root) %ghost %{_libdir}/libcbor.so.0.11
92
93 %files devel
94 %defattr(644,root,root,755)
95 %attr(755,root,root) %{_libdir}/libcbor.so
96 %{_includedir}/cbor
97 %{_includedir}/cbor.h
98 %{_pkgconfigdir}/libcbor.pc
99 %{_libdir}/cmake/libcbor
100
101 %if %{with apidocs}
102 %files apidocs
103 %defattr(644,root,root,755)
104 %doc doc/build/html/{_static,api,*.html,*.js}
105 %endif
This page took 0.116195 seconds and 4 git commands to generate.