File golang-github-kardianos-service.spec of Package golang-github-kardianos-service

#
# spec file for package golang-github-kardianos-service
#
# Copyright (c) 2020 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/
#


%global provider        github
%global provider_tld    com
%global project         kardianos
%global repo            service
%global provider_prefix %{provider}.%{provider_tld}/%{project}/%{repo}
%global import_path     %{provider_prefix}

Name:           golang-%{provider}-%{project}-%{repo}
Version:        1.0.0+git20190208.56787a3
Release:        0
Summary:        Go library for running go programs as a service on major platforms
License:        Zlib
Group:          Development/Languages/Golang
URL:            https://%{provider_prefix}
Source0:        %{repo}-%{version}.tar.xz
Source1:        rpmlintrc
Patch0:         s_fix_systemd_detection.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

BuildRequires:  golang-packaging
BuildRequires:  systemd
BuildRequires:  xz

%{go_nostrip}
%{go_provides}

%description
service will install / un-install, start / stop, and run a program as a service (daemon).
Currently supports Windows XP+, Linux/(systemd | Upstart | SysV), and OSX/Launchd.

Windows controls services by setting up callbacks that is non-trivial. This is very different
than other systems. This package provides the same API despite the substantial differences.
It also can be used to detect how a program is called, from an interactive terminal or
from a service manager.

%prep
%setup -q -n %{repo}-%{version}
%patch0 -p1

%build
%goprep %{import_path}
%gobuild --mod=vendor "" ...

%install
%goinstall
%gosrc
%gofilelist

%check
%gotest --mod=vendor "" ...

%files -f file.lst
%{_bindir}/*
%doc README.md
%license LICENSE

%changelog
openSUSE Build Service is sponsored by