Fixes to handle #330/#331

This commit is contained in:
Andy Neff 2015-05-29 17:19:07 -04:00
parent 0be27818f6
commit adca28e456
2 changed files with 31 additions and 9 deletions

@ -15,18 +15,23 @@ Requires: git
#Umm... excuse me what?
%define debug_package %{nil}
#I think this is because go links with --build-id=none for linux
#Uhhh... HOW DO I FIX THAT? Using an external linker
#Uhhh... HOW DO I FIX THAT? The answer is: go -ldflags '-linkmode=external'
%endif
%description
Git Large File Storage (LFS) replaces large files such as audio samples,
videos, datasets, and graphics with text pointers inside Git, while
storing the file contents on a remote server like GitHub.com or GitHub
Enterprise.
%prep
%setup -q -n %{name}-%{version}
mkdir -p src/github.com/github
ln -s $(pwd) src/github.com/github/%{name}
%build
./script/bootstrap
./script/man
GOPATH=`pwd` ./script/bootstrap
GOPATH=`pwd` ./script/man
%install
[ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT

@ -27,11 +27,28 @@ REDHAT_NAME=$(awk '{print $1}' /etc/redhat-release)
mkdir -p ${CURDIR}/{BUILD,BUILDROOT,SOURCES,RPMS,SRPMS}
if [ ! -e ${CURDIR}/SOURCES/v${VERSION}.tar.gz ]; then
echo "Downloading git-lfs..." >&6
mkdir -p ${CURDIR}/SOURCES
pushd ${CURDIR}/SOURCES
curl -L -O https://github.com/github/git-lfs/archive/v${VERSION}.tar.gz
popd
if [ "${BUILD_LOCAL:=0}" == "1" ]; then
echo "Zipping up current checkout of git-lfs..." >&6
if [[ ${REDHAT_VERSION} == 5 ]]; then
rm -rvf ${CURDIR}/tmptar
mkdir -p ${CURDIR}/tmptar/git-lfs-${VERSION}
tar -c .. --exclude rpm --exclude .git --exclude tmptar | tar -x -C tmptar/git-lfs-${VERSION}/
pushd ${CURDIR}/tmptar
tar -zcf ${CURDIR}/SOURCES/v${VERSION}.tar.gz git-lfs-${VERSION}
popd
rm -rvf ${CURDIR}/tmptar
else
pushd ${CURDIR}/..
tar -zcf ${CURDIR}/SOURCES/v${VERSION}.tar.gz --exclude v${VERSION}.tar.gz --exclude .git --exclude rpm . --transform "s:^:git-lfs-${VERSION}/:"
popd
fi
else
echo "Downloading git-lfs..." >&6
mkdir -p ${CURDIR}/SOURCES
pushd ${CURDIR}/SOURCES
curl -L -O https://github.com/github/git-lfs/archive/v${VERSION}.tar.gz
popd
fi
fi
if ! which go; then