github.com/x-oss-byte/git-lfs@v2.5.2+incompatible/rpm/SPECS/git-lfs.spec (about)

     1  Name:           git-lfs
     2  Version:        2.5.2
     3  Release:        1%{?dist}
     4  Summary:        Git extension for versioning large files
     5  
     6  Group:          Applications/Archiving
     7  License:        MIT
     8  URL:            https://git-lfs.github.com/
     9  Source0:        https://github.com/git-lfs/git-lfs/archive/v%{version}/%{name}-%{version}.tar.gz
    10  BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
    11  BuildRequires:  perl-Digest-SHA
    12  BuildRequires:  golang, tar, rubygem-ronn, which, git >= 1.8.2
    13  
    14  Requires: git >= 1.8.2
    15  
    16  %define debug_package %{nil}
    17  #I think this is because go links with --build-id=none for linux
    18  
    19  %description
    20  Git Large File Storage (LFS) replaces large files such as audio samples,
    21  videos, datasets, and graphics with text pointers inside Git, while
    22  storing the file contents on a remote server like GitHub.com or GitHub
    23  Enterprise.
    24  
    25  %prep
    26  %setup -q -n %{name}-%{version}
    27  export GOPATH=`pwd`
    28  mkdir -p src/github.com/git-lfs
    29  ln -s $(pwd) src/github.com/git-lfs/%{name}
    30  
    31  %build
    32  %if 0%{?rhel} == 5
    33    export CGO_ENABLED=0
    34  %endif
    35  
    36  pushd src/github.com/git-lfs/%{name}
    37    %if %{_arch} == i386
    38      GOARCH=386 make
    39    %else
    40      GOARCH=amd64 make
    41    %endif
    42  popd
    43  make man
    44  
    45  %install
    46  [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT
    47  install -D bin/git-lfs ${RPM_BUILD_ROOT}/usr/bin/git-lfs
    48  mkdir -p -m 755 ${RPM_BUILD_ROOT}/usr/share/man/man1
    49  mkdir -p -m 755 ${RPM_BUILD_ROOT}/usr/share/man/man5
    50  install -D man/*.1 ${RPM_BUILD_ROOT}/usr/share/man/man1
    51  install -D man/*.5 ${RPM_BUILD_ROOT}/usr/share/man/man5
    52  
    53  %post
    54  git lfs install --system
    55  
    56  %preun
    57  git lfs uninstall
    58  
    59  %check
    60  export GOPATH=`pwd`
    61  export GIT_LFS_TEST_DIR=$(mktemp -d)
    62  
    63  # test/git-lfs-server-api/main.go does not compile because github.com/spf13/cobra
    64  # cannot be found in vendor, for some reason. It's not needed for installs, so
    65  # skip it.
    66  export SKIPAPITESTCOMPILE=1
    67  
    68  pushd src/github.com/git-lfs/%{name}
    69    make test
    70    go get github.com/ThomsonReutersEikon/go-ntlm/ntlm
    71    make -C t PROVE_EXTRA_ARGS=-j4 test
    72  popd
    73  
    74  rm -rf ${GIT_LFS_TEST_DIR}
    75  
    76  %clean
    77  rm -rf %{buildroot}
    78  
    79  %files
    80  %defattr(-,root,root,-)
    81  %doc LICENSE.md README.md
    82  /usr/bin/git-lfs
    83  /usr/share/man/man1/*.1.gz
    84  /usr/share/man/man5/*.5.gz
    85  
    86  %changelog
    87  * Sun Dec 6 2015 Andrew Neff <andyneff@users.noreply.github.com> - 1.1.0-1
    88  - Added Requires and version for git back in
    89  
    90  * Sat Oct 31 2015 Andrew Neff <andyneff@users.noreply.github.com> - 1.0.3-1
    91  - Added GIT_LFS_TEST_DIR to prevent future test race condition
    92  
    93  * Sun Aug 2 2015 Andrew Neff <andyneff@users.noreply.github.com> - 0.5.4-1
    94  - Added tests back in
    95  
    96  * Sat Jul 18 2015 Andrew Neff <andyneff@users.noreply.github.com> - 0.5.2-1
    97  - Changed Source0 filename
    98  
    99  * Mon May 18 2015 Andrew Neff <andyneff@users.noreply.github.com> - 0.5.1-1
   100  - Initial Spec