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

#
# spec file for package systemd-mcp
#
# 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 systemd-mcp
Name:           mcp-server-systemd
Version:        0.0.1
Release:        0
Summary:        mcp bindings for mcp
# FIXME: Select a correct license from https://github.com/openSUSE/spec-cleaner#spdx-licenses
License:        MIT
URL:            https://github.com/mslacken/systemd-mcp
Source0:        %{gitname}-%{version}.tar
Source1:        vendor.tar.xz
BuildRequires:  go >= 1.24
BuildRequires:  systemd-devel

%description
mcp server which allows to
* list units/services
* start/stop/restart units/services
* enable/disable services
* list log

%prep
%autosetup -p1 -a1 -n %{gitname}-%{version}

%build
# The macro make_build does not work on older CentOS versions
make

%install
# The macro make_install does not work on older CentOS versions
make install DESTDIR=%{buildroot}
# RPM automatically stores hardlinked files only once
ln %{buildroot}/%{_bindir}/%{gitname} %{buildroot}/%{_bindir}/%{name}

%check

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

%changelog
openSUSE Build Service is sponsored by