]>
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 | |
1bb03b08 | 8 | Version: 1.4.1 |
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 |
1bb03b08 | 13 | # Source0-md5: c62a314d96d3a30af4d98fa3305ad317 |
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} |
1bb03b08 | 19 | Requires: git-core >= 1.8.2 |
fc4d2e84 | 20 | ExclusiveArch: %{ix86} %{x8664} %{arm} |
c5539a21 ER |
21 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
22 | ||
23 | %define _enable_debug_packages 0 | |
24 | ||
84475c9a ER |
25 | %ifarch %{ix86} |
26 | %define GOARCH 386 | |
27 | %endif | |
28 | %ifarch %{x8664} | |
29 | %define GOARCH amd64 | |
30 | %endif | |
31 | ||
c5539a21 ER |
32 | %description |
33 | Git Large File Storage (LFS) replaces large files such as audio | |
34 | samples, videos, datasets, and graphics with text pointers inside Git, | |
35 | while storing the file contents on a remote server like GitHub.com or | |
36 | GitHub Enterprise. | |
37 | ||
38 | %prep | |
39 | %setup -q | |
40 | mkdir -p src/github.com/github | |
41 | ln -s $(pwd) src/github.com/github/%{name} | |
42 | ||
43 | %build | |
61923bef | 44 | unset GOROOT |
c5539a21 | 45 | export GOPATH=$(pwd) |
84475c9a ER |
46 | export GOARCH=%{GOARCH} |
47 | sh -x ./script/bootstrap | |
c5539a21 ER |
48 | |
49 | %if %{with doc} | |
50 | ./script/man | |
51 | %endif | |
52 | ||
53 | %if %{with tests} | |
2cab5a6b | 54 | # ensure there are no GIT env vars for testing |
61923bef | 55 | #unset GIT_DIR GIT_WORK_TREE |
2cab5a6b ER |
56 | env | grep GIT_ && exit 3 |
57 | ||
c5539a21 ER |
58 | ./script/test |
59 | ./script/integration | |
60 | %endif | |
61 | ||
62 | %install | |
63 | rm -rf $RPM_BUILD_ROOT | |
64 | install -d $RPM_BUILD_ROOT{%{_bindir},%{_mandir}/man1} | |
65 | ||
66 | install -p bin/git-lfs $RPM_BUILD_ROOT%{_bindir}/git-lfs | |
67 | %if %{with doc} | |
68 | cp -p man/*.1 $RPM_BUILD_ROOT%{_mandir}/man1 | |
69 | %endif | |
70 | ||
71 | %clean | |
72 | rm -rf $RPM_BUILD_ROOT | |
73 | ||
74 | %files | |
75 | %defattr(644,root,root,755) | |
1bb03b08 | 76 | %doc LICENSE.md README.md ROADMAP.md CHANGELOG.md |
c5539a21 ER |
77 | %attr(755,root,root) %{_bindir}/git-lfs |
78 | %{?with_doc:%{_mandir}/man1/*.1*} |