## START: Set by rpmautospec ## (rpmautospec version 0.8.3) ## RPMAUTOSPEC: autorelease, autochangelog %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; 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 _srcname linux-mcp-server %global _mcp_version 1.23.0 %global _git_version %(git describe --tags --abbrev=0) Name: python-%{_srcname} Version: %{_git_version} Release: %autorelease Summary: MCP server for read-only Linux system administration. License: Apache-2.0 URL: https://github.com/rhel-lightspeed/linux-mcp-server Source0: %{url}/archive/%{version}/%{version}.tar.gz Source1: %{pypi_source mcp %{_mcp_version}} BuildSystem: pyproject BuildOption(install): -l linux_mcp_server BuildOption(generate_buildrequires): -p BuildArch: noarch BuildRequires: python3-devel BuildRequires: tomcli # TODO(r0x0d): Vendoring the mcp dependency as of now since it is not # available in Fedora. Provides: bundled(python3dist(mcp)) = %{_mcp_version} %global _description %{expand: MCP server for read-only Linux system administration, diagnostics, and troubleshooting } %description %_description %package -n python3-%{_srcname} Summary: %{summary} %description -n python3-%{_srcname} %_description %prep -a # Drop the mcp dependency as we are bundling it from Source1. tomcli set pyproject.toml arrays delitem project.dependencies "mcp.*" # Extract mcp to _vendor tar -xzf %{SOURCE1} -C src/linux_mcp_server/_vendor/ --strip-components=1 export PIP_FIND_LINKS=$PWD/_vendor export PYTHONPATH=$PWD/_vendor:$PYTHONPATH %files -n python3-%{_srcname} -f %{pyproject_files} %changelog ## START: Generated by rpmautospec * Wed Dec 03 2025 John Doe - 0.1.0a3-1 - Uncommitted changes ## END: Generated by rpmautospec