[packages/libcbor] - new
qboosh
qboosh at pld-linux.org
Sun May 20 19:08:14 CEST 2018
commit a3819234a8f4c67975aa0a3c3ec9b5a01309596d
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun May 20 19:08:58 2018 +0200
- new
libcbor.spec | 105 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 105 insertions(+)
---
diff --git a/libcbor.spec b/libcbor.spec
new file mode 100644
index 0000000..e2ef9b4
--- /dev/null
+++ b/libcbor.spec
@@ -0,0 +1,105 @@
+#
+# Conditional build:
+%bcond_without apidocs # do not build and package API docs
+#
+Summary: CBOR protocol implementation
+Summary(pl.UTF-8): Implementacja protokołu CBOR
+Name: libcbor
+Version: 0.5.0
+Release: 1
+License: MIT
+Group: Libraries
+#Source0Download: https://github.com/PJK/libcbor/releases
+Source0: https://github.com/PJK/libcbor/archive/v%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: 801a17e95592b39beecb2406604f5ba3
+URL: http://libcbor.org/
+BuildRequires: cmake >= 3.2
+%if %{with apidocs}
+BuildRequires: python3-breathe
+BuildRequires: sphinx-pdg-3
+%endif
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+libcbor is a C library for parsing and generating CBOR (RFC 7049), the
+general-purpose schema-less binary data format.
+
+%description -l pl.UTF-8
+libcbor to biblioteka C do analizy i generowania formatu danych CBOR
+(RFC 7049) - pozbawionego schematu binarnego formatu danych ogólnego
+przeznaczenia.
+
+%package devel
+Summary: Header files for libcbor library
+Summary(pl.UTF-8): Pliki nagłówkowe biblioteki libcbor
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+
+%description devel
+Header files for libcbor library.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki libcbor.
+
+%package apidocs
+Summary: API documentation for libcbor library
+Summary(pl.UTF-8): Dokumentacja API biblioteki libcbor
+Group: Documentation
+%if "%{_rpmversion}" >= "5"
+BuildArch: noarch
+%endif
+
+%description apidocs
+API documentation for libcbor library.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API biblioteki libcbor.
+
+%prep
+%setup -q
+
+%build
+install -d build
+cd build
+# expects CMAKE_INSTALL_LIBDIR relative to prefix
+%cmake .. \
+ -DCMAKE_INSTALL_LIBDIR=%{_lib}
+
+%{__make}
+cd ..
+
+%if %{with apidocs}
+%{__make} -C doc html \
+ SPHINXBULD=sphinx-build-3
+%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.md README.md
+%attr(755,root,root) %{_libdir}/libcbor.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libcbor.so.0
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libcbor.so
+%{_includedir}/cbor
+%{_includedir}/cbor.h
+%{_pkgconfigdir}/libcbor.pc
+
+%if %{with apidocs}
+%files apidocs
+%defattr(644,root,root,755)
+%doc doc/build/html/{_images,_static,api,streaming,*.html,*.js}
+%endif
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/libcbor.git/commitdiff/a3819234a8f4c67975aa0a3c3ec9b5a01309596d
More information about the pld-cvs-commit
mailing list