File pasta.spec of Package pasta

#
# spec file for package pasta
#
# Copyright (c) 2021 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:           pasta
Summary:        Stupid simple pastebin service
Url:            https://github.com/grisu48/pasta
Version:        0.7.2
Release:        0
License:        MIT
Group:          Metapackages
Source:         pasta-%{version}.tar.gz
Source1:        vendor.tar.gz
BuildRequires:  fdupes
BuildRequires:  golang(API) >= 1.20
Conflict:       passt

%description
Pasta is a simple pastebin service written in go. Users can paste content,
named "pastas" via a simple web UI, or via POST requests from the client of
their choice (e.g. curl). Users can delete their own pastas via a received
token.

This project also contains a simple pasta client, which allows to paste a
file from the command line and keeps track of the already pasted ones.

%prep
%autosetup -D -a 1

%build
go build -mod=vendor -buildmode=pie -o pasta cmd/pasta/*.go
go build -mod=vendor -buildmode=pie -o pastad cmd/pastad/*.go

%install
install -D -m 0755 pasta "%{buildroot}/%{_bindir}/pasta"
install -D -m 0755 pastad "%{buildroot}/%{_bindir}/pastad"

%fdupes %{buildroot}

%files
%doc README.md
%license LICENSE
%{_bindir}/pasta
%{_bindir}/pastad

%changelog
openSUSE Build Service is sponsored by