File mcp-server-osc.spec of Package mcp-server-osc

#
# spec file for package mcphost
#
# Copyright (c) 2025 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via https://bugs.opensuse.org/
#

%define gitname		osc-mcp
%define gitversion	0.2.1
%define gitdate		20250917
Name:           mcp-server-osc
Version:        0.2.1
Release:        0
Summary:        An MCP server for working with OSC
License:        MIT
URL:            https://github.com/openSUSE/osc-mcp
Source0:        https://github.com/openSUSE/osc-mcp/archive/refs/tags/v%{gitversion}.tar.gz#/%{name}-%{gitversion}.tar.gz
Source1:        vendor.tar.gz
BuildRequires:  go >= 1.24

%description
This project aims to offer a MCP service for the openBuild service. The
Model Context Protocol (MCP) is an open-source framework designed to
standardize how artificial intelligence systems, such as large language
models (LLMs), connect and share data with external tools and data
sources.

%prep
%autosetup -a1 -n %{gitname}-%{gitversion}

%build
CGO_ENABLED=0 go build 		\
	-o %{name}		\
	-mod=vendor 		\
	-buildmode=pie 		\
	osc-mcp.go

CGO_ENABLED=0 go build 		\
	-o parse_log		\
	-mod=vendor 		\
	-buildmode=pie 		\
	tools/parse_log.go

%install
install -D -m0755 %{name} %{buildroot}%{_bindir}/%{name}
ln %{buildroot}/%{_bindir}/%{name} %{buildroot}/%{_bindir}/%{gitname} 
install -D -m0755 parse_log %{buildroot}%{_bindir}/parse_log

%files
%license LICENSE
%doc README.md
%{_bindir}/%{name}
%{_bindir}/%{gitname}
%{_bindir}/parse_log

%changelog
openSUSE Build Service is sponsored by