| 1 |
Name: git-lfs |
| 2 |
Version: 3.8.0 |
| 3 |
Release: 1%{?dist} |
| 4 |
Summary: Git extension for versioning large files |
| 5 |
|
| 6 |
Group: Applications/Archiving |
| 7 |
License: MIT |
| 8 |
URL: https://git-lfs.com/ |
| 9 |
Source0: https://github.com/git-lfs/git-lfs/archive/v%{version}/%{name}-%{version}.tar.gz |
| 10 |
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) |
| 11 |
BuildRequires: perl-Digest-SHA |
| 12 |
BuildRequires: golang, tar, rubygem-asciidoctor, which, git >= 2.0.0, gettext-devel |
| 13 |
|
| 14 |
Requires: git >= 2.0.0 |
| 15 |
|
| 16 |
%define debug_package %{nil} |
| 17 |
#I think this is because go links with --build-id=none for linux |
| 18 |
|
| 19 |
%description |
| 20 |
Git Large File Storage (LFS) replaces large files such as audio samples, |
| 21 |
videos, datasets, and graphics with text pointers inside Git, while |
| 22 |
storing the file contents on a remote server like GitHub.com or GitHub |
| 23 |
Enterprise. |
| 24 |
|
| 25 |
%prep |
| 26 |
%setup -q -n %{name}-%{version} |
| 27 |
mkdir -p src/github.com/git-lfs |
| 28 |
ln -s $(pwd) src/github.com/git-lfs/%{name} |
| 29 |
|
| 30 |
%build |
| 31 |
pushd src/github.com/git-lfs/%{name} |
| 32 |
%if "%{_arch}" == "i386" |
| 33 |
GOARCH=386 FORCE_LOCALIZE=true make |
| 34 |
%else |
| 35 |
GOARCH=amd64 FORCE_LOCALIZE=true make |
| 36 |
%endif |
| 37 |
popd |
| 38 |
make man |
| 39 |
|
| 40 |
%install |
| 41 |
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT |
| 42 |
install -D bin/git-lfs ${RPM_BUILD_ROOT}/usr/bin/git-lfs |
| 43 |
mkdir -p -m 755 ${RPM_BUILD_ROOT}/usr/share/man/man1 |
| 44 |
mkdir -p -m 755 ${RPM_BUILD_ROOT}/usr/share/man/man5 |
| 45 |
mkdir -p -m 755 ${RPM_BUILD_ROOT}/usr/share/man/man7 |
| 46 |
install -D man/man1/*.1 ${RPM_BUILD_ROOT}/usr/share/man/man1 |
| 47 |
install -D man/man5/*.5 ${RPM_BUILD_ROOT}/usr/share/man/man5 |
| 48 |
install -D man/man7/*.7 ${RPM_BUILD_ROOT}/usr/share/man/man7 |
| 49 |
|
| 50 |
%post |
| 51 |
# The --skip-repo option prevents failure if / is a Git repository with existing |
| 52 |
# non-git-lfs hooks. |
| 53 |
git lfs install --skip-repo --system |
| 54 |
|
| 55 |
%preun |
| 56 |
# The --skip-repo option avoids mutating / if it is a Git repository. (Maybe the |
| 57 |
# user wants to replace this package with a different installation.) |
| 58 |
git lfs uninstall --skip-repo --system |
| 59 |
|
| 60 |
%check |
| 61 |
export GIT_LFS_TEST_DIR=$(mktemp -d) |
| 62 |
|
| 63 |
# test/git-lfs-server-api/main.go does not compile because github.com/spf13/cobra |
| 64 |
# cannot be found in vendor, for some reason. It's not needed for installs, so |
| 65 |
# skip it. |
| 66 |
export SKIPAPITESTCOMPILE=1 |
| 67 |
|
| 68 |
pushd src/github.com/git-lfs/%{name} |
| 69 |
make test |
| 70 |
make -C t PROVE_EXTRA_ARGS=-j9 test |
| 71 |
popd |
| 72 |
|
| 73 |
rm -rf ${GIT_LFS_TEST_DIR} |
| 74 |
|
| 75 |
%clean |
| 76 |
rm -rf %{buildroot} |
| 77 |
|
| 78 |
%files |
| 79 |
%defattr(-,root,root,-) |
| 80 |
%doc LICENSE.md README.md |
| 81 |
/usr/bin/git-lfs |
| 82 |
/usr/share/man/man1/*.1.gz |
| 83 |
/usr/share/man/man5/*.5.gz |
| 84 |
/usr/share/man/man7/*.7.gz |
| 85 |
|
| 86 |
%changelog |
| 87 |
* Sun Dec 6 2015 Andrew Neff <[email protected]> - 1.1.0-1 |
| 88 |
- Added Requires and version for git back in |
| 89 |
|
| 90 |
* Sat Oct 31 2015 Andrew Neff <[email protected]> - 1.0.3-1 |
| 91 |
- Added GIT_LFS_TEST_DIR to prevent future test race condition |
| 92 |
|
| 93 |
* Sun Aug 2 2015 Andrew Neff <[email protected]> - 0.5.4-1 |
| 94 |
- Added tests back in |
| 95 |
|
| 96 |
* Sat Jul 18 2015 Andrew Neff <[email protected]> - 0.5.2-1 |
| 97 |
- Changed Source0 filename |
| 98 |
|
| 99 |
* Mon May 18 2015 Andrew Neff <[email protected]> - 0.5.1-1 |
| 100 |
- Initial Spec |