]>
Commit | Line | Data |
---|---|---|
c5539a21 ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with tests # build without tests | |
42f23e25 | 4 | %bcond_without doc # build manual page |
c5539a21 ER |
5 | |
6 | Summary: Git extension for versioning large files | |
7 | Name: git-lfs | |
3be09737 | 8 | Version: 1.1.2 |
c5539a21 ER |
9 | Release: 1 |
10 | License: MIT | |
11 | Group: Applications/Archiving | |
7426848e | 12 | Source0: https://github.com/github/git-lfs/archive/v%{version}/%{name}-%{version}.tar.gz |
3be09737 | 13 | # Source0-md5: df62668ddba2bb35b5652edaf387d6d4 |
c5539a21 | 14 | URL: https://git-lfs.github.com/ |
c5539a21 ER |
15 | BuildRequires: git-core |
16 | BuildRequires: golang | |
5b986cd4 | 17 | BuildRequires: groff |
42f23e25 | 18 | %{?with_doc:BuildRequires: ronn} |
fc4d2e84 | 19 | ExclusiveArch: %{ix86} %{x8664} %{arm} |
c5539a21 ER |
20 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
21 | ||
22 | %define _enable_debug_packages 0 | |
23 | ||
24 | %description | |
25 | Git Large File Storage (LFS) replaces large files such as audio | |
26 | samples, videos, datasets, and graphics with text pointers inside Git, | |
27 | while storing the file contents on a remote server like GitHub.com or | |
28 | GitHub Enterprise. | |
29 | ||
30 | %prep | |
31 | %setup -q | |
32 | mkdir -p src/github.com/github | |
33 | ln -s $(pwd) src/github.com/github/%{name} | |
34 | ||
35 | %build | |
61923bef | 36 | unset GOROOT |
c5539a21 ER |
37 | export GOPATH=$(pwd) |
38 | %ifarch %{ix86} | |
39 | GOARCH=386 ./script/bootstrap | |
40 | %endif | |
41 | %ifarch %{x8664} | |
42 | GOARCH=amd64 ./script/bootstrap | |
43 | %endif | |
44 | ||
45 | %if %{with doc} | |
46 | ./script/man | |
47 | %endif | |
48 | ||
49 | %if %{with tests} | |
2cab5a6b | 50 | # ensure there are no GIT env vars for testing |
61923bef | 51 | #unset GIT_DIR GIT_WORK_TREE |
2cab5a6b ER |
52 | env | grep GIT_ && exit 3 |
53 | ||
c5539a21 ER |
54 | ./script/test |
55 | ./script/integration | |
56 | %endif | |
57 | ||
58 | %install | |
59 | rm -rf $RPM_BUILD_ROOT | |
60 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1} | |
61 | ||
62 | install -p bin/git-lfs $RPM_BUILD_ROOT%{_bindir}/git-lfs | |
63 | %if %{with doc} | |
64 | cp -p man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1 | |
65 | %endif | |
66 | ||
67 | %clean | |
68 | rm -rf $RPM_BUILD_ROOT | |
69 | ||
70 | %files | |
71 | %defattr(644,root,root,755) | |
72 | %doc LICENSE.md README.md | |
73 | %attr(755,root,root) %{_bindir}/git-lfs | |
74 | %{?with_doc:%{_mandir}/man1/*.1*} |