## START: Set by rpmautospec ## (rpmautospec version 0.3.0) %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 3; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec %global _description %{expand: The LinuxDoc library contains Sphinx-doc extensions and command line tools to extract documentation from C/C++ source file comments. Even if this project started in context of the Linux-Kernel documentation, you can use these extensions in common Sphinx-doc projects.} Name: python-linuxdoc Version: 20230321 Release: %{autorelease} Summary: Sphinx-doc extensions for sophisticated C developer License: AGPL-3.0-or-later URL: https://return42.github.io/linuxdoc/ Source0: %{pypi_source linuxdoc} BuildArch: noarch %description %_description %package -n python3-linuxdoc Summary: %{summary} BuildRequires: python3-devel BuildRequires: help2man %description -n python3-linuxdoc %_description %prep %autosetup -n linuxdoc-%{version} # nothing here, empty package that gets installed in %%{python3_sitelib} rm -rf tests # remove shebangs find . -type f -name "*.py" -exec sed -i '/^#![ ]*\/usr\/bin\/env.*$/ d' {} 2>/dev/null ';' %generate_buildrequires %pyproject_buildrequires %build %pyproject_wheel %install %pyproject_install # generate man pages # must be done here because binaries must be installed for binfile in "kernel-autodoc" "kernel-doc" "kernel-grepdoc" "kernel-lintdoc" do ls -lash "$RPM_BUILD_ROOT/%{_bindir}/${binfile}" help2man -N --version-string %{version} -h -h --no-discard-stderr "$RPM_BUILD_ROOT/%{_bindir}/${binfile}" > "${binfile}.1" done install -p -m 0644 -D -t "$RPM_BUILD_ROOT/%{_mandir}/man1/" *.1 %pyproject_save_files linuxdoc %check # exclude sphinx < 3.0 bits, we don't have it in Fedora %pyproject_check_import linuxdoc -e *cdomainv2* %files -n python3-linuxdoc -f %{pyproject_files} %doc README.rst %{_bindir}/kernel-autodoc %{_bindir}/kernel-doc %{_bindir}/kernel-grepdoc %{_bindir}/kernel-lintdoc %{_mandir}/man1/kernel-* %changelog * Sat Mar 25 2023 Ankur Sinha (Ankur Sinha Gmail) 20230321-2 - chore: remove stale comment * Sat Mar 25 2023 Ankur Sinha (Ankur Sinha Gmail) 20230321-1 - feat: update as per review comments - update to latest release - include license file - use SPDX license - generate and install man pages * Sat Mar 25 2023 Ankur Sinha (Ankur Sinha Gmail) 20221127-2 - feat: ready for review * Sat Mar 25 2023 Ankur Sinha (Ankur Sinha Gmail) 20221127-1 - init