File task.spec of Package task
#
# spec file for package task
#
# Copyright (c) 2024 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/
#
Name: task
Version: 3.44.0
Release: 0
Summary: CLI tool to run build tasks defined as YAML
License: MIT
Group: Development/Tools/Building
URL: https://taskfile.dev/
Source: %{name}-%{version}.tar.xz
Source1: vendor.tar.gz
BuildRequires: golang(API) >= 1.20
# Conflicting program name 'task'
Conflicts: taskwarrior
%description
Task is a build task runner like GNU Make that aims to be simple and easy to
use. Task is a single binary and has no other dependencies. Describe your build
tasks using a simple YAML schema.
%prep
%autosetup -a 1
%build
%ifnarch ppc64
export GOFLAGS="-buildmode=pie"
%endif
go build ./cmd/%{name}
%check
# primitive check, if binary is working
mkdir -p buildtest
cp ./task buildtest/
cd buildtest
./task --version
./task --init
./task
%install
install -Dm 0755 %{name} %{buildroot}/%{_bindir}/%{name}
%files
%doc README.md
%license LICENSE
%{_bindir}/%{name}
%changelog