!2 Package Init

From: @yangchen_guang 
Reviewed-by: @overweight 
Signed-off-by: @overweight
This commit is contained in:
openeuler-ci-bot 2022-06-22 08:08:53 +00:00 committed by Gitee
commit 71766aeff6
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 46 additions and 0 deletions

46
libcbor.spec Normal file
View File

@ -0,0 +1,46 @@
Name: libcbor
Version: 0.9.0
Release: 1
Summary: A CBOR parsing library
License: MIT
URL: http://libcbor.org
Source0: https://github.com/PJK/%{name}/archive/v%{version}.tar.gz
BuildRequires: cmake gcc-c++ make libcmocka-devel
%description
libcbor is a C library for parsing and generating CBOR.
%package devel
Summary: Development files for %{name}
Requires: %{name} = %{version}-%{release}
%description devel
The %{name}-devel contains libraries and header files for %{name}.
%prep
%autosetup -n %{name}-%{version}
sed -i 's|${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/pkgconfig|${CMAKE_INSTALL_LIBDIR}/pkgconfig|' src/CMakeLists.txt
%build
%cmake . -DCMAKE_BUILD_TYPE=Release -DWITH_TESTS=ON
%make_build
%install
%make_install
%files
%license LICENSE.md
%doc README.md
%{_libdir}/libcbor.so.0*
%files devel
%{_includedir}/cbor.h
%{_includedir}/cbor/*.h
%{_includedir}/cbor/internal/*.h
%{_libdir}/libcbor.so
%{_libdir}/pkgconfig/libcbor.pc
%changelog
* Wed May 11 2022 yangchenguang <yangchenguang@uniontech.com> - 0.9.0-1
- Package Init

BIN
v0.9.0.tar.gz Normal file

Binary file not shown.