libcbor/libcbor.spec

82 lines
2 KiB
RPMSpec
Raw Normal View History

2021-09-26 23:23:19 +03:00
%define major 0.8
%define libname %mklibname cbor %{major}
%define devname %mklibname cbor -d
2023-11-30 00:05:03 +00:00
%define debug %nil
%define debug_package %nil
2021-09-26 23:23:19 +03:00
Summary: A CBOR parsing library
Name: libcbor
License: MIT
Group: System/Libraries
Version: 0.8.0
Release: 1
URL: http://libcbor.org
Source0: https://github.com/PJK/libcbor/archive/v%{version}.tar.gz?/%{name}-%{version}.tar.gz
BuildRequires: cmake
2023-11-30 00:18:27 +00:00
BuildRequires: make
2021-09-26 23:23:19 +03:00
BuildRequires: gcc
BuildRequires: gcc-c++
BuildRequires: python3-breathe
BuildRequires: python3-sphinx
BuildRequires: python3-sphinx_rtd_theme
2023-11-30 00:23:48 +00:00
BuildRequires: python3-markupsafe
2023-11-30 00:18:27 +00:00
BuildRequires: python3-jinja2
2021-09-26 23:23:19 +03:00
%description
libcbor is a C library for parsing and generating CBOR
#--------------------------------------------------------------------
%package -n %{libname}
Summary: A CBOR parsing library
Group: System/Libraries
%description -n %{libname}
libcbor is a C library for parsing and generating CBOR
%files -n %{libname}
2023-11-29 18:09:30 +00:00
%doc LICENSE.md README.md
2021-09-26 23:23:19 +03:00
%{_libdir}/libcbor.so.%{major}*
#--------------------------------------------------------------------
%package -n %{devname}
Summary: Development files for %{name}
Group: Development/C
Requires: %{libname} = %{EVRD}
%description -n %{devname}
The %{name}-devel contains libraries and header files for %{name}
%files -n %{devname}
2023-11-29 18:09:30 +00:00
%doc LICENSE.md README.md
2021-09-26 23:23:19 +03:00
%{_includedir}/cbor.h
%{_includedir}/cbor
%{_libdir}/libcbor.so
%{_libdir}/pkgconfig/libcbor.pc
%{_mandir}/man3/libcbor.3*
#--------------------------------------------------------------------
%prep
2023-11-29 18:09:30 +00:00
%setup -q
2021-09-26 23:23:19 +03:00
%build
dir0="$PWD"
2023-11-30 00:13:03 +00:00
%cmake
2021-09-26 23:23:19 +03:00
%make
%make -C "$dir0"/doc man
2023-11-30 00:13:03 +00:00
%install
2023-11-30 00:05:03 +00:00
# fix double slash in .pc
sed -i '/libdir/s/\/\//\//' build/src/libcbor.pc
2021-09-26 23:23:19 +03:00
%makeinstall_std -C build
mkdir -p %{buildroot}%{_mandir}/man3
cp doc/build/man/* %{buildroot}%{_mandir}/man3
# /usr/usr/lib64/pkgconfig
mkdir -p %{buildroot}%{_libdir}/pkgconfig
mv -v %{buildroot}/usr/%{_libdir}/pkgconfig/*.pc %{buildroot}%{_libdir}/pkgconfig
rm -fvr %{buildroot}/usr/usr