summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--0001-use-vendor-dir-for-build.patch78
-rw-r--r--git-lfs.spec61
-rw-r--r--sources1
4 files changed, 141 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index e69de29..c33fe6d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/git-lfs-v3.6.0.tar.gz
diff --git a/0001-use-vendor-dir-for-build.patch b/0001-use-vendor-dir-for-build.patch
new file mode 100644
index 0000000..6ba7f65
--- /dev/null
+++ b/0001-use-vendor-dir-for-build.patch
@@ -0,0 +1,78 @@
+From f17333fb29d81d5061c96931c0cd5135dec0ba02 Mon Sep 17 00:00:00 2001
+From: zhoukang <gameoverboss@163.com>
+Date: Tue, 12 Jul 2022 21:21:58 +0800
+Subject: [PATCH] use vendor dir for build
+
+---
+ Makefile | 20 +++++++-------------
+ 1 file changed, 7 insertions(+), 13 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 0b73d9e..a185116 100644
+--- a/Makefile
++++ b/Makefile
+@@ -24,7 +24,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
+@@ -194,8 +194,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)" \
+ -trimpath \
+@@ -227,7 +227,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)
+- GOOS= GOARCH= $(GO) generate github.com/git-lfs/git-lfs/v3/commands
++ @echo "delete this step"
+
+ # trgen is a shorthand for ensuring that tr/tr_gen.go is kept up-to-date with
+ # the contents of po/build/*.mo.
+@@ -238,7 +238,7 @@ trgen : tr/tr_gen.go
+ # 'tr' of Git LFS. It depends upon the contents of the 'po' directory
+ # and converts the .mo files.
+ tr/tr_gen.go : $(MO)
+- GOOS= GOARCH= $(GO) generate github.com/git-lfs/git-lfs/v3/tr
++ @echo "delete this step"
+
+ po/build:
+ mkdir -p po/build
+@@ -597,7 +597,7 @@ vendor : go.mod
+ .PHONY : fmt
+ ifeq ($(shell test -x "`command -v $(GOIMPORTS)`"; echo $$?),0)
+ fmt : $(SOURCES) | lint
+- @$(GOIMPORTS) $(GOIMPORTS_EXTRA_OPTS) $?;
++ @echo "delete this step"
+ else
+ fmt : $(SOURCES) | lint
+ @echo "git-lfs: skipping fmt, no goimports found at \`$(GOIMPORTS)\` ..."
+@@ -607,13 +607,7 @@ 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) "."
++ @echo "delete this step"
+
+ # generate index.txt for ronn HTML man page link generation
+ .PHONY : index.txt
+--
+2.33.0
+
diff --git a/git-lfs.spec b/git-lfs.spec
new file mode 100644
index 0000000..26cd266
--- /dev/null
+++ b/git-lfs.spec
@@ -0,0 +1,61 @@
+%define debug_package %{nil}
+%bcond_without check
+
+# https://github.com/git-lfs/git-lfs
+Name: git-lfs
+Version: 3.6.0
+Release: 1
+Summary: Git extension for versioning large files
+
+License: MIT AND BSD-3-Clause
+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
+Enhances: git-core
+
+%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
+* Mon Dec 09 2024 Funda Wang <fundawang@yeah.net> - 3.6.0-1
+- update to 3.6.0
+
+* Tue Jul 12 2022 zhoukang <gameoverboss@163.com> - 3.2.0-1
+- Initial package
diff --git a/sources b/sources
new file mode 100644
index 0000000..55117bc
--- /dev/null
+++ b/sources
@@ -0,0 +1 @@
+e0df85960273e32ede92ff22e108f2b8 git-lfs-v3.6.0.tar.gz