%global debug_package %{nil} %global bname drive %global commit a42ab82225d2c9cc370926d6f0055a7039979e66 %global commit_short %(c=%{commit}; echo ${c:0:7}) # https://github.com/odeke-em/drive %global goipath github.com/odeke-em/drive Version: 0.4.0 %gometa Name: drive-google Release: 2%{?dist} Summary: Pull or push Google Drive files License: Apache-2.0 URL: https://github.com/odeke-em/drive Source0: https://github.com/odeke-em/drive/archive/%{commit}.tar.gz#/drive-%{commit_short}.tar.gz BuildRequires: gcc BuildRequires: golang >= 1.9.0 BuildRequires: git %description drive is a program to pull or push Google Drive files. %prep %goprep # Initialize module go mod init # Replace dependency with malformed import path go mod edit -replace github.com/odeke-em/rsc=github.com/pghmcfc/rsc@latest # Fetch all dependencies go mod tidy %build export GOPATH="$(pwd)/_build" # Some day I will figure out how to use %%{gobuildflags} but it will have to wait #drive-google pushd drive-google go build -o drive-google popd #drive-server pushd drive-server go build -o drive-server popd %install install -d %{buildroot}%{_bindir} install -p -m 0755 drive-google/drive-google %{buildroot}%{_bindir}/ install -p -m 0755 drive-server/drive-server %{buildroot}%{_bindir}/ install -d %{buildroot}%{_datadir}/icons/hicolor/128x128/mimetypes install -p -m 0644 icons/*.png %{buildroot}%{_datadir}/icons/hicolor/128x128/mimetypes/ install -d %{buildroot}%{_datadir}/icons/hicolor/scalable/mimetypes install -p -m 0644 icons/*.svg %{buildroot}%{_datadir}/icons/hicolor/scalable/mimetypes/ %files %license LICENSE %doc README.md %{_bindir}/drive-google %{_bindir}/drive-server %{_datadir}/icons/hicolor/* %changelog * Mon May 27 2024 Paul Howarth - 0.4.0-2.gita42ab82 - Build using go modules since old method no longer works (https://github.com/odeke-em/drive/issues/1144) * Tue Apr 6 2021 Paul Howarth - 0.4.0-1.a42ab82 - New release - Update to git commit: a42ab82225d2c9cc370926d6f0055a7039979e66 * Tue Dec 31 2019 Paul Howarth - 0.3.9.1-4.52aed62 - Local f31 build as upstream is unresponsive https://github.com/agrez/drive-google/issues/5 - Use %%license - Drop legacy %%defattr * Mon May 27 2019 Vaughan - 0.3.9.1-3.52aed62 - Rebuild for f30 * Sat Nov 10 2018 Vaughan - 0.3.9.1-2.52aed62 - Rebuild for f29 - Clean spec * Tue Apr 04 2017 Vaughan - 0.3.9.1-1.52aed62 - New release - Update to git commit: 52aed62548f4c408a3042cd2375661ac869d7710 * Sun Jan 15 2017 Vaughan - 0.3.9-1.a9f53bc - New release - Update to git commit: a9f53bc4cc9d9d2eada836602ad4b4a7902424a6 * Wed Oct 12 2016 Vaughan - 0.3.8.1-1.aa79e32 - New release - Update to git commit: aa79e324a22a2073b68c61783f4015426b7dbe67 * Wed Aug 24 2016 Vaughan - 0.3.7-1.bd7e3f5 - New release - Update to git commit: bd7e3f5ad5a67a27892e47da5c36452bfdfb8513 * Tue May 24 2016 Vaughan - 0.3.6-1.d75bc82 - New release - Update to git commit: d75bc827514eb54378c54452b7bb00b325ffb885 * Mon Mar 14 2016 Vaughan - 0.3.5-1.2334708 - Initial package - Git commit 2334708ccbaff51544634a8b8d93cd08910765cf