Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,3 +119,42 @@ jobs:
}
& $exe

rpm-package:
name: Build RPM packages on RHEL-9
runs-on: ubuntu-latest
container: quay.io/centos/centos:stream9
permissions:
contents: read
actions: write
steps:
- name: Set up OS
run: |
dnf config-manager --set-enabled crb
dnf install -y epel-release
dnf install -y \
git tito rpm-build rpmlint
- name: Checkout repository
uses: actions/checkout@v6
with:
fetch-depth: 0
submodules: recursive
- name: Set up environment
run: |
git config --global --add safe.directory ${PWD}
dnf builddep -y qcbor.spec
- name: Build
run: tito build --rpm --test
- name: Check
working-directory: /tmp/tito
run: |
set -o pipefail
rpmlint *.rpm | tee rpmlint.txt
- name: Summarize Results
if: always()
run: |
echo "## rpmlint results:" >> $GITHUB_STEP_SUMMARY
echo >> $GITHUB_STEP_SUMMARY
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
cat /tmp/tito/rpmlint.txt >> $GITHUB_STEP_SUMMARY || true
echo >> $GITHUB_STEP_SUMMARY
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
76 changes: 0 additions & 76 deletions pkg/qcbor.spec

This file was deleted.

106 changes: 106 additions & 0 deletions qcbor.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
# Guidelines from https://docs.fedoraproject.org/en-US/packaging-guidelines/CMake/

Name: qcbor
Version: 1.6.1
Release: 2%{?dist}
Summary: A CBOR encoder/decoder library
URL: https://github.com/laurencelundblade/QCBOR
License: BSD-3-Clause
Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz

BuildRequires: cmake
BuildRequires: gcc
BuildRequires: doxygen
BuildRequires: coreutils

%description
Comprehensive, powerful, commercial-quality CBOR encoder and decoder
that is still suited for small devices.


%package devel
Summary: Development files for the QCBOR library
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
Development files needed to build and link to the QCBOR library.

%package doc
Summary: API documentation for QCBOR library
Requires: %{name}%{?_isa} = %{version}-%{release}
%description doc
API documentation in the form of Docbook XML generated
from the API with Doxygen.


%prep
%setup -q -n QCBOR-%{version}


%build
%cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_QCBOR_TEST=APP
%cmake_build

pushd doxygen
sed -i 's|GENERATE_DOCBOOK.*=.*|GENERATE_DOCBOOK = YES|g' Doxyfile
sed -i 's|GENERATE_HTML.*=.*|GENERATE_HTML = NO|g' Doxyfile
sed -i 's|GENERATE_MAN.*=.*|GENERATE_MAN = NO|g' Doxyfile
doxygen
popd


%install
%cmake_install

install -m644 doxygen/docbook/*.xml -D -t %{buildroot}%{_datadir}/help/en/qcbor/


%check
%ctest


%files
%license LICENSE
%doc README.md
%{_libdir}/libqcbor.so.1{,.*}

%files devel
%license LICENSE
%doc README.md
%{_includedir}/qcbor/
%{_libdir}/libqcbor.so
%{_libdir}/cmake/qcbor/

%files doc
%license LICENSE
%doc %lang(en) %{_datadir}/help/en/qcbor/


%changelog
* Tue Jun 09 2026 Brian Sipos <brian.sipos@gmail.com> - 1.6.1-2
- Import into Fedora

* Fri Mar 20 2026 Laurence Lundblade <lgl@island-resort.com> - 1.6.1-1
- Modernize cmake build and install
- Minor QCBORDecode_EnteryArray() error handling bugfix

* Wed Nov 12 2025 Laurence Lundblade <lgl@island-resort.com> - 1.6.0-1
- Better Windows/MSVC support
- Bug fix for GetArray() and GetMap()
- Fix gcc warnings
- Bug fix for OpenBstr on empty map at end of input
- Bug fix for floating-point NaN payload conversion for preferred serialization
- Don't use strcpy()

* Mon Jun 16 2025 Laurence Lundblade <lgl@island-resort.com> - 1.5.3-1
- Bug fix for GetArray() from empty map
- Increase test coverage
- Documentation improvements

* Mon Jun 16 2025 Laurence Lundblade <lgl@island-resort.com> - 1.5.2-1
- Bug fix for QCBORDecode_GetMap() and QCBORDecode_GetArray()
- Fix warning for compilers compliant with C23 standard
- Minor documentation fix
- Fix for embedded platforms with partial implementations of llround()

* Mon Jan 8 2024 Laurence Lundblade <lgl@island-resort.com> - 1.5.1-1
- Initial library RPM packaging.
Loading