From 498bb5632ce8b21e3c727cb6312d4109fa9eb297 Mon Sep 17 00:00:00 2001 From: Thomas Schneider Date: Thu, 30 Nov 2023 13:22:41 +0100 Subject: Initial packaging --- .copr/Makefile | 18 ++++++++++++ .gitignore | 3 ++ disable-static-library.patch | 13 +++++++++ posixsignalmanager.spec | 65 ++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 5 files changed, 100 insertions(+) create mode 100644 .copr/Makefile create mode 100644 .gitignore create mode 100644 disable-static-library.patch create mode 100644 posixsignalmanager.spec create mode 100644 sources diff --git a/.copr/Makefile b/.copr/Makefile new file mode 100644 index 0000000..94d6fda --- /dev/null +++ b/.copr/Makefile @@ -0,0 +1,18 @@ +spec ?= $(wildcard *.spec) +ifneq ($(words spec),1) +$(error More than one spec file: $(spec)) +endif +outdir ?= $(CURDIR) +sourcedir = $(shell rpmbuild -E '%_sourcedir') + +srpm: $(spec) /usr/bin/spectool + spectool -R -g $(spec) + env -C $(sourcedir) \ + sha512sum -c $(CURDIR)/sources || \ + (find $(sourcedir) -type f -delete; exit 1) + rpmbuild -D "_srcrpmdir $(outdir)" -bs $(spec) + +.PHONY: srpm + +%: + dnf -y install $@ diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1e1ba71 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*.rpm +/results_posixsignalmanager +/posixsignalmanager-573a01041d85214c2936d8acc43c9a3dc4e375e3.tar.gz diff --git a/disable-static-library.patch b/disable-static-library.patch new file mode 100644 index 0000000..92265f3 --- /dev/null +++ b/disable-static-library.patch @@ -0,0 +1,13 @@ +diff --git a/meson.build b/meson.build +index 599fe1d..fd2c793 100644 +--- a/meson.build ++++ b/meson.build +@@ -34,7 +34,7 @@ else + endif + + +-posixsignalmanager_lib = both_libraries('posixsignalmanager', 'PosixSignalManager.cpp', ++posixsignalmanager_lib = library('posixsignalmanager', 'PosixSignalManager.cpp', + qt5.preprocess(moc_headers: 'PosixSignalManager.h'), + dependencies : [qt5_dep, librt], cpp_args: macros, + link_args : main_ld_vscript, diff --git a/posixsignalmanager.spec b/posixsignalmanager.spec new file mode 100644 index 0000000..9d95568 --- /dev/null +++ b/posixsignalmanager.spec @@ -0,0 +1,65 @@ +%global forgeurl https://github.com/textshell/posixsignalmanager +%global commit 573a01041d85214c2936d8acc43c9a3dc4e375e3 +%forgemeta + +Name: posixsignalmanager +Version: 0.3 +Release: %autorelease +Summary: POSIX signal handling for Qt + +License: BSL-1.0 +URL: %{forgeurl} +Source0: %{forgesource} + +Patch: disable-static-library.patch + +BuildRequires: meson +BuildRequires: gcc-c++ +BuildRequires: pkgconfig(catch2) +BuildRequires: pkgconfig(Qt5Core) + + +%description +Library safe, synchronous and asynchronous handling of POSIX signals for Qt +applications and libraries. + + +%package devel +Summary: Header files for the PosixSignalManager library +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +%{summary}. + + +%prep +%forgeautosetup -p1 +rm -f tests/catch.hpp + + +%build +%meson -Dsystem-catch2=enabled +%meson_build + + +%install +%meson_install + + +%check +%meson_test + + +%files +%doc README.md +%license COPYING +%{_libdir}/libposixsignalmanager.so.0a + +%files devel +%{_libdir}/libposixsignalmanager.so +%{_libdir}/pkgconfig/PosixSignalManager.pc +%{_includedir}/PosixSignalManager.h + + +%changelog +%autochangelog diff --git a/sources b/sources new file mode 100644 index 0000000..1ad06dd --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (posixsignalmanager-573a01041d85214c2936d8acc43c9a3dc4e375e3.tar.gz) = 8d8b93e7e5fa659b4c44f441651fdc438235d50dbcdfa2b614b3a3ec48e9eb9859adebe13854c521547c119a411d7ce3bc83962cdafae2896ef9c25aa58aa21f -- cgit v1.2.3