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