LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File git-lfs.spec of Package git-lfs (Project home:aplazas)

#
# 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 http://bugs.opensuse.org/
#


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


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

%prep
%setup -q -n %{name}-%{version}
export GOPATH=`pwd`
mkdir -p src/github.com/git-lfs
ln -s $(pwd) src/github.com/git-lfs/%{name}

%build
export GOPATH=`pwd`

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

pushd src/github.com/git-lfs/%{name}
  %if %{_arch} == i386
    GOARCH=386 ./script/bootstrap
  %else
    GOARCH=amd64 ./script/bootstrap
  %endif
popd
./script/man

%install
[ "$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

%files
%defattr(-,root,root)
%{_bindir}/git-lfs
%{_mandir}/man1/git-lfs*.1%{ext_man}
%{_mandir}/man5/git-lfs*.5%{ext_man}

%changelog