Rename subpackage for Windows & macOS binaries
Resolves: rhbz#2013681
This commit is contained in:
parent
f793921433
commit
1bda253b40
26
butane.spec
26
butane.spec
@ -60,18 +60,16 @@ Provides: bundled(golang(gopkg.in/yaml.v3)) = 3.0.0-20191010095647.gitfc94e3f716
|
||||
%description
|
||||
%{common_description}
|
||||
|
||||
%package nonlinux
|
||||
%package redistributable
|
||||
Summary: Butane for macOS and Windows
|
||||
License: ASL 2.0
|
||||
BuildArch: noarch
|
||||
|
||||
%description nonlinux
|
||||
%description redistributable
|
||||
%{common_description}
|
||||
|
||||
This package contains macOS and Windows Butane binaries built through
|
||||
cross-compilation. Do not install it. It is only used for building release
|
||||
binaries to be signed by Fedora release engineering and uploaded to the
|
||||
Butane GitHub releases page.
|
||||
cross-compilation.
|
||||
|
||||
%prep
|
||||
%goprep -k
|
||||
@ -87,18 +85,18 @@ echo "Building butane..."
|
||||
%global gocrossbuild go build -ldflags "${LDFLAGS:-} -B 0x$(head -c20 /dev/urandom|od -An -tx1|tr -d ' \\n')" -a -v -x
|
||||
|
||||
echo "Building macOS Butane..."
|
||||
GOARCH=amd64 GOOS=darwin %gocrossbuild -o butane-x86_64-apple-darwin internal/main.go
|
||||
GOARCH=amd64 GOOS=darwin %gocrossbuild -o butane-darwin-amd64 internal/main.go
|
||||
|
||||
echo "Building Windows Butane..."
|
||||
GOARCH=amd64 GOOS=windows %gocrossbuild -o butane-x86_64-pc-windows-gnu.exe internal/main.go
|
||||
GOARCH=amd64 GOOS=windows %gocrossbuild -o butane-windows-amd64.exe internal/main.go
|
||||
|
||||
%install
|
||||
install -d -p %{buildroot}%{_bindir}
|
||||
install -p -m 0755 ./butane %{buildroot}%{_bindir}
|
||||
ln -s butane %{buildroot}%{_bindir}/fcct
|
||||
install -d -p %{buildroot}%{_datadir}/butane
|
||||
install -p -m 0644 ./butane-x86_64-apple-darwin %{buildroot}%{_datadir}/butane
|
||||
install -p -m 0644 ./butane-x86_64-pc-windows-gnu.exe %{buildroot}%{_datadir}/butane
|
||||
install -d -p %{buildroot}%{_datadir}/butane-redistributable
|
||||
install -p -m 0644 ./butane-darwin-amd64 %{buildroot}%{_datadir}/butane-redistributable
|
||||
install -p -m 0644 ./butane-windows-amd64.exe %{buildroot}%{_datadir}/butane-redistributable
|
||||
|
||||
%if %{with check}
|
||||
%check
|
||||
@ -111,11 +109,11 @@ install -p -m 0644 ./butane-x86_64-pc-windows-gnu.exe %{buildroot}%{_datadir}/bu
|
||||
%{_bindir}/butane
|
||||
%{_bindir}/fcct
|
||||
|
||||
%files nonlinux
|
||||
%files redistributable
|
||||
%license %{golicenses}
|
||||
%dir %{_datadir}/butane
|
||||
%{_datadir}/butane/butane-x86_64-apple-darwin
|
||||
%{_datadir}/butane/butane-x86_64-pc-windows-gnu.exe
|
||||
%dir %{_datadir}/butane-redistributable
|
||||
%{_datadir}/butane-redistributable/butane-darwin-amd64
|
||||
%{_datadir}/butane-redistributable/butane-windows-amd64.exe
|
||||
|
||||
%changelog
|
||||
* Wed Aug 04 2021 Benjamin Gilbert <bgilbert@redhat.com> - 0.13.1-1
|
||||
|
Loading…
Reference in New Issue
Block a user