File git-lfs_3.7.1-1.spec of Package git-lfs-git-lfs-3.7.1

# Copyright 2025 Wong Hoi Sing Edison <hswong3i@pantarei-design.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

%global debug_package %{nil}

%global source_date_epoch_from_changelog 0

Name: git-lfs
Epoch: 100
Version: 3.7.1
Release: 1%{?dist}
Summary: Git extension for versioning large files
License: MIT
URL: https://github.com/git-lfs/git-lfs/tags
Source0: %{name}_%{version}.orig.tar.gz
BuildRequires: golang-1.25
BuildRequires: glibc-static
BuildRequires: git
Requires: git

%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
%autosetup -T -c -n %{name}_%{version}-%{release}
tar -zx -f %{S:0} --strip-components=1 -C .

%build
mkdir -p bin
    set -ex && \
        export CGO_ENABLED=1 && \
        go build \
            -mod vendor -buildmode pie -v \
            -ldflags "-s -w" \
            -o ./bin/git-lfs .

%install
install -Dpm755 -d %{buildroot}%{_bindir}
install -Dpm755 -t %{buildroot}%{_bindir}/ bin/git-lfs

%files
%license LICENSE.md
%{_bindir}/*

%changelog
openSUSE Build Service is sponsored by