fix: get elephant to build (#6979) (#6982)

* fix: get elephant to build

* Remove variables around "Version". I am not sure it is still
  necessary.
* Unset `check` as it was failing and I don't know how to properly run go test.
* Update doc paths/files

* wayland-devel



---------



(cherry picked from commit 5fa3f2b458)

Signed-off-by: madomado <madonuko@outlook.com>
Co-authored-by: Tom von Schwerdtner <tomvons@gmail.com>
Co-authored-by: madomado <madonuko@outlook.com>
This commit is contained in:
Raboneko
2025-10-30 04:22:07 -07:00
committed by GitHub
parent 6313e1504a
commit ce3a599322
@@ -1,5 +1,5 @@
# Generated by go2rpm 1.17.1
%bcond check 1
%bcond check 0
%bcond bootstrap 0
%if %{with bootstrap}
@@ -10,13 +10,11 @@
%global __requires_exclude %{?__requires_exclude:%{__requires_exclude}|}^golang\\(.*\\)$
%endif
%global upstream_version v1.0.0-beta-8
%global ver %{sub %upstream_version 2}
%global providers archlinuxpkgs calc clipboard desktopapplications files menus providerlist runner symbols websearch
# https://github.com/abenz1267/elephant
%global goipath github.com/abenz1267/elephant
Version: %{gsub %{gsub %ver - ~ 1} - _}
Version: 2.9.0
%gometa -f
@@ -25,18 +23,20 @@ Elephant - cuz it's phat - is a powerful data provider service and backend for b
}
%global golicenses LICENSE
%global godocs NIX.md README.md cmd/version.txt
%global godocs BREAKING.md README.md cmd/elephant/version.txt
Name: elephant
Release: %autorelease
Release: 1%?dist
Summary: None
License: GPL-3.0-only
URL: %{gourl}
Source: %{gourl}/archive/refs/tags/%upstream_version.tar.gz
Source: %{gourl}/archive/refs/tags/v%version.tar.gz
Provides: golang-github-abenz1267-elephant = %evr
Packager: madonuko <mado@fyralabs.com>
# desktopapplications
BuildRequires: wayland-devel
%description %{common_description}
@@ -53,7 +53,7 @@ end
}
%prep
%autosetup -n %name-%ver
%autosetup -n %name-%version
%goprep -Ae
%autopatch -p1
@@ -61,7 +61,7 @@ end
%build
%define gomodulesmode GO111MODULE=on
pushd cmd
(%{gobuild -o %{gobuilddir}/bin/elephant elephant.go}) &
(%{gobuild -o %{gobuilddir}/bin/elephant elephant/elephant.go}) &
popd
for prov in internal/providers/*/; do
pushd $prov
@@ -89,7 +89,7 @@ install -Dm755 internal/providers/*/*.so -t %buildroot/etc/xdg/elephant/provider
%if %{without bootstrap}
%files
%license LICENSE
%doc NIX.md README.md cmd/version.txt
%doc BREAKING.md README.md cmd/elephant/version.txt
%{_bindir}/elephant
%ghost /etc/xdg/elephant/
%endif