diff --git a/.cvsignore b/.cvsignore deleted file mode 100644 index e69de29..0000000 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fe0a27a --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +txt2tags-2.5.tgz +/2.6.tar.gz +/txt2tags.py +/txt2tags*.src.rpm +/3.3.tar.gz +/txt2tags-3.9.tar.gz diff --git a/0000-fix-tests.patch b/0000-fix-tests.patch new file mode 100644 index 0000000..1478222 --- /dev/null +++ b/0000-fix-tests.patch @@ -0,0 +1,24 @@ +diff -rU4 txt2tags-3.9--orig/test/lib.py txt2tags-3.9/test/lib.py +--- txt2tags-3.9--orig/test/lib.py 2023-10-06 20:07:32.000000000 +0200 ++++ txt2tags-3.9/test/lib.py 2026-08-30 22:49:34.027096973 +0200 +@@ -17,9 +17,9 @@ + + print("Testing txt2tags on Python", platform.python_version()) + + # Path for txt2tags (change here if your txt2tags is in a different location) +-TXT2TAGS = os.path.join(TEST_DIR, "..", "txt2tags.py") ++TXT2TAGS = os.environ['TXT2TAGS_EXE'] + + CONFIG_FILE = "config" + CSS_FILE = "css" + DIR_OK = "ok" +diff -rU4 txt2tags-3.9--orig/test/run.py txt2tags-3.9/test/run.py +--- txt2tags-3.9--orig/test/run.py 2023-10-06 20:07:32.000000000 +0200 ++++ txt2tags-3.9/test/run.py 2026-08-30 22:48:19.714263563 +0200 +@@ -1,5 +1,5 @@ +-#!/usr/bin/env python ++#!/usr/bin/python3 + # + # txt2tags test-suite (http://txt2tags.org) + # See also: lib.py, */run.py + # diff --git a/Makefile b/Makefile deleted file mode 100644 index 77ea346..0000000 --- a/Makefile +++ /dev/null @@ -1,21 +0,0 @@ -# Makefile for source rpm: txt2tags -# $Id$ -NAME := txt2tags -SPECFILE = $(firstword $(wildcard *.spec)) - -define find-makefile-common -for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done -endef - -MAKEFILE_COMMON := $(shell $(find-makefile-common)) - -ifeq ($(MAKEFILE_COMMON),) -# attept a checkout -define checkout-makefile-common -test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2 -endef - -MAKEFILE_COMMON := $(shell $(checkout-makefile-common)) -endif - -include $(MAKEFILE_COMMON) diff --git a/sources b/sources index e69de29..7704390 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +SHA512 (txt2tags-3.9.tar.gz) = f2a1b0a671049595f12a05ca68acd860002bde9b8510eb9379ad9bdf94026b30522d670d39f2beffafa50104b44b2a3394aa090297ef92b46837c9a8e7e728ea diff --git a/txt2tags.spec b/txt2tags.spec new file mode 100644 index 0000000..ba5f885 --- /dev/null +++ b/txt2tags.spec @@ -0,0 +1,219 @@ +Name: txt2tags +Summary: Summary: Converts text files to HTML, XHTML, LaTeX, and other formats +Version: 3.9 +Release: 1%{?dist} +License: GPL-2.0-or-later +URL: https://txt2tags.org +Source0: https://github.com/txt2tags/txt2tags/archive/refs/tags/%{version}/%{name}-%{version}.tar.gz + +Patch0: 0000-fix-tests.patch + +BuildArch: noarch + +BuildRequires: python3-devel +Requires: python3 + +%description +Txt2tags is a document generator. It reads a text file with minimal markup as +**bold** and //italic// and converts it to the following formats: + + * HTML + * XHTML + * SGML + * LaTeX + * Lout + * Man page + * Wikipedia (NEW) + * Google Code Wiki (NEW) + * DokuWiki (NEW) + * MoinMoin + * MagicPoint + * PageMaker + * Plain text + +%prep +%autosetup -p1 + +%generate_buildrequires +%pyproject_buildrequires + +%build +%{pyproject_wheel} + +%install +%{pyproject_install} +%pyproject_save_files -l %{name} + +%check +%pyproject_check_import +export TXT2TAGS_EXE="%{buildroot}%{_bindir}/txt2tags" +PYTHONPATH="%{buildroot}%{python3_sitelib}:$(pwd)/test" ./test/run.py + +%files -f %{pyproject_files} +%doc CHANGELOG.md README.md +%{_bindir}/txt2tags + +%changelog +* Sun Aug 30 2026 Artur Frenszek-Iwicki - 3.9-1 +- Update to v3.9 + +* Fri Jul 17 2026 Fedora Release Engineering - 3.3-26 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild + +* Wed Jun 03 2026 Python Maint - 3.3-25 +- Rebuilt for Python 3.15 + +* Sat Jan 17 2026 Fedora Release Engineering - 3.3-24 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_44_Mass_Rebuild + +* Fri Sep 19 2025 Python Maint - 3.3-23 +- Rebuilt for Python 3.14.0rc3 bytecode + +* Fri Aug 15 2025 Python Maint - 3.3-22 +- Rebuilt for Python 3.14.0rc2 bytecode + +* Mon Aug 11 2025 Miro Hrončok - 3.3-21 +- Convert to pyproject RPM macros +- Fixes: rhbz#2378484 + +* Fri Jul 25 2025 Fedora Release Engineering - 3.3-20 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild + +* Mon Jun 02 2025 Python Maint - 3.3-19 +- Rebuilt for Python 3.14 + +* Sun Jan 19 2025 Fedora Release Engineering - 3.3-18 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild + +* Mon Jul 29 2024 Miroslav Suchý - 3.3-17 +- convert license to SPDX + +* Sat Jul 20 2024 Fedora Release Engineering - 3.3-16 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild + +* Fri Jun 07 2024 Python Maint - 3.3-15 +- Rebuilt for Python 3.13 + +* Sat Jan 27 2024 Fedora Release Engineering - 3.3-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild + +* Sat Jul 22 2023 Fedora Release Engineering - 3.3-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild + +* Tue Jun 13 2023 Python Maint - 3.3-12 +- Rebuilt for Python 3.12 + +* Sat Jan 21 2023 Fedora Release Engineering - 3.3-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild + +* Sat Jul 23 2022 Fedora Release Engineering - 3.3-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild + +* Mon Jun 13 2022 Python Maint - 3.3-9 +- Rebuilt for Python 3.11 + +* Sat Jan 22 2022 Fedora Release Engineering - 3.3-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild + +* Fri Jul 23 2021 Fedora Release Engineering - 3.3-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Fri Jun 04 2021 Python Maint - 3.3-6 +- Rebuilt for Python 3.10 + +* Wed Jan 27 2021 Fedora Release Engineering - 3.3-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Wed Jul 29 2020 Fedora Release Engineering - 3.3-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Tue May 26 2020 Miro Hrončok - 3.3-3 +- Rebuilt for Python 3.9 + +* Fri Jan 31 2020 Fedora Release Engineering - 3.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Fri Dec 06 2019 Christoph Junghans - 3.3-1 +- Version bump to 3.3 + +* Mon Sep 23 2019 Christoph Junghans - 2.6-2 +- Add more python3.8 fixes by Jendrik Seipp + +* Fri Sep 20 2019 Christoph Junghans - 2.6-1 +- bump to 2.6, switch to python3 (bug #1751486) + +* Fri Aug 23 2019 Christoph Junghans - 2.5-23 +- fix python dep + +* Sat Jul 27 2019 Fedora Release Engineering - 2.5-22 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Sun Feb 03 2019 Fedora Release Engineering - 2.5-21 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Sat Jul 14 2018 Fedora Release Engineering - 2.5-20 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Fri Feb 09 2018 Fedora Release Engineering - 2.5-19 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Mon Feb 05 2018 Iryna Shcherbina - 2.5-18 +- Update Python 2 dependency declarations to new packaging standards + (See https://fedoraproject.org/wiki/FinalizingFedoraSwitchtoPython3) + +* Thu Jul 27 2017 Fedora Release Engineering - 2.5-17 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Sat Feb 11 2017 Fedora Release Engineering - 2.5-16 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Fri Feb 05 2016 Fedora Release Engineering - 2.5-15 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Fri Jun 19 2015 Fedora Release Engineering - 2.5-14 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sun Aug 04 2013 Fedora Release Engineering - 2.5-13 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Fri Feb 15 2013 Fedora Release Engineering - 2.5-12 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Sun Jul 22 2012 Fedora Release Engineering - 2.5-11 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Sat Jan 14 2012 Fedora Release Engineering - 2.5-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Wed Feb 09 2011 Fedora Release Engineering - 2.5-9 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Wed Aug 11 2010 David Malcolm - 2.5-8 +- recompiling .py files against Python 2.7 (rhbz#623415) + +* Sun Jul 26 2009 Fedora Release Engineering - 2.5-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Wed Feb 25 2009 Fedora Release Engineering - 2.5-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Thu Dec 04 2008 Ignacio Vazquez-Abrams - 2.5-5 +- Rebuild for Python 2.6 + +* Tue Dec 02 2008 Adam Miller - 2.5-3 +- Rebuild for Python 2.6 + +* Mon Aug 11 2008 Adam Miller - 2.5-2 +- Fourth attempt, issues resolved: +- Increased release number +- Added BuildRequires entry for gettext (for msgfmt) +* Fri Aug 1 2008 Adam Miller - 2.5-1 +- Third attempt, got rid of the Mac files (Thanks again to Kairo) +- Took care of the .mgp files +* Thu Jul 31 2008 Adam Miller - 2.5-1 +- Second attempt at packaging txt2tags +* Mon Jul 28 2008 Adam Miller - 2.5-1 +- First attempt at packaging txt2tags