This commit is contained in:
gameoverboss 2020-09-20 19:15:49 +08:00
parent ed931de1f4
commit 90110e5eb9
6 changed files with 136 additions and 73 deletions

View File

@ -0,0 +1,75 @@
From 2e4c2e8b73dee54dd3fa8a81325701f7295a3355 Mon Sep 17 00:00:00 2001
From: gameoverboss <gameoverboss@163.com>
Date: Wed, 21 Oct 2020 19:43:42 +0800
Subject: [PATCH] use vendor dir for build
---
Makefile | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/Makefile b/Makefile
index bd83e21..4d47289 100644
--- a/Makefile
+++ b/Makefile
@@ -21,7 +21,7 @@ GO_TEST_EXTRA_ARGS =
# BUILTIN_LD_FLAGS are the internal flags used to pass to the linker. By default
# the config.GitCommit variable is always set via this variable, and
# DWARF-stripping is enabled unless DWARF=YesPlease.
-BUILTIN_LD_FLAGS =
+BUILTIN_LD_FLAGS = "-linkmode=external"
ifneq ("$(VENDOR)","")
BUILTIN_LD_FLAGS += -X github.com/git-lfs/git-lfs/config.Vendor=$(VENDOR)
endif
@@ -163,8 +163,8 @@ endif
#
# It uses BUILD_MAIN as defined above to specify the entrypoint for building Git
# LFS.
-BUILD = GOOS=$(1) GOARCH=$(2) \
- $(GO) build \
+BUILD = GO111MODULE=on GOOS=$(1) GOARCH=$(2) \
+ $(GO) build -mod=vendor \
-ldflags="$(LD_FLAGS)" \
-gcflags="$(GC_FLAGS)" \
-asmflags="$(ASM_FLAGS)" \
@@ -195,7 +195,7 @@ mangen : commands/mancontent_gen.go
# 'commands' of Git LFS. It depends upon the contents of the 'docs' directory
# and converts those manpages into code.
commands/mancontent_gen.go : $(wildcard docs/man/*.ronn)
- $(GO) generate github.com/git-lfs/git-lfs/commands
+ #$(GO) generate github.com/git-lfs/git-lfs/commands
# Targets 'all' and 'build' build binaries of Git LFS for the above release
# matrix.
@@ -503,7 +503,7 @@ vendor : go.mod
.PHONY : fmt
ifeq ($(shell test -x "`which $(GOIMPORTS)`"; echo $$?),0)
fmt : $(SOURCES) | lint
- @$(GOIMPORTS) $(GOIMPORTS_EXTRA_OPTS) $?;
+ #@$(GOIMPORTS) $(GOIMPORTS_EXTRA_OPTS) $?;
else
fmt : $(SOURCES) | lint
@echo "git-lfs: skipping fmt, no goimports found at \`$(GOIMPORTS)\` ..."
@@ -513,13 +513,13 @@ endif
# are vendored in via vendor (see: above).
.PHONY : lint
lint : $(SOURCES)
- @! $(GO) list -f '{{ join .Deps "\n" }}' . \
- | $(XARGS) $(GO) list -f \
- '{{ if and (not .Standard) (not .Module) }} \
- {{ .ImportPath }} \
- {{ end }}' \
- | $(GREP) -v "github.com/git-lfs/git-lfs" \
- | $(GREP) "."
+ #@! $(GO) list -f '{{ join .Deps "\n" }}' . \
+ #| $(XARGS) $(GO) list -f \
+ # '{{ if and (not .Standard) (not .Module) }} \
+ # {{ .ImportPath }} \
+ # {{ end }}' \
+ #| $(GREP) -v "github.com/git-lfs/git-lfs" \
+ #| $(GREP) "."
# MAN_ROFF_TARGETS is a list of all ROFF-style targets in the man pages.
MAN_ROFF_TARGETS = man/git-lfs-checkout.1 \
--
2.25.1

View File

@ -1,36 +0,0 @@
# git-lfs
#### Description
Git extension for versioning large files
#### Software Architecture
Software architecture description
#### Installation
1. xxxx
2. xxxx
3. xxxx
#### Instructions
1. xxxx
2. xxxx
3. xxxx
#### Contribution
1. Fork the repository
2. Create Feat_xxx branch
3. Commit your code
4. Create Pull Request
#### Gitee Feature
1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
4. The most valuable open source project [GVP](https://gitee.com/gvp)
5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)

View File

@ -1,37 +0,0 @@
# git-lfs
#### 介绍
Git extension for versioning large files
#### 软件架构
软件架构说明
#### 安装教程
1. xxxx
2. xxxx
3. xxxx
#### 使用说明
1. xxxx
2. xxxx
3. xxxx
#### 参与贡献
1. Fork 本仓库
2. 新建 Feat_xxx 分支
3. 提交代码
4. 新建 Pull Request
#### 码云特技
1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com)
3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目
4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目
5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)

BIN
git-lfs-v2.12.0.tar.gz Normal file

Binary file not shown.

57
git-lfs.spec Normal file
View File

@ -0,0 +1,57 @@
%define debug_package %{nil}
%bcond_without check
# https://github.com/git-lfs/git-lfs
Version: 2.12.0
Name: git-lfs
Release: 1%{?dist}
Summary: Git extension for versioning large files
License: MIT and BSD and Apache-2.0 and MPL-2.0
URL: https://git-lfs.github.io/
Source0: https://github.com/%{name}/%{name}/releases/download/v%{version}/%{name}-v%{version}.tar.gz
Patch6000: 0001-use-vendor-dir-for-build.patch
%if %{with check}
# Tests
BuildRequires: perl-Digest-SHA
BuildRequires: perl-Test-Harness
# Tests require full git suite, but not generally needed.
BuildRequires: git >= 1.8.5
%endif
BuildRequires: golang, tar, which
Requires: git-core >= 1.8.5
%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.
%prep
%autosetup -n %{name}-%{version} -p1
cd ..
mv %{name}-%{version} %{name}
mkdir -p %{name}-%{version}/src/github.com/git-lfs
mv %{name} %{name}-%{version}/src/github.com/git-lfs/
%build
pushd src/github.com/git-lfs/%{name}
make
popd
# BaseOS is not support rubygem-ronn/ronn, ignore generate man pages
%install
install -Dpm0755 src/github.com/git-lfs/git-lfs/bin/git-lfs %{buildroot}%{_bindir}/%{name}
%files
%{_bindir}/%{name}
%changelog
* Sat Sep 19 2020 zhoukang <gameoverboss@163.com> - 2.12.0-1
- Initial package

4
git-lfs.yaml Normal file
View File

@ -0,0 +1,4 @@
version_control: git
src_repo: https://github.com/git-lfs/git-lfs.git
tag_prefix: "^v"
separator: "."