## START: Set by rpmautospec ## (rpmautospec version 0.7.3) ## RPMAUTOSPEC: autorelease %define autorelease(e:s:pb:n) %{?-p:0.}%{lua: release_number = 1; base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); print(release_number + base_release_number - 1); }%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} ## END: Set by rpmautospec Name: nwg-dock-hyprland Version: 0.3.1 Release: %autorelease Summary: A GTK3 dock for the Hyprland window manager License: MIT URL: https://github.com/nwg-piotr/nwg-dock-hyprland Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz # Including Go 1.23.2 for build-time only # This is not bundled in the final binary, only used during compilation Source1: https://go.dev/dl/go1.23.2.linux-amd64.tar.gz Source2: https://go.dev/dl/go1.23.2.linux-arm64.tar.gz Source3: https://go.dev/dl/go1.23.2.linux-386.tar.gz # No Go 1.23.2 builds available for these architectures ExcludeArch: ppc64le s390x %global debug_package %{nil} BuildRequires: gcc-c++ BuildRequires: git BuildRequires: make BuildRequires: pkgconfig(gtk+-3.0) BuildRequires: gtk-layer-shell-devel BuildRequires: desktop-file-utils Requires: gtk3%{?_isa} Requires: gtk-layer-shell%{?_isa} %description A GTK3-based Dock for the Hyprland window manager. This package is part of the nwg-shell project (https://nwg-piotr.github.io/nwg-shell/). For a better experience, install nwg-drawer alongside this package. %prep %autosetup -p1 # Set up Go 1.23.2 for build process %ifarch x86_64 tar xf %{SOURCE1} -C %{_builddir} %endif %ifarch aarch64 tar xf %{SOURCE2} -C %{_builddir} %endif %ifarch i686 tar xf %{SOURCE3} -C %{_builddir} %endif %build # Using Go 1.23.2 for build process only # This does not affect the final binary export PATH=%{_builddir}/go/bin:$PATH export GOROOT=%{_builddir}/go export GOPATH=%{_builddir}/gopath export GOCACHE=%{_builddir}/gocache export GOFLAGS="-mod=vendor -trimpath" export GO111MODULE=on make build %install # Create necessary directories mkdir -p %{buildroot}%{_bindir} mkdir -p %{buildroot}%{_datadir}/%{name} # Install files cp -r images %{buildroot}%{_datadir}/%{name}/ cp config/* %{buildroot}%{_datadir}/%{name}/ install -Dm755 bin/%{name} %{buildroot}%{_bindir}/%{name} %files %license LICENSE %doc README.md %{_bindir}/%{name} %{_datadir}/%{name}/ %changelog * Thu Oct 31 2024 Jannik - 0.3.1-1 - Initial package