]> git.pld-linux.org Git - packages/tinycbor.git/blob - tinycbor.spec
f64ffa28a72a02d3998ebe7c519920e34cb9fc61
[packages/tinycbor.git] / tinycbor.spec
1 #
2 # Conditional build:
3 %bcond_without  apidocs         # API documentation
4 %bcond_without  static_libs     # static libraries
5 #
6 Summary:        Tiny Concise Binary Object Representation (CBOR) Library
7 Summary(pl.UTF-8):      Mała biblioteka CBOR (Concise Binary Object Representation)
8 Name:           tinycbor
9 Version:        0.6.0
10 Release:        1
11 License:        MIT
12 Group:          Libraries
13 #Source0Download: https://github.com/intel/tinycbor/releases
14 Source0:        https://github.com/intel/tinycbor/archive/v%{version}/%{name}-%{version}.tar.gz
15 # Source0-md5:  3663e683dbf03f49cb7057ed316a7563
16 URL:            https://github.com/intel/tinycbor
17 BuildRequires:  rpm-build >= 4.6
18 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19
20 %description
21 Tiny Concise Binary Object Representation (CBOR) Library.
22
23 %description -l pl.UTF-8
24 Mała biblioteka CBOR (Concise Binary Object Representation - zwięzłej
25 binarnej reprezentacji obiektów).
26
27 %package devel
28 Summary:        Header files for TinyCBOR library
29 Summary(pl.UTF-8):      Pliki nagłówkowe biblioteki TinyCBOR
30 Group:          Development/Libraries
31 Requires:       %{name} = %{version}-%{release}
32
33 %description devel
34 Header files for TinyCBOR library.
35
36 %description devel -l pl.UTF-8
37 Pliki nagłówkowe biblioteki TinyCBOR.
38
39 %package static
40 Summary:        Static TinyCBOR library
41 Summary(pl.UTF-8):      Statyczna biblioteka TinyCBOR
42 Group:          Development/Libraries
43 Requires:       %{name}-devel = %{version}-%{release}
44
45 %description static
46 Static TinyCBOR library.
47
48 %description static -l pl.UTF-8
49 Statyczna biblioteka TinyCBOR.
50
51 %package apidocs
52 Summary:        API documentation for TinyCBOR library
53 Summary(pl.UTF-8):      Dokumentacja API biblioteki TinyCBOR
54 Group:          Documentation
55 BuildArch:      noarch
56
57 %description apidocs
58 API documentation for TinyCBOR library.
59
60 %description apidocs -l pl.UTF-8
61 Dokumentacja API biblioteki TinyCBOR.
62
63 %prep
64 %setup -q
65
66 %build
67 LDFLAGS="%{rpmldflags}" \
68 %{__make} \
69         %{!?with_static_libs:BUILD_STATIC=0} \
70         CC="%{__cc}" \
71         CFLAGS="%{rpmcflags} -Wall -Wextra" \
72         CPPFLAGS="%{rpmcppflags}"
73
74 %if %{with apidocs}
75 %{__make} docs
76 %endif
77
78 %install
79 rm -rf $RPM_BUILD_ROOT
80
81 %{__make} install \
82         %{!?with_static_libs:BUILD_STATIC=0} \
83         DESTDIR=$RPM_BUILD_ROOT \
84         prefix=%{_prefix} \
85         libdir=%{_libdir}
86
87 %clean
88 rm -rf $RPM_BUILD_ROOT
89
90 %post   -p /sbin/ldconfig
91 %postun -p /sbin/ldconfig
92
93 %files
94 %defattr(644,root,root,755)
95 %doc LICENSE README TODO
96 %attr(755,root,root) %{_bindir}/cbordump
97 %attr(755,root,root) %{_bindir}/json2cbor
98 %attr(755,root,root) %{_libdir}/libtinycbor.so.*.*.*
99 %attr(755,root,root) %ghost %{_libdir}/libtinycbor.so.0.6
100
101 %files devel
102 %defattr(644,root,root,755)
103 %attr(755,root,root) %{_libdir}/libtinycbor.so
104 %{_includedir}/tinycbor
105 %{_pkgconfigdir}/tinycbor.pc
106
107 %if %{with static_libs}
108 %files static
109 %defattr(644,root,root,755)
110 %{_libdir}/libtinycbor.a
111 %endif
112
113 %if %{with apidocs}
114 %files apidocs
115 %defattr(644,root,root,755)
116 %doc doc/html/*.{css,html,js,png}
117 %endif
This page took 0.085405 seconds and 2 git commands to generate.