]> git.pld-linux.org Git - packages/git-lfs.git/blob - git-lfs.spec
up to 1.5.2 (22 November, 2016)
[packages/git-lfs.git] / git-lfs.spec
1 #
2 # Conditional build:
3 %bcond_with     tests           # build without tests
4 %bcond_without  doc             # build manual page
5
6 Summary:        Git extension for versioning large files
7 Name:           git-lfs
8 Version:        1.5.2
9 Release:        1
10 License:        MIT
11 Group:          Applications/Archiving
12 Source0:        https://github.com/github/git-lfs/archive/v%{version}/%{name}-%{version}.tar.gz
13 # Source0-md5:  6585ffb66f30180c98f8038e5b7d1349
14 URL:            https://git-lfs.github.com/
15 BuildRequires:  git-core
16 BuildRequires:  golang
17 BuildRequires:  groff
18 %{?with_doc:BuildRequires:      ronn}
19 Requires:       git-core >= 1.8.5
20 ExclusiveArch:  %{ix86} %{x8664} %{arm}
21 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
22
23 %define         _enable_debug_packages 0
24 %define         import_path     github.com/git-lfs/%{name}
25
26 %ifarch %{ix86}
27 %define GOARCH 386
28 %endif
29 %ifarch %{x8664}
30 %define GOARCH amd64
31 %endif
32
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
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}
47
48 %build
49 unset GOROOT
50 export GOPATH=$(pwd)
51 export GOARCH=%{GOARCH}
52
53 cd src/%{import_path}
54 sh -x ./script/bootstrap
55
56 %if %{with doc}
57 ./script/man
58 %endif
59
60 %if %{with tests}
61 # ensure there are no GIT env vars for testing
62 env | grep GIT_ && exit 3
63
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
72 cd src/%{import_path}
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)
83 %doc LICENSE.md README.md ROADMAP.md CHANGELOG.md
84 %attr(755,root,root) %{_bindir}/git-lfs
85 %{?with_doc:%{_mandir}/man1/*.1*}
This page took 0.126931 seconds and 3 git commands to generate.