diff options
| author | Thomas Schneider <qsx@chaotikum.eu> | 2024-04-04 00:10:44 +0200 |
|---|---|---|
| committer | Thomas Schneider <qsx@chaotikum.eu> | 2024-04-04 00:10:44 +0200 |
| commit | 5dc8aba0cdf7dea89bf43eeb2fe72371b04aaea4 (patch) | |
| tree | 22ecab9e97d132a486ec5a57eb0ad9e1a536a483 | |
Initial packaging
| -rw-r--r-- | .copr/Makefile | 18 | ||||
| -rw-r--r-- | .gitignore | 3 | ||||
| -rw-r--r-- | catch.patch | 22 | ||||
| -rw-r--r-- | chr.spec | 60 | ||||
| -rw-r--r-- | sources | 1 |
5 files changed, 104 insertions, 0 deletions
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..e56468b --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*.rpm +/results_chr +/editor-0.1.77.tar.gz diff --git a/catch.patch b/catch.patch new file mode 100644 index 0000000..d7b74f4 --- /dev/null +++ b/catch.patch @@ -0,0 +1,22 @@ +diff --git a/src/catchwrapper.h b/src/catchwrapper.h +index b2108b2..9d57f82 100644 +--- a/src/catchwrapper.h ++++ b/src/catchwrapper.h +@@ -10,7 +10,12 @@ + #include <Tui/ZColor.h> + #include <Tui/ZDocument.h> + +-#include <../third-party/catch.hpp> ++#ifdef CATCH3 ++#include <catch2/catch_all.hpp> ++using Catch::Approx; ++#else ++#include <catch2/catch.hpp> ++#endif + + #include "filecategorize.h" + +diff --git a/third-party/catch.hpp b/third-party/catch2/catch.hpp +similarity index 100% +rename from third-party/catch.hpp +rename to third-party/catch2/catch.hpp diff --git a/chr.spec b/chr.spec new file mode 100644 index 0000000..1efbcf4 --- /dev/null +++ b/chr.spec @@ -0,0 +1,60 @@ +Name: chr +Version: 0.1.77 +Release: %autorelease +Summary: Terminal editor is inspired by the Turbo Pascal editor + +%global forgeurl https://github.com/istoph/editor +%forgemeta + +License: Boost +URL: %{forgeurl} +Source0: %{forgeurl}/releases/download/%{version}/editor-%{version}.tar.gz + +Patch0: catch.patch + +BuildRequires: meson +BuildRequires: gcc-c++ +BuildRequires: qt5-qtbase-devel +BuildRequires: pkgconfig(TuiWidgets) +BuildRequires: pkgconfig(PosixSignalManager) +BuildRequires: cmake(KF5SyntaxHighlighting) +BuildRequires: pkgconfig(catch2) + + +%description +The chr terminal editor is inspired by the turbo pascal editor using Turbo +Vision from the year 1997. For the keyboard shortcut he should be similar +gedit, to facilitate the transition from desktop to console editor. + + +%prep +%forgeautosetup -p1 +rm -rf third-party/catch.hpp + + +%build +%meson -Dsystem-catch2=enabled -Dsyntax_highlighting=true +%meson_build + + +%install +%meson_install +install -D -m0644 manpages/%{name}.1 -t %{buildroot}%{_mandir}/man1/ +install -D -m0644 manpages/%{name}.de.1 -t %{buildroot}%{_mandir}/de/man1/ + + +# TODO +#check +#meson_test + + +%files +%doc README.md +%license COPYING AUTHORS +%{_bindir}/%{name} +%{_mandir}/man1/%{name}.* +%{_mandir}/de/man1/%{name}.* + + +%changelog +%autochangelog @@ -0,0 +1 @@ +SHA512 (editor-0.1.77.tar.gz) = e5cc9fb337774f936363bdacffc0c85c4d4cd885b7829df1df89a8fed787e7d89515efead1e7ae65dd1a86b27a2dec86cf993470396117bcb289f82a2f76ab75 |
