Blame SPECS/git-lfs.spec

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