# Generated by go2rpm 1.9.0
%bcond_with check

%global debug_package %{nil}

# https://github.com/FyshOS/fynedesk
%global goipath         github.com/FyshOS/fynedesk
Version:                0.4.0

%gometa -f


%global common_description %{expand:
A full desktop environment for Linux/Unix using Fyne.}

%global golicenses      LICENSE
%global godocs          AUTHORS README.md CHANGELOG.md

Name:           %{goname}
Release:        1%?dist
Summary:        A full desktop environment for Linux/Unix using Fyne

License:        BSD-3-Clause
URL:            %{gourl}
Source:         %{gosource}
BuildRequires:  git
BuildRequires:  libX11-devel
BuildRequires:  libXcursor-devel
BuildRequires:  libXi-devel
BuildRequires:  libXinerama-devel
BuildRequires:  libXrandr-devel
BuildRequires:  xorg-x11-server-devel
BuildRequires:  libXxf86vm-devel
BuildRequires:  pkgconfig(gl)

Requires: arandr
Requires: xbacklight
Requires: network-manager-applet
BuildRequires: make
BuildRequires: golang

%description %{common_description}

%gopkg


%prep
%goprep
%autopatch -p1

%generate_buildrequires

%build
go build -ldflags "-B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') -s -w" -buildmode=pie ./cmd/fynedesk_runner
go build -ldflags "-B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \n') -s -w" -buildmode=pie ./cmd/fynedesk

%install
%gopkginstall
install -m 0755 -vd %{buildroot}%{_bindir}
%make_install

%if %{with check}
%check
%gocheck
%endif

%files
%license LICENSE
%doc AUTHORS README.md CHANGELOG.md
%{_bindir}/*
%{_datadir}/xsessions/fynedesk.desktop

%gopkgfiles

%changelog
%autochangelog
