File lure.spec of Package lure
#
# spec file for package lure
#
# Copyright (c) 2022 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_prefix gitea.arsenm.dev/Arsen6331/lure
%global import_path %{provider_prefix}
Name: lure
Version: 0.0.7
Release: 0
Summary: LURE is intended to bring the AUR to all distros
License: GPL-3.0-only
URL: https://lure.arsenm.dev/
Group: System/Packages
Source0: %{name}-%{version}.tar.gz
Source1: vendor.tar.gz
Source2: version.txt
BuildRequires: golang-packaging
BuildRequires: golang(API) >= 1.18
#Requires:
%description
LURE is intended to bring the AUR to all distros. It is currently in an alpha state and may not be stable. It can download a repository, build packages in it using a bash script similar to PKGBUILD, and then install them using your system package manager.
%prep
%setup -q
tar -xvzf %{SOURCE1}
install %{SOURCE2} internal/config/version.txt
sed -i -e 's|@VERSION@|%{version}|g' internal/config/version.txt
%build
%{goprep} %{import_path}
#%%gobuild .
export GOFLAGS="$GOFLAGS -buildmode=pie -mod=vendor"
go build -ldflags "-s -w"
%install
%{goinstall}
%{gofilelist}
install -d %{buildroot}%{_bindir}
install -D lure %{buildroot}%{_bindir}
%files
%license LICENSE
%doc README.md
%{_bindir}/%{name}
%changelog