f29b07c974
Signed-off-by: Athos Ribeiro <athoscr@fedoraproject.org>
346 lines
14 KiB
RPMSpec
346 lines
14 KiB
RPMSpec
%bcond_without check
|
||
# Some tests use a package that uses this.
|
||
%bcond_without bootstrap
|
||
|
||
# https://github.com/gohugoio/hugo
|
||
%global goipath github.com/gohugoio/hugo
|
||
Version: 0.69.0
|
||
|
||
%gometa
|
||
|
||
%global common_description %{expand:
|
||
Hugo is a static HTML and CSS website generator written in Go. It is optimized
|
||
for speed, easy use and configurability. Hugo takes a directory with content
|
||
and templates and renders them into a full HTML website.}
|
||
|
||
%global golicenses LICENSE docs/LICENSE.md docs/themes/gohugoioTheme/license.md
|
||
%global godocs docs examples README.md CONTRIBUTING.md
|
||
|
||
Name: hugo
|
||
Release: 2%{?dist}
|
||
Summary: The world’s fastest framework for building websites
|
||
|
||
# Upstream license specification: Apache-2.0 and MIT
|
||
License: ASL 2.0 and MIT
|
||
URL: %{gourl}
|
||
Source0: %{gosource}
|
||
# Skip test that uses the network.
|
||
Patch0001: https://sources.debian.org/data/main/h/hugo/0.58.3-1/debian/patches/0005-skip-modules-TestClient.patch
|
||
# Fix error message that changed in gocloud.
|
||
Patch0002: 0001-Update-error-message.patch
|
||
|
||
BuildRequires: golang(github.com/alecthomas/chroma) >= 0.7.1
|
||
BuildRequires: golang(github.com/alecthomas/chroma/formatters/html)
|
||
BuildRequires: golang(github.com/alecthomas/chroma/lexers)
|
||
BuildRequires: golang(github.com/alecthomas/chroma/styles)
|
||
BuildRequires: golang(github.com/armon/go-radix) >= 1.0.0
|
||
BuildRequires: golang(github.com/aws/aws-sdk-go/aws) >= 1.27.1
|
||
BuildRequires: golang(github.com/aws/aws-sdk-go/aws/session)
|
||
BuildRequires: golang(github.com/aws/aws-sdk-go/service/cloudfront)
|
||
BuildRequires: golang(github.com/bep/debounce) >= 1.2.0
|
||
BuildRequires: golang(github.com/bep/gitmap) >= 1.1.1
|
||
BuildRequires: golang(github.com/bep/golibsass/libsass) >= 0.5.0
|
||
BuildRequires: golang(github.com/bep/tmc) >= 0.5.1
|
||
BuildRequires: golang(github.com/BurntSushi/locker)
|
||
BuildRequires: golang(github.com/BurntSushi/toml) >= 0.3.1
|
||
BuildRequires: golang(github.com/disintegration/gift) >= 1.2.1
|
||
BuildRequires: golang(github.com/dustin/go-humanize) >= 1.0.0
|
||
BuildRequires: golang(github.com/frankban/quicktest) >= 1.7.2
|
||
BuildRequires: golang(github.com/fsnotify/fsnotify) >= 1.4.7
|
||
BuildRequires: golang(github.com/gobwas/glob) >= 0.2.3
|
||
BuildRequires: golang(github.com/gobwas/glob/syntax)
|
||
BuildRequires: golang(github.com/google/go-cmp/cmp)
|
||
BuildRequires: golang(github.com/gorilla/websocket) >= 1.4.1
|
||
BuildRequires: golang(github.com/jdkato/prose/transform) >= 1.1.1
|
||
BuildRequires: golang(github.com/kyokomi/emoji) >= 2.1.1
|
||
BuildRequires: golang(github.com/markbates/inflect) >= 1.0.0
|
||
BuildRequires: golang(github.com/mattn/go-isatty) >= 0.0.11
|
||
BuildRequires: golang(github.com/miekg/mmark) >= 1.3.6
|
||
BuildRequires: golang(github.com/mitchellh/hashstructure) >= 1.0.0
|
||
BuildRequires: golang(github.com/mitchellh/mapstructure) >= 1.1.2
|
||
BuildRequires: golang(github.com/muesli/smartcrop) >= 0.3.0
|
||
BuildRequires: golang(github.com/nicksnyder/go-i18n/i18n/bundle) >= 1.10.0
|
||
BuildRequires: golang(github.com/nicksnyder/go-i18n/i18n/language)
|
||
BuildRequires: golang(github.com/nicksnyder/go-i18n/i18n/translation)
|
||
BuildRequires: golang(github.com/niklasfasching/go-org/org) >= 1.0.0
|
||
BuildRequires: golang(github.com/olekukonko/tablewriter) >= 0.0.4
|
||
BuildRequires: golang(github.com/pkg/errors) >= 0.8.1
|
||
BuildRequires: golang(github.com/PuerkitoBio/purell) >= 1.1.1
|
||
BuildRequires: golang(github.com/rogpeppe/go-internal/module) >= 1.5.1
|
||
BuildRequires: golang(gopkg.in/russross/blackfriday.v1) >= 1.5.2
|
||
BuildRequires: golang(github.com/rwcarlsen/goexif/exif)
|
||
BuildRequires: golang(github.com/rwcarlsen/goexif/tiff)
|
||
BuildRequires: golang(github.com/spf13/afero) >= 1.2.2
|
||
BuildRequires: golang(github.com/spf13/cast) >= 1.3.1
|
||
BuildRequires: golang(github.com/spf13/cobra) >= 0.0.5
|
||
BuildRequires: golang(github.com/spf13/cobra/doc)
|
||
BuildRequires: golang(github.com/spf13/fsync) >= 0.9.0
|
||
BuildRequires: golang(github.com/spf13/jwalterweatherman) >= 1.1.0
|
||
BuildRequires: golang(github.com/spf13/pflag) >= 1.0.5
|
||
BuildRequires: golang(github.com/spf13/viper) >= 1.6.1
|
||
BuildRequires: (golang(github.com/tdewolff/minify) >= 2.6.1 with golang(github.com/tdewolff/minify) < 3)
|
||
BuildRequires: (golang(github.com/tdewolff/minify/css) >= 2.6.1 with golang(github.com/tdewolff/minify/css) < 3)
|
||
BuildRequires: (golang(github.com/tdewolff/minify/html) >= 2.6.1 with golang(github.com/tdewolff/minify/html) < 3)
|
||
BuildRequires: (golang(github.com/tdewolff/minify/js) >= 2.6.1 with golang(github.com/tdewolff/minify/js) < 3)
|
||
BuildRequires: (golang(github.com/tdewolff/minify/json) >= 2.6.1 with golang(github.com/tdewolff/minify/json) < 3)
|
||
BuildRequires: (golang(github.com/tdewolff/minify/svg) >= 2.6.1 with golang(github.com/tdewolff/minify/svg) < 3)
|
||
BuildRequires: (golang(github.com/tdewolff/minify/xml) >= 2.6.1 with golang(github.com/tdewolff/minify/xml) < 3)
|
||
BuildRequires: golang(github.com/yuin/goldmark) >= 1.1.22
|
||
BuildRequires: golang(github.com/yuin/goldmark-highlighting)
|
||
BuildRequires: golang(github.com/yuin/goldmark/ast)
|
||
BuildRequires: golang(github.com/yuin/goldmark/extension)
|
||
BuildRequires: golang(github.com/yuin/goldmark/parser)
|
||
BuildRequires: golang(github.com/yuin/goldmark/renderer)
|
||
BuildRequires: golang(github.com/yuin/goldmark/renderer/html)
|
||
BuildRequires: golang(github.com/yuin/goldmark/text)
|
||
BuildRequires: golang(github.com/yuin/goldmark/util)
|
||
BuildRequires: golang(gocloud.dev/blob) >= 0.15.0
|
||
BuildRequires: golang(gocloud.dev/blob/azureblob)
|
||
BuildRequires: golang(gocloud.dev/blob/fileblob)
|
||
BuildRequires: golang(gocloud.dev/blob/gcsblob)
|
||
BuildRequires: golang(gocloud.dev/blob/s3blob)
|
||
BuildRequires: golang(golang.org/x/image/bmp)
|
||
BuildRequires: golang(golang.org/x/image/tiff)
|
||
BuildRequires: golang(golang.org/x/image/webp)
|
||
BuildRequires: golang(golang.org/x/sync/errgroup)
|
||
BuildRequires: golang(golang.org/x/sync/semaphore)
|
||
BuildRequires: golang(golang.org/x/text/runes) >= 0.3.2
|
||
BuildRequires: golang(golang.org/x/text/transform)
|
||
BuildRequires: golang(golang.org/x/text/unicode/norm)
|
||
BuildRequires: golang(google.golang.org/api/compute/v1) >= 0.5.0
|
||
BuildRequires: golang(gopkg.in/yaml.v2) >= 2.2.7
|
||
|
||
%if %{with check}
|
||
# Tests
|
||
BuildRequires: golang(github.com/fortytw2/leaktest) >= 1.3.0
|
||
%if %{without bootstrap}
|
||
BuildRequires: golang(github.com/gohugoio/testmodBuilder/mods)
|
||
%endif
|
||
BuildRequires: golang(github.com/google/go-cmp/cmp/cmpopts)
|
||
BuildRequires: golang(github.com/sanity-io/litter) >= 1.2.0
|
||
BuildRequires: golang(gocloud.dev/blob/memblob)
|
||
BuildRequires: python3-docutils
|
||
BuildRequires: python3-pygments
|
||
BuildRequires: rubygem-asciidoctor
|
||
%endif
|
||
|
||
%description
|
||
%{common_description}
|
||
|
||
%gopkg
|
||
|
||
%prep
|
||
%goprep
|
||
|
||
%patch0001 -p1
|
||
%patch0002 -p1
|
||
|
||
# Replace blackfriday import path to avoid conflict with v2
|
||
# Depend on unversioned tdewolff/minify until Go modules are supported in Fedora
|
||
sed -i \
|
||
-e 's|"github.com/russross/blackfriday|"gopkg.in/russross/blackfriday.v1|' \
|
||
-e 's|"github.com/tdewolff/minify/v2|"github.com/tdewolff/minify|' \
|
||
$(find . -name '*.go')
|
||
|
||
# Skip test that assumes directory is in a git repository
|
||
sed -i '/TestPageWithLastmodFromGitInfo/a t.Skip()' hugolib/page_test.go
|
||
|
||
%if %{with bootstrap}
|
||
# Delete test using github.com/gohugoio/testmodBuilder/mods which has a
|
||
# dependency loop.
|
||
rm hugolib/hugo_modules_test.go
|
||
%endif
|
||
|
||
|
||
%build
|
||
BUILDTAGS=extended %gobuild -o %{gobuilddir}/bin/hugo %{goipath}
|
||
%{gobuilddir}/bin/hugo gen autocomplete --completionfile hugo-completion
|
||
%{gobuilddir}/bin/hugo gen man
|
||
|
||
|
||
%install
|
||
%gopkginstall
|
||
|
||
install -d -p %{buildroot}%{_bindir}
|
||
install -Dp -m 0755 %{gobuilddir}/bin/hugo %{buildroot}%{_bindir}
|
||
install -Dp hugo-completion %{buildroot}%{_datadir}/bash-completion/completions/hugo
|
||
install -Dp man/* -t %{buildroot}%{_mandir}/man1
|
||
|
||
|
||
%if %{with check}
|
||
%check
|
||
# releaser: We do not want to test upstream release process (needs git repo)
|
||
# tpl/time: A test depends on the host timezone, we do now want to test it.
|
||
# time_test.go:49: [3] DateFormat failed: Unable to Cast 1421733600 to Time # line 35 returns different results
|
||
%gocheck -d releaser -d tpl/time
|
||
%endif
|
||
|
||
|
||
%files
|
||
%doc CONTRIBUTING.md README.md docs examples
|
||
%license LICENSE
|
||
%{_bindir}/hugo
|
||
%{_datadir}/bash-completion/completions/hugo
|
||
%{_mandir}/man1/*.1*
|
||
|
||
%gopkgfiles
|
||
|
||
|
||
%changelog
|
||
* Sat Apr 18 2020 Athos Ribeiro <athoscr@fedoraproject.org> - 0.69.0-2
|
||
- Update golang-github-kyokomi-emoji required version
|
||
|
||
* Sat Apr 18 2020 Athos Ribeiro <athoscr@fedoraproject.org> - 0.69.0-1
|
||
- Update to latest version
|
||
|
||
* Mon Apr 13 2020 Athos Ribeiro <athoscr@fedoraproject.org> - 0.68.3-2
|
||
- Build hugo with extended features for SCSS support
|
||
|
||
* Wed Apr 08 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.68.3-1
|
||
- Update to latest version
|
||
|
||
* Mon Feb 24 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.65.3-1
|
||
- Update to latest version
|
||
|
||
* Sat Feb 22 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.65.2-1
|
||
- Update to latest version
|
||
|
||
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.59.1-2
|
||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||
|
||
* Fri Nov 01 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.59.1-1
|
||
- Update to latest version
|
||
|
||
* Wed Oct 16 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.58.3-1
|
||
- Update to latest version
|
||
|
||
* Thu Aug 01 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.55.6-3
|
||
- Update to latest Go macros
|
||
|
||
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.55.6-2
|
||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||
|
||
* Sat May 18 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.55.6-1
|
||
- Update to latest version
|
||
|
||
* Sat May 11 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.55.5-1
|
||
- Update to latest version
|
||
|
||
* Wed Apr 24 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.55.3-1
|
||
- Update to latest version
|
||
|
||
* Sat Apr 13 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.55.1-1
|
||
- Update to latest version
|
||
|
||
* Wed Apr 10 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.55.0-1
|
||
- Update to latest version
|
||
|
||
* Fri Mar 22 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.54.0-2
|
||
- Add bash-completion
|
||
- Add man pages
|
||
|
||
* Mon Mar 04 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.54.0-1
|
||
- Update to latest version
|
||
|
||
* Thu Feb 28 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.38-4
|
||
- Fix FTBFS (#1675118)
|
||
|
||
* Tue Feb 26 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.38-4
|
||
- Rewrite spec using latest template
|
||
|
||
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.38-3
|
||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||
|
||
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.38-2
|
||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
||
|
||
* Wed Apr 04 2018 Pierre-Alain TORET <pierre-alain.toret@protonmail.com> - 0.38-1
|
||
- Update version
|
||
|
||
* Thu Mar 08 2018 Athos Ribeiro <athoscr@fedoraproject.org> - 0.37.1-1
|
||
- Update version
|
||
|
||
* Thu Mar 01 2018 Athos Ribeiro <athoscr@fedoraproject.org> - 0.37-1
|
||
- Update version
|
||
|
||
* Wed Feb 21 2018 Athos Ribeiro <athoscr@fedoraproject.org> - 0.36.1-2
|
||
- Include resource/testdata in unit tests package
|
||
|
||
* Fri Feb 16 2018 Athos Ribeiro <athoscr@fedoraproject.org> - 0.36.1-1
|
||
- Update version
|
||
|
||
* Tue Feb 13 2018 Athos Ribeiro <athoscr@fedoraproject.org> - 0.36-1
|
||
- Update version
|
||
|
||
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.31.1-2
|
||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
||
|
||
* Mon Dec 11 2017 Pierre-Alain TORET <pierre-alain.toret@protonmail.com> - 0.31.1-1
|
||
- Update Version
|
||
|
||
* Mon Nov 20 2017 Athos Ribeiro <athoscr@fedoraproject.org> - 0.31-1
|
||
- Update Version
|
||
|
||
* Sat Oct 21 2017 Athos Ribeiro <athoscr@fedoraproject.org> - 0.30.2-1
|
||
- Update Version
|
||
|
||
* Tue Oct 17 2017 Athos Ribeiro <athoscr@fedoraproject.org> - 0.30-1
|
||
- Update Version
|
||
|
||
* Wed Oct 11 2017 Athos Ribeiro <athoscr@fedoraproject.org> - 0.29-1
|
||
- Update Version
|
||
|
||
* Fri Sep 15 2017 Athos Ribeiro <athoscr@fedoraproject.org> - 0.27.1-2
|
||
- Add MIT License
|
||
|
||
* Wed Sep 13 2017 Athos Ribeiro <athoscr@fedoraproject.org> - 0.27.1-1
|
||
- Update version
|
||
|
||
* Tue Sep 12 2017 Athos Ribeiro <athoscr@fedoraproject.org> - 0.27-1
|
||
- Update version
|
||
|
||
* Fri Aug 11 2017 Athos Ribeiro <athoscr@fedoraproject.org> - 0.26-2
|
||
- Substitute bep/inflect for markbates/inflect
|
||
|
||
* Fri Aug 11 2017 Athos Ribeiro <athoscr@fedoraproject.org> - 0.26-1
|
||
- Update version
|
||
|
||
* Mon Jul 31 2017 Athos Ribeiro <athoscr@fedoraproject.org> - 0.25.1-1
|
||
- Update version
|
||
- Fix unit-test subpackage requires to correct devel package
|
||
- Use global instead of define for gobuild
|
||
|
||
* Mon Jun 26 2017 Athos Ribeiro <athoscr@fedoraproject.org> - 0.24-2
|
||
- Add external test dependencies
|
||
|
||
* Fri Jun 23 2017 Athos Ribeiro <athoscr@fedoraproject.org> - 0.24-1
|
||
- New version
|
||
- Regenerate specfile with gofed
|
||
|
||
* Fri Mar 17 2017 Athos Ribeiro <athoscr@fedoraproject.org> - 0.19-4
|
||
- Remove empty conditionals
|
||
|
||
* Sun Mar 12 2017 Athos Ribeiro <athoscr@fedoraproject.org> - 0.19-3
|
||
- Use dist tag
|
||
|
||
* Fri Mar 03 2017 Athos Ribeiro <athoscr@fedoraproject.org> - 0.19-2
|
||
- Move test data to unit-test subpackage path
|
||
|
||
* Fri Mar 03 2017 Athos Ribeiro <athoscr@fedoraproject.org> - 0.19-1
|
||
- New version
|
||
|
||
* Fri Mar 03 2017 Athos Ribeiro <athoscr@fedoraproject.org> - 0.18.1-5
|
||
- Include testdata in unit-test-devel subpackage
|
||
|
||
* Wed Mar 01 2017 Athos Ribeiro <athoscr@fedoraproject.org> - 0.18.1-4
|
||
- Change binary name
|
||
|
||
* Wed Mar 01 2017 Athos Ribeiro <athoscr@fedoraproject.org> - 0.18.1-3
|
||
- Use lowercase for jww package
|
||
|
||
* Tue Feb 28 2017 Athos Ribeiro <athoscr@fedoraproject.org> - 0.18.1-2
|
||
- Use cammelcase for jww package
|
||
|
||
* Sun Feb 26 2017 Athos Ribeiro <athoscr@fedoraproject.org> - 0.18.1-1
|
||
- Initial package
|