python3-docutils: New package.

Message ID 20230106071823.1962-1-stefan.schantl@ipfire.org
State Accepted
Commit abe30543ae87e0362448c727796d4fb16286dc82
Headers
Series python3-docutils: New package. |

Commit Message

Stefan Schantl Jan. 6, 2023, 7:18 a.m. UTC
  Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
---
 python3-docutils/python3-docutils.nm | 57 ++++++++++++++++++++++++++++
 1 file changed, 57 insertions(+)
 create mode 100644 python3-docutils/python3-docutils.nm
  

Patch

diff --git a/python3-docutils/python3-docutils.nm b/python3-docutils/python3-docutils.nm
new file mode 100644
index 000000000..86edd1120
--- /dev/null
+++ b/python3-docutils/python3-docutils.nm
@@ -0,0 +1,57 @@ 
+###############################################################################
+# IPFire.org    - An Open Source Firewall Solution                            #
+# Copyright (C) - IPFire Development Team <info@ipfire.org>                   #
+###############################################################################
+
+name       = python3-docutils
+version    = 0.19
+release    = 1
+thisapp    = docutils-%{version}
+arch       = noarch
+
+groups     = System/Tools
+url        = https://docutils.sourceforge.net
+license    = Public Domain and BSD and Python and GPLv3+
+summary    = System for processing plaintext documentation
+
+description
+	The Docutils project specifies a plaintext markup language, reStructuredText,
+	which is easy to read and quick to write.  The project includes a python
+	library to parse rST files and transform them into other useful formats such
+	as HTML, XML, and TeX as well as commandline tools that give the enduser
+	access to this functionality.
+end
+
+source_dl  = https://sourceforge.net/projects/docutils/files/docutils/%{version}/
+
+build
+	requires
+		python3-devel >= 3.4
+		python3-setuptools
+	end
+
+	build
+		# Remove shebang from library files
+		sed -i -e '/#! *\/usr\/bin\/.*/{1D}' $(grep -Erl '^#!.+python' docutils)
+
+		%{python3} setup.py build
+	end
+
+	test
+		export PYTHONPATH=%{buildroot}%{python3_sitelib}
+		%{python3} test/alltests.py
+	end
+
+	install
+		%{python3} setup.py install --root=%{BUILDROOT} \
+			
+	end
+end
+
+packages
+	package %{name}
+
+	package %{name}-debuginfo
+		template DEBUGINFO
+	end
+end