%bcond_with bootstrap Version: 7.0.2 Name: ford Release: 1%{?dist} Summary: Generate FORtran Documentation from code comments License: GPL-3.0-or-later AND MIT URL: https://github.com/Fortran-FOSS-Programmers/ford Source: %{pypi_source FORD} # Use gfortran rather than pcpp as a preprocessor Patch: gfortran_preprocess.patch # Relax dependency version requirements Patch: relax_requirements.patch BuildRequires: git BuildRequires: python3-devel # Documentation dependencies %if %{without bootstrap} BuildRequires: python3dist(ford) BuildRequires: python3dist(sphinx) BuildRequires: python3dist(sphinx-autodoc-typehints) BuildRequires: python3dist(sphinx-argparse-cli) BuildRequires: python3dist(sphinx-inline-tabs) %endif # Test dependencies BuildRequires: gcc-gfortran BuildArch: noarch # Uses pre-processor Requires: gcc-gfortran Requires: fontawesome-fonts Requires: fontawesome-fonts-web #Requires: glyphicons-halflings-fonts Provides: bundled(tipue-search) %global common_description %{expand: This is an automatic documentation generator for modern Fortran programs. FORD stands for FORtran Documenter. As you may know, "to ford" refers to crossing a river (or other body of water). It does not, in this context, refer to any company or individual associated with cars. Ford was written due to Doxygen's poor handling of Fortran and the lack of comparable alternatives. ROBODoc can't actually extract any information from the source code and just about any other automatic documentation software I found was either proprietary, didn't work very well for Fortran, or was limited in terms of how it produced its output. f90doc is quite good and I managed to modify it so that it could handle most of Fortran 2003, but it produces rather ugly documentation, can't provide as many links between different parts of the documentation as I'd like, and is written in Perl (which I'm not that familiar with and which lacks the sort of libraries found in Python for producing HTML content). The goal of FORD is to be able to reliably produce documentation for modern Fortran software which is informative and nice to look at. The documentation should be easy to write and non-obtrusive within the code. While it will never be as feature-rich as Doxygen, hopefully FORD will be able to provide a good alternative for documenting Fortran projects.} %description %{common_description} %prep %autosetup -p1 -n FORD-%{version} rm ford/tipuesearch/.DS_Store rm ford/tipuesearch/img/.DS_Store rm -r ford/js/MathJax-config rm -r *.egg-info %generate_buildrequires %pyproject_buildrequires -x tests # Remove shebangs sed -i '/!\/usr\/bin/d' ford/fixed2free2.py sed -i '/!\/usr\/bin/d' ford/reader.py sed -i '/!\/usr\/bin/d' ford/__init__.py %build %pyproject_wheel # Create documentation %if %{without bootstrap} pushd docs sphinx-build -b man . man popd %endif %install %pyproject_install %pyproject_save_files ford mkdir -p %{buildroot}/%{_mandir}/man1 install docs/man/ford* %{buildroot}/%{_mandir}/man1/ %check # Run tests that pass %python3 -m pytest %files -f %{pyproject_files} %doc README.md %{_bindir}/ford %{_mandir}/man1/ford.1* %changelog * Sat Nov 04 2023 Benson Muite - 7.0.2-1 - Initial package