File git-lfs.spec of Package git-lfs

# spec file for package git-lfs
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via

Name:           git-lfs
Version:        2.1.0
Release:        0
Summary:        Git extension for versioning large files
License:        MIT
Group:          Development/Tools/Version Control
BuildRequires:  gcc-go
BuildRequires:  git >= 1.8.2
BuildRequires:  go
BuildRequires:  ruby2.2-rubygem-ronn
BuildRequires:  tar
BuildRequires:  which
BuildRoot:      %{_tmppath}/%{name}-%{version}-build

Git LFS is a command line extension and specification for managing
large files with Git.

%setup -q -n %{name}-%{version}
export GOPATH=`pwd`
mkdir -p src/
ln -s $(pwd) src/{name}

export GOPATH=`pwd`

%if 0%{?rhel} == 5
  export CGO_ENABLED=0

pushd src/{name}
  %if %{_arch} == i386
    GOARCH=386 ./script/bootstrap
    GOARCH=amd64 ./script/bootstrap

[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
install -D bin/git-lfs ${RPM_BUILD_ROOT}/usr/bin/git-lfs
mkdir -p -m 755 ${RPM_BUILD_ROOT}/usr/share/man/man1
mkdir -p -m 755 ${RPM_BUILD_ROOT}/usr/share/man/man5
install -D -m 644 man/*.1 ${RPM_BUILD_ROOT}/usr/share/man/man1
install -D -m 644 man/*.5 ${RPM_BUILD_ROOT}/usr/share/man/man5