File osc-mcp.spec of Package osc-mcp

#
# spec file for package osc-mcp
#
# Copyright (c) 2025 SUSE LLC and contributors
#
# 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/
#
%global goipath         github.com/openSUSE/osc-mcp
Name:           osc-mcp
Version:        0.1.2
Release:        0
Summary:        MCP (Model Context Protocol) service for the Open Build Service
License:        MIT
URL:            https://github.com/openSUSE/osc-mcp

# **IMPORTANT**: Prefer downloading of a source file via a service over direct download!
# needs to run service download_files to download files
Source0:        https://github.com/openSUSE/osc-mcp/archive/refs/tags/v%{version}.tar.gz#./%{name}-%{version}.tar.gz
Source1:        vendor.tar.gz

BuildRequires:  golang-packaging
BuildRequires:  golang(API)

%description

%prep
# The autosetup macro unpacks the source archive and applies any patches.
# Common options:
# -p1: Strip the first leading component from file names in patches (e.g., a/dir/file -> dir/file).
# -n <name>: Set the name of the source directory if it's different from the package name.
# -a <number>: Unpack the specified source archive (e.g., -a 1 for Source1).
# -N: Do not apply patches automatically. Use macro autopatch later.
%autosetup -p1 -a 1
%goprep %{goipath}

%build
%gobuild

%install
%goinstall



%files
%{_bindir}/osc-mcp

# IMPORTANT: changelog goes to separare file osc-mcp.changes commit function may create it automatically 
%changelog
openSUSE Build Service is sponsored by