diff --git a/git-lfs-v3.3.0.tar.gz b/git-lfs-v3.3.0.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..2e9856f2d06020b69159e8fd9f77b40f7f9e7d5a Binary files /dev/null and b/git-lfs-v3.3.0.tar.gz differ diff --git a/git-lfs.spec b/git-lfs.spec new file mode 100644 index 0000000000000000000000000000000000000000..0ca9bbcbcb9e0a943fe74b271d81f7b6147b88a1 --- /dev/null +++ b/git-lfs.spec @@ -0,0 +1,86 @@ +%define anolis_release 1 +%bcond_without check +%undefine _missing_build_ids_terminate_build +%define debug_package %{nil} + +Name: git-lfs +Version: 3.3.0 +Release: %{anolis_release}%{?dist} +Summary: Git extension for versioning large files + +License: MIT +URL: https://git-lfs.github.io/ +Source0: https://github.com/%{name}/%{name}/releases/download/v%{version}/%{name}-v%{version}.tar.gz +Source1: vendor.tar.xz + +BuildRequires: gnupg2 +BuildRequires: curl +BuildRequires: fdupes +BuildRequires: git-core >= 1.8.2 +BuildRequires: go-rpm-macros +BuildRequires: which +BuildRequires: golang >= 1.18 +# Generate man pages +BuildRequires: /usr/bin/asciidoctor + +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. + +%package doc +Summary: Documentation files for %{name} +Requires: %{name} = %{EVR} +BuildArch: noarch + +%description doc +The %{name}-doc package contains documentation files for %{name}. + +%prep +%autosetup -n %{name}-%{version} -p1 -a 1 + +%build +go build -mod=vendor --buildmode=pie . + +make man + +%install +install -D -m 755 git-lfs %{buildroot}%{_bindir}/git-lfs + +for section in 1 5 7; do + install -d -p %{buildroot}%{_mandir}/man${section}/ + install -Dpm0644 man/man${section}/*.${section} %{buildroot}%{_mandir}/man${section}/ +done + + +%post +%{_bindir}/%{name} install --system --skip-repo + +%preun +if [ $1 -eq 0 ] ; then + %{_bindir}/%{name} uninstall --system --skip-repo +fi + +%if %{with check} +%check +export GIT_LFS_TEST_DIR=$(mktemp -d) +export SKIPAPITESTCOMPILE=1 +go test -x -mod=vendor +%endif + + +%files +%license LICENSE.md +%{_bindir}/%{name} +%{_mandir}/man1/%{name}*.1* +%{_mandir}/man5/%{name}*.5* +%{_mandir}/man7/%{name}*.7* + +%files doc +%doc README.md CHANGELOG.md docs + +%changelog +* Tue Mar 21 2023 happy_orange - 3.3.0-1 +- package init from upstream diff --git a/vendor.tar.xz b/vendor.tar.xz new file mode 100644 index 0000000000000000000000000000000000000000..6c0c3451b0821f4c92e85be4364a2c931d81c339 Binary files /dev/null and b/vendor.tar.xz differ