summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.copr/Makefile15
-rw-r--r--.gitignore3
-rw-r--r--0003-doc-Remove-usage-of-sphinxcontrib.image.patch42
-rw-r--r--doc-font-path.patch21
-rw-r--r--sources1
-rw-r--r--tuiwidgets.spec85
6 files changed, 167 insertions, 0 deletions
diff --git a/.copr/Makefile b/.copr/Makefile
new file mode 100644
index 0000000..0b2aaf9
--- /dev/null
+++ b/.copr/Makefile
@@ -0,0 +1,15 @@
+spec ?= $(wildcard *.spec)
+ifneq ($(words spec),1)
+$(error More than one spec file: $(spec))
+endif
+outdir ?= $(CURDIR)
+
+srpm: $(spec) /usr/bin/spectool
+ spectool -g $(spec)
+ sha512sum -c $(CURDIR)/sources
+ rpmbuild -D '_sourcedir $(CURDIR)' -D "_srcrpmdir $(outdir)" -bs $(spec)
+
+.PHONY: srpm
+
+%:
+ dnf -y install $@
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..55fa1a1
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+*.rpm
+/results_tuiwidgets
+/tuiwidgets-0.2.1.tar.gz
diff --git a/0003-doc-Remove-usage-of-sphinxcontrib.image.patch b/0003-doc-Remove-usage-of-sphinxcontrib.image.patch
new file mode 100644
index 0000000..0ab1eeb
--- /dev/null
+++ b/0003-doc-Remove-usage-of-sphinxcontrib.image.patch
@@ -0,0 +1,42 @@
+From: Christoph Hueffelmann <chr@istoph.de>
+Date: Sat, 21 Jan 2023 22:54:54 +0100
+Subject: doc: Remove usage of sphinxcontrib.image
+
+Debian currently does not have sphinxcontrib.image packaged, so remove it for now.
+
+Forwarded: not-needed
+---
+ doc/concepts.rst | 6 +++---
+ doc/conf.py | 2 +-
+ 2 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git a/doc/concepts.rst b/doc/concepts.rst
+index 39dc3cf..fc61860 100644
+--- a/doc/concepts.rst
++++ b/doc/concepts.rst
+@@ -20,9 +20,9 @@ labels or windows.
+
+ Logical structure
+
+- - .. thumbnail:: stack-3d.png
+- :title: Layers in 3d view (click to zoom)
+- :show_caption: True
++ - .. figure:: stack-3d.png
++
++ Layers in 3d view
+
+ The direct children of a widget are stacked in a given order.
+ Widgets higher in the stack occlude lower widgets.
+diff --git a/doc/conf.py b/doc/conf.py
+index d45ef3a..c3b3098 100644
+--- a/doc/conf.py
++++ b/doc/conf.py
+@@ -30,7 +30,7 @@ release = '0.3.0'
+ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
+ # ones.
+ extensions = [
+- 'sphinxcontrib.images',
++# 'sphinxcontrib.images',
+ 'sphinx.ext.intersphinx',
+ ]
+
diff --git a/doc-font-path.patch b/doc-font-path.patch
new file mode 100644
index 0000000..1a721b1
--- /dev/null
+++ b/doc-font-path.patch
@@ -0,0 +1,21 @@
+diff --git a/doc/tpi2png.py b/doc/tpi2png.py
+index 78c3cc3..879b4db 100755
+--- a/doc/tpi2png.py
++++ b/doc/tpi2png.py
+@@ -12,11 +12,11 @@ import PIL.ImageColor
+ import freetype
+
+ conf_dict = {
+- 'font_path': '/usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf',
+- 'font_bold_path': '/usr/share/fonts/truetype/dejavu/DejaVuSansMono-Bold.ttf',
+- 'font_italic_path': '/usr/share/fonts/truetype/dejavu/DejaVuSansMono-Oblique.ttf',
+- 'font_bold_italic_path': '/usr/share/fonts/truetype/dejavu/DejaVuSansMono-BoldOblique.ttf',
+- 'font_fallback_path': '/usr/share/fonts/truetype/unifont/unifont.ttf',
++ 'font_path': '/usr/share/fonts/dejavu-sans-mono-fonts/DejaVuSansMono.ttf',
++ 'font_bold_path': '/usr/share/fonts/dejavu-sans-mono-fonts/DejaVuSansMono-Bold.ttf',
++ 'font_italic_path': '/usr/share/fonts/dejavu-sans-mono-fonts/DejaVuSansMono-Oblique.ttf',
++ 'font_bold_italic_path': '/usr/share/fonts/dejavu-sans-mono-fonts/DejaVuSansMono-BoldOblique.ttf',
++ 'font_fallback_path': '/usr/share/fonts/unifont/unifont.ttf',
+ }
+
+ conf_path = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'tpi2png.conf')
diff --git a/sources b/sources
new file mode 100644
index 0000000..7dc1073
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+SHA512 (tuiwidgets-0.2.1.tar.gz) = ca47316aa91d9b9b7e751efb0de4f4568a42f76f1fc963a89d5d724ad948e426e24afed7eb455e95cfe674d6a74669ea576de2188a93c9ac22333a85cff7d044
diff --git a/tuiwidgets.spec b/tuiwidgets.spec
new file mode 100644
index 0000000..679cd5c
--- /dev/null
+++ b/tuiwidgets.spec
@@ -0,0 +1,85 @@
+Name: tuiwidgets
+Version: 0.2.1
+Release: %autorelease
+Summary: High-level widget based toolkit for terminal applications
+
+%global forgeurl https://github.com/tuiwidgets/tuiwidgets
+%forgemeta
+
+License: Boost
+URL: %{forgeurl}
+Source0: %{forgeurl}/releases/download/%{version}/%{name}-%{version}.tar.gz
+
+Patch0: 0003-doc-Remove-usage-of-sphinxcontrib.image.patch
+Patch1: doc-font-path.patch
+
+BuildRequires: meson
+BuildRequires: gcc
+BuildRequires: gcc-c++
+BuildRequires: pkgconfig(termpaint)
+BuildRequires: pkgconfig(termpaint_image)
+BuildRequires: pkgconfig(PosixSignalManager)
+BuildRequires: qt5-qtbase-devel
+BuildRequires: pkgconfig(catch2)
+BuildRequires: python3-sphinx
+BuildRequires: python3-beautifulsoup4
+BuildRequires: python3-pillow
+BuildRequires: python3-freetype
+BuildRequires: dejavu-sans-mono-fonts
+BuildRequires: unifont-ttf-fonts
+
+
+%description
+Tuiwidgets is designed to be flexible and similar to use to Qt graphical
+widgets. Its look and feel is similar to graphical applications or classic full
+screen terminal applications from the PC world of the 90s.
+
+
+%package devel
+Summary: Header files for the tuiwidgets library
+Requires: %{name}%{?_isa} = %{version}-%{release}
+
+%description devel
+This package contains the header files and symbolic links need for building
+software using tuiwidgets, as well as the documentation.
+
+
+%prep
+%forgeautosetup -p1
+rm -rf third-party/catch2
+
+
+%build
+%meson -Dsystem-catch2=enabled -Dsystem-posixsignalmanager=enabled \
+%meson_build
+pushd doc
+python3 -m sphinx -b html . _build -a
+python3 ./qt5.inv.py
+popd
+
+
+%install
+%meson_install
+mkdir -p %{buildroot}%{_pkgdocdir}/html
+cp -r doc/_build/. %{buildroot}%{_pkgdocdir}/html
+rm -rf %{buildroot}%{_pkgdocdir}/html/.doctrees
+rm -f %{buildroot}%{_pkgdocdir}/html/.buildinfo
+
+
+%check
+%meson_test
+
+
+%files
+%doc README.md NEWS.md
+%license COPYING AUTHORS
+%{_libdir}/libtuiwidgets.so.0a
+
+%files devel
+%{_libdir}/libtuiwidgets.so
+%{_libdir}/pkgconfig/TuiWidgets.pc
+%{_includedir}/Tui
+%{_pkgdocdir}/html
+
+%changelog
+%autochangelog