Blame SPECS/git-lfs.spec

e803d4
# Build man pages
e803d4
%global with_manpages 1
e803d4
e803d4
%bcond_without check
e803d4
e803d4
# https://github.com/git-lfs/git-lfs
e803d4
%global goipath         github.com/git-lfs/git-lfs
e803d4
Version:                2.11.0
e803d4
e803d4
# golang doesn't ship i686 binaries, we don't need the build
e803d4
# https://bugzilla.redhat.com/show_bug.cgi?id=1752991#c9
e803d4
%global golang_arches %(echo %{golang_arches} | sed "s|%{ix86}||")
e803d4
%gometa
e803d4
e803d4
%global gobuilddir %{_builddir}/%{name}-%{version}/_build
e803d4
e803d4
Name:           git-lfs
f520bd
Release:        2%{?dist}
e803d4
Summary:        Git extension for versioning large files
e803d4
e803d4
License:        MIT
e803d4
URL:            https://git-lfs.github.io/
e803d4
Source0:        https://github.com/%{name}/%{name}/releases/download/v%{version}/%{name}-v%{version}.tar.gz
e803d4
Source1:        manpages.tgz
e803d4
# See this script. Generating of manpages is performed on other distros due to some missing numerous dependencies on RHEL
e803d4
Source2:        gen-manpages.sh
e803d4
e803d4
Provides:       bundled(golang)(github.com/alexbrainman/sspi) = 4729b3d4d8581b2db83864d1018926e4154f9406
e803d4
Provides:       bundled(golang)(github.com/avast/retry-go) = a322e24d96313ab405dec28ad5711f036c6d25a3
e803d4
Provides:       bundled(golang)(github.com/davecgh/go-spew) = 8991bc29aa16c548c550c7ff78260e27b9ab7c73
e803d4
Provides:       bundled(golang)(github.com/dpotapov/go-spnego) = c2c609116ad04b25367e2789f273aaf8d1c263da
e803d4
Provides:       bundled(golang)(github.com/git-lfs/gitobj) = c6c142b484a6cecc0e79bebe3d9e931c5c00e982
e803d4
Provides:       bundled(golang(github.com/git-lfs/go-netrc) = e0e9ca483a183481412e6f5a700ff20a36177503
e803d4
Provides:       bundled(golang(github.com/git-lfs/go-ntlm)) = c5056e7fa0664ea69eed654a9618fa5e342dc347
e803d4
Provides:       bundled(golang(github.com/git-lfs/wildmatch)) = 87c0f52cdf80ddb5b7de681298e5fee5898e8e16
e803d4
Provides:       bundled(golang(github.com/hashicorp/go-uuid)) = 4f571afc59f3043a65f8fe6bf46d887b10a01d43
e803d4
Provides:       bundled(golang(github.com/inconshreveable/mousetrap)) = 76626ae9c91c4f2a10f34cad8ce83ea42c93bb75
e803d4
Provides:       bundled(golang(github.com/jcmturner/gofork)) = dc7c13fece037a4a36e2b3c69db4991498d30692
e803d4
Provides:       bundled(golang(github.com/mattn/go-isatty)) = 6ca4dbf54d38eea1a992b3c722a76a5d1c4cb25c
e803d4
Provides:       bundled(golang(github.com/olekukonko/ts)) = 78ecb04241c0121483589a30b0814836a746187d
e803d4
Provides:       bundled(golang(github.com/pkg/errors)) = c605e284fe17294bda444b34710735b29d1a9d90
e803d4
Provides:       bundled(golang(github.com/pmezard/go-difflib)) = 792786c7400a136282c1664665ae0a8db921c6c2
e803d4
Provides:       bundled(golang(github.com/rubyist/tracerx)) = 787959303086f44a8c361240dfac53d3e9d53ed2
e803d4
Provides:       bundled(golang(github.com/spf13/cobra)) = ef82de70bb3f60c65fb8eebacbb2d122ef517385
e803d4
Provides:       bundled(golang(github.com/spf13/pflag)) = 298182f68c66c05229eb03ac171abe6e309ee79a
e803d4
Provides:       bundled(golang(github.com/ssgelm/cookiejarparser)) = ead01002df3bee9f6d64bfde0c7387bd2368a2e0
e803d4
Provides:       bundled(golang(github.com/stretchr/testify)) = 3ebf1ddaeb260c4b1ae502a01c7844fa8c1fa0e9
e803d4
Provides:       bundled(golang(github.com/xeipuuv/gojsonpointer)) = 4e3ac2762d5f479393488629ee9370b50873b3a6
e803d4
Provides:       bundled(golang(github.com/xeipuuv/gojsonreference)) = bd5ef7bd5415a7ac448318e64f11a24cd21e594b
e803d4
Provides:       bundled(golang(github.com/xeipuuv/gojsonschema)) = 6b67b3fab74d992bd07f72550006ab2c6907c416
e803d4
Provides:       bundled(golang(golang.org/x/crypto)) = a29dc8fdc73485234dbef99ebedb95d2eced08de
e803d4
Provides:       bundled(golang(golang.org/x/net) = 83d349e8ac1aeaa6e5b8669cbd094dccb2a7661d
e803d4
Provides:       bundled(golang(golang.org/x/sync)) = 37e7f081c4d4c64e13b10787722085407fe5d15f
e803d4
Provides:       bundled(golang(golang.org/x/sys)) = 97732733099d6a942a73b889770774366de963ed
e803d4
Provides:       bundled(golang(golang.org/x/text)) = f21a4dfb5e38f5895301dc265a8def02365cc3d0
e803d4
Provides:       bundled(golang(gopkg.in/jcmturner/aescts.v1)) = f6abebb3171c4c1b1fea279cb7c7325020a26290
e803d4
Provides:       bundled(golang(gopkg.in/jcmturner/dnsutils.v1)) = 13eeb8d49ffb74d7a75784c35e4d900607a3943c
e803d4
Provides:       bundled(golang(gopkg.in/jcmturner/gokrb5.v5)) = 32ba44ca5b42f17a4a9f33ff4305e70665a1bc0
e803d4
Provides:       bundled(golang(gopkg.in/jcmturner/rpc.v0)) = 4480c480c9cd343b54b0acb5b62261cbd33d7adf
e803d4
Provides:       bundled(golang(gopkg.in/yaml.v2)) = 53403b58ad1b561927d19068c655246f2db79d48
e803d4
e803d4
%if 0%{?with_check}
e803d4
# For tests
e803d4
BuildRequires:  perl-Digest-SHA
e803d4
BuildRequires:  perl-Test-Harness
e803d4
# Tests require full git suite, but not generally needed.
e803d4
BuildRequires:  git >= 1.8.5
e803d4
%endif
e803d4
e803d4
Requires:       git-core >= 1.8.5
e803d4
e803d4
%description
e803d4
Git Large File Storage (LFS) replaces large files such as audio samples,
e803d4
videos, datasets, and graphics with text pointers inside Git, while
e803d4
storing the file contents on a remote server.
e803d4
e803d4
e803d4
%prep
e803d4
%autosetup -p1 -n %{name}-%{version}
e803d4
e803d4
install -m 0755 -vd %{gobuilddir}/bin
e803d4
install -m 0755 -vd "$(dirname %{gobuilddir}/src/%{goipath})"
e803d4
ln -fs "$(pwd)" "%{gobuilddir}/src/%{goipath}"
e803d4
e803d4
%if %{?with_manpages}
e803d4
# Unpack manpages generated by %%{SOURCE2}
e803d4
tar -xf %{SOURCE1}
e803d4
%endif
e803d4
e803d4
# Modify Makefile so that it expects binaries where we build them.
e803d4
sed -i -e 's!\.\./bin/!/%{gobuilddir}/bin/!g' t/Makefile
e803d4
e803d4
e803d4
%build
e803d4
export GOPATH=%{gobuilddir}:%{gopath}
e803d4
export GO111MODULE=off
e803d4
e803d4
# Build manpages first (some embedding in the executable is done.)
e803d4
pushd docs
e803d4
%gobuild -o mangen man/mangen.go
e803d4
./mangen
f520bd
# Removes unwanted source files
f520bd
# https://bugzilla.redhat.com/show_bug.cgi?id=1852842
f520bd
rm mangen man/mangen.go
f520bd
popd
e803d4
e803d4
%gobuild -o %{gobuilddir}/bin/git-lfs %{goipath}
e803d4
e803d4
# Build test executables
e803d4
pushd %{gobuilddir}/src/%{goipath}
e803d4
for cmd in t/cmd/*.go; do
e803d4
    %gobuild -o "%{gobuilddir}/bin/$(basename $cmd .go)" "$cmd"
e803d4
done
e803d4
%gobuild -o "%{gobuilddir}/bin/git-lfs-test-server-api" t/git-lfs-test-server-api/*.go
e803d4
popd
e803d4
e803d4
e803d4
%install
e803d4
# In Fedora this is done by using %%gopkginstall
e803d4
install -Dpm0755 %{gobuilddir}/bin/git-lfs %{buildroot}%{_bindir}/%{name}
e803d4
install -d -p %{buildroot}%{_mandir}/man1/
e803d4
install -Dpm0644 docs/man/*.1 %{buildroot}%{_mandir}/man1/
e803d4
install -d -p %{buildroot}%{_mandir}/man5/
e803d4
install -Dpm0644 docs/man/*.5 %{buildroot}%{_mandir}/man5/
f520bd
# Remove unwanted files from man folder
f520bd
# https://bugzilla.redhat.com/show_bug.cgi?id=1852842
f520bd
rm docs/man/*.1 docs/man/*.5
e803d4
e803d4
e803d4
%post
e803d4
%{_bindir}/%{name} install --system --skip-repo
e803d4
e803d4
%preun
e803d4
if [ $1 -eq 0 ]; then
e803d4
    %{_bindir}/%{name} uninstall --system --skip-repo
e803d4
fi
e803d4
exit 0
e803d4
e803d4
e803d4
%if %{with check}
e803d4
%check
e803d4
# In Fedora this is done by using %%gochecks
e803d4
PATH=%{buildroot}%{_bindir}:%{gobuilddir}/bin:$PATH \
e803d4
    make -C t PROVE_EXTRA_ARGS="-j$(getconf _NPROCESSORS_ONLN)"
e803d4
%endif
e803d4
e803d4
e803d4
%files
e803d4
# In Fedora this is done by using %%gopkgfiles 
e803d4
%doc README.md CHANGELOG.md docs
e803d4
%license LICENSE.md
e803d4
%{_bindir}/%{name}
e803d4
%{_mandir}/man1/%{name}*.1*
e803d4
%{_mandir}/man5/%{name}*.5*
e803d4
e803d4
e803d4
%changelog
f520bd
* Wed Jul 1 2020 Ondrej Pohorelsky <opohorel@redhat.com> - 2.11.0-2
f520bd
- Removed mangen source file
f520bd
- Cleaned docs/man folder
f520bd
- Resolves: rhbz#1852842
f520bd
e803d4
* Wed Jun 10 2020 Ondrej Pohorelsky <opohorel@redhat.com> - 2.11.0-1
e803d4
- Update to version 2.11.0
e803d4
- Resolves: rhbz#1783391
e803d4
e803d4
* Thu Jul 19 2018 Sebastian Kisela <skisela@redhat.com> - 2.4.1-3
e803d4
- Add pregenerated manpages, due to missing dependency 'ronn' in rhel7.
e803d4
e803d4
* Wed Jul 18 2018 Sebastian Kisela <skisela@redhat.com> - 2.4.1-2
e803d4
- Initial build for rh-git218-git-lfs-2.4.1
e803d4
e803d4
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.4.1-2
e803d4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
e803d4
e803d4
* Wed May 23 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2.4.1-1
e803d4
- Update to latest release
e803d4
e803d4
* Mon May 21 2018 Carl George <carl@george.computer> - 2.4.0-3
e803d4
- Fix %%preun to correctly remove the lfs filter on uninstall (rhbz#1580357)
e803d4
e803d4
* Mon Mar 12 2018 Carl George <carl@george.computer> - 2.4.0-2
e803d4
- Add %%go_arches fallback to work around Koji issues
e803d4
e803d4
* Sun Mar 04 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2.4.0-1
e803d4
- Update to latest release.
e803d4
e803d4
* Thu Feb 08 2018 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2.3.4-6
e803d4
- Add patches to build with Go 1.10.
e803d4
e803d4
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.4-5
e803d4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
e803d4
e803d4
* Mon Dec 04 2017 Carl George <carl@george.computer> - 2.3.4-4
e803d4
- Use vendored libraries on RHEL
e803d4
- Skip test on RHEL
e803d4
- Don't build man pages on RHEL due to missing ronn
e803d4
- Don't build html versions of man pages
e803d4
e803d4
* Fri Dec 01 2017 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2.3.4-3
e803d4
- Require git-core instead of git.
e803d4
e803d4
* Fri Nov 03 2017 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2.3.4-2
e803d4
- Patch tests to work on slow systems like arm and aarch builders.
e803d4
- Fix "git lfs help" command.
e803d4
e803d4
* Fri Nov 03 2017 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2.3.4-1
e803d4
- Update to latest release.
e803d4
- Run all tests during build.
e803d4
e803d4
* Fri Sep 01 2017 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2.2.1-3
e803d4
- Remove redundant doc tag on manpages.
e803d4
- Use path macros in %%post/%%postun.
e803d4
e803d4
* Thu Aug 31 2017 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2.2.1-2
e803d4
- Disable unnecessary subpackages.
e803d4
e803d4
* Sun Jul 30 2017 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2.2.1-1
e803d4
- Update to latest version.
e803d4
e803d4
* Wed Apr 19 2017 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2.0.2-2
e803d4
- Patch up to build with Go 1.7
e803d4
e803d4
* Wed Apr 19 2017 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2.0.2-1
e803d4
- Update to latest release
e803d4
- Add some requested macros
e803d4
e803d4
* Tue Mar 14 2017 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2.0.1-1
e803d4
- Update to latest release
e803d4
- Don't disable git-lfs globally during upgrade
e803d4
e803d4
* Mon Mar 06 2017 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 2.0.0-1
e803d4
- Update to latest release
e803d4
e803d4
* Sun Feb 12 2017 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 1.5.5-1
e803d4
- Update to latest release
e803d4
- Add -devel and -unit-test-devel subpackages
e803d4
- Add post/preun scriptlets for global enablement
e803d4
e803d4
* Sun May 15 2016 Igor Gnatenko <i.gnatenko.brain@gmail.com> - 1.2.0-1
e803d4
- Initial package