hugo/hugo.spec

357 lines
14 KiB
RPMSpec
Raw Normal View History

2019-08-01 04:43:13 +00:00
%bcond_without check
2019-10-18 23:47:02 +00:00
# Some tests use a package that uses this.
2020-04-19 04:32:20 +00:00
%bcond_with bootstrap
2019-08-01 04:43:13 +00:00
2017-09-15 19:35:04 +00:00
# https://github.com/gohugoio/hugo
2019-02-26 09:33:20 +00:00
%global goipath github.com/gohugoio/hugo
Version: 0.70.0
2019-02-26 09:33:20 +00:00
%gometa
2017-09-15 19:35:04 +00:00
2019-08-01 04:43:13 +00:00
%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
2017-09-15 19:35:04 +00:00
Name: hugo
Release: 1%{?dist}
2019-10-18 23:47:02 +00:00
Summary: The worlds fastest framework for building websites
2019-08-01 04:43:13 +00:00
# Upstream license specification: Apache-2.0 and MIT
2017-09-15 19:35:04 +00:00
License: ASL 2.0 and MIT
2019-02-26 09:33:20 +00:00
URL: %{gourl}
Source0: %{gosource}
2020-04-19 04:32:20 +00:00
# Skip tests that uses the network.
2019-10-18 23:47:02 +00:00
Patch0001: https://sources.debian.org/data/main/h/hugo/0.58.3-1/debian/patches/0005-skip-modules-TestClient.patch
2020-04-19 04:32:20 +00:00
Patch0002: https://sources.debian.org/data/main/h/hugo/0.69.0-1/debian/patches/0006-skip-TestHugoModulesTargetInSubFolder.patch
2020-02-23 03:10:45 +00:00
# Fix error message that changed in gocloud.
2020-04-19 04:32:20 +00:00
Patch0003: 0001-Update-error-message.patch
2017-09-15 19:35:04 +00:00
2020-02-23 03:10:45 +00:00
BuildRequires: golang(github.com/alecthomas/chroma) >= 0.7.1
2019-08-01 04:43:13 +00:00
BuildRequires: golang(github.com/alecthomas/chroma/formatters/html)
BuildRequires: golang(github.com/alecthomas/chroma/lexers)
BuildRequires: golang(github.com/alecthomas/chroma/styles)
2020-02-23 03:10:45 +00:00
BuildRequires: golang(github.com/armon/go-radix) >= 1.0.0
BuildRequires: golang(github.com/aws/aws-sdk-go/aws) >= 1.27.1
2019-10-18 23:47:02 +00:00
BuildRequires: golang(github.com/aws/aws-sdk-go/aws/session)
BuildRequires: golang(github.com/aws/aws-sdk-go/service/cloudfront)
2020-02-23 03:10:45 +00:00
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
2019-08-01 04:43:13 +00:00
BuildRequires: golang(github.com/BurntSushi/locker)
2020-02-23 03:10:45 +00:00
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
2019-10-18 23:47:02 +00:00
BuildRequires: golang(github.com/gobwas/glob/syntax)
BuildRequires: golang(github.com/google/go-cmp/cmp)
2020-02-23 03:10:45 +00:00
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
2020-02-23 03:10:45 +00:00
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
2019-08-01 04:43:13 +00:00
BuildRequires: golang(github.com/nicksnyder/go-i18n/i18n/language)
BuildRequires: golang(github.com/nicksnyder/go-i18n/i18n/translation)
2020-02-23 03:10:45 +00:00
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
2019-10-18 23:47:02 +00:00
BuildRequires: golang(github.com/rwcarlsen/goexif/exif)
BuildRequires: golang(github.com/rwcarlsen/goexif/tiff)
2020-02-23 03:10:45 +00:00
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
2019-08-01 04:43:13 +00:00
BuildRequires: golang(github.com/spf13/cobra/doc)
2020-02-23 03:10:45 +00:00
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
2019-10-18 23:47:02 +00:00
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)
2019-08-01 04:43:13 +00:00
BuildRequires: golang(golang.org/x/image/webp)
BuildRequires: golang(golang.org/x/sync/errgroup)
2019-10-18 23:47:02 +00:00
BuildRequires: golang(golang.org/x/sync/semaphore)
2020-02-23 03:10:45 +00:00
BuildRequires: golang(golang.org/x/text/runes) >= 0.3.2
2019-08-01 04:43:13 +00:00
BuildRequires: golang(golang.org/x/text/transform)
BuildRequires: golang(golang.org/x/text/unicode/norm)
2020-02-23 03:10:45 +00:00
BuildRequires: golang(google.golang.org/api/compute/v1) >= 0.5.0
BuildRequires: golang(gopkg.in/yaml.v2) >= 2.2.7
2019-08-01 04:43:13 +00:00
%if %{with check}
# Tests
2020-02-23 03:10:45 +00:00
BuildRequires: golang(github.com/fortytw2/leaktest) >= 1.3.0
2019-10-18 23:47:02 +00:00
%if %{without bootstrap}
BuildRequires: golang(github.com/gohugoio/testmodBuilder/mods)
%endif
BuildRequires: golang(github.com/google/go-cmp/cmp/cmpopts)
2020-02-23 03:10:45 +00:00
BuildRequires: golang(github.com/sanity-io/litter) >= 1.2.0
2019-10-18 23:47:02 +00:00
BuildRequires: golang(gocloud.dev/blob/memblob)
2019-08-01 04:43:13 +00:00
BuildRequires: python3-docutils
BuildRequires: python3-pygments
BuildRequires: rubygem-asciidoctor
%endif
2017-09-15 19:35:04 +00:00
%description
2019-08-01 04:43:13 +00:00
%{common_description}
%gopkg
2019-02-26 09:33:20 +00:00
2017-09-15 19:35:04 +00:00
%prep
2019-08-01 04:43:13 +00:00
%goprep
2019-10-18 23:47:02 +00:00
%patch0001 -p1
2020-02-23 03:10:45 +00:00
%patch0002 -p1
2020-04-19 04:32:20 +00:00
%patch0003 -p1
2019-02-26 09:33:20 +00:00
2019-02-28 07:12:05 +00:00
# Replace blackfriday import path to avoid conflict with v2
2019-03-04 23:07:52 +00:00
# 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')
2019-02-28 07:12:05 +00:00
2019-02-28 07:13:39 +00:00
# Skip test that assumes directory is in a git repository
sed -i '/TestPageWithLastmodFromGitInfo/a t.Skip()' hugolib/page_test.go
2019-10-18 23:47:02 +00:00
%if %{with bootstrap}
# Delete test using github.com/gohugoio/testmodBuilder/mods which has a
# dependency loop.
rm hugolib/hugo_modules_test.go
%endif
2017-09-15 19:35:04 +00:00
%build
BUILDTAGS=extended %gobuild -o %{gobuilddir}/bin/hugo %{goipath}
2019-08-01 04:43:13 +00:00
%{gobuilddir}/bin/hugo gen autocomplete --completionfile hugo-completion
%{gobuilddir}/bin/hugo gen man
2017-09-15 19:35:04 +00:00
%install
2019-08-01 04:43:13 +00:00
%gopkginstall
2019-02-26 09:33:20 +00:00
2017-09-15 19:35:04 +00:00
install -d -p %{buildroot}%{_bindir}
2019-08-01 04:43:13 +00:00
install -Dp -m 0755 %{gobuilddir}/bin/hugo %{buildroot}%{_bindir}
2019-03-22 07:43:22 +00:00
install -Dp hugo-completion %{buildroot}%{_datadir}/bash-completion/completions/hugo
install -Dp man/* -t %{buildroot}%{_mandir}/man1
2019-02-26 09:33:20 +00:00
2017-09-15 19:35:04 +00:00
2019-08-01 04:43:13 +00:00
%if %{with check}
2017-09-15 19:35:04 +00:00
%check
2019-02-26 09:33:20 +00:00
# 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.
2017-09-15 19:35:04 +00:00
# time_test.go:49: [3] DateFormat failed: Unable to Cast 1421733600 to Time # line 35 returns different results
2019-08-01 04:43:13 +00:00
%gocheck -d releaser -d tpl/time
%endif
2017-09-15 19:35:04 +00:00
%files
2019-08-01 04:43:13 +00:00
%doc CONTRIBUTING.md README.md docs examples
2019-03-04 23:07:52 +00:00
%license LICENSE
2017-09-15 19:35:04 +00:00
%{_bindir}/hugo
2019-03-22 07:43:22 +00:00
%{_datadir}/bash-completion/completions/hugo
%{_mandir}/man1/*.1*
2017-09-15 19:35:04 +00:00
2019-08-01 04:43:13 +00:00
%gopkgfiles
2017-09-15 19:35:04 +00:00
%changelog
* Thu May 07 2020 Athos Ribeiro <athoscr@fedoraproject.org> - 0.70.0-1
- Update to latest version
* Sat May 02 2020 Athos Ribeiro <athoscr@fedoraproject.org> - 0.69.2-1
- Update to latest version
2020-04-19 04:53:11 +00:00
* Sun Apr 19 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.69.0-3
- Add patch for latest go-org
* 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
2020-04-08 20:16:55 +00:00
* Wed Apr 08 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.68.3-1
- Update to latest version
2020-02-24 07:16:35 +00:00
* Mon Feb 24 2020 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.65.3-1
- Update to latest version
2020-02-23 03:10:45 +00:00
* 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
2019-11-01 05:11:00 +00:00
* Fri Nov 01 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.59.1-1
- Update to latest version
2019-10-18 23:47:02 +00:00
* Wed Oct 16 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.58.3-1
- Update to latest version
2019-08-01 04:43:13 +00:00
* 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
2019-05-18 22:31:18 +00:00
* Sat May 18 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.55.6-1
- Update to latest version
2019-05-11 06:44:25 +00:00
* Sat May 11 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.55.5-1
- Update to latest version
2019-04-24 23:31:28 +00:00
* Wed Apr 24 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.55.3-1
- Update to latest version
2019-04-13 05:38:29 +00:00
* Sat Apr 13 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.55.1-1
- Update to latest version
2019-04-10 08:28:06 +00:00
* Wed Apr 10 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.55.0-1
- Update to latest version
2019-03-22 07:43:22 +00:00
* Fri Mar 22 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.54.0-2
- Add bash-completion
- Add man pages
2019-03-04 23:07:52 +00:00
* Mon Mar 04 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.54.0-1
- Update to latest version
2019-02-28 07:14:20 +00:00
* Thu Feb 28 2019 Elliott Sales de Andrade <quantum.analyst@gmail.com> - 0.38-4
2019-03-02 03:37:02 +00:00
- Fix FTBFS (#1675118)
2019-02-28 07:14:20 +00:00
2019-02-26 09:33:20 +00:00
* 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
2018-03-08 11:24:14 +00:00
* Thu Mar 08 2018 Athos Ribeiro <athoscr@fedoraproject.org> - 0.37.1-1
- Update version
2018-03-01 16:50:18 +00:00
* 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
2018-02-17 01:27:46 +00:00
* 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
2017-11-20 23:53:55 +00:00
* Mon Nov 20 2017 Athos Ribeiro <athoscr@fedoraproject.org> - 0.31-1
- Update Version
2017-10-22 00:33:47 +00:00
* Sat Oct 21 2017 Athos Ribeiro <athoscr@fedoraproject.org> - 0.30.2-1
- Update Version
2017-10-17 15:43:11 +00:00
* Tue Oct 17 2017 Athos Ribeiro <athoscr@fedoraproject.org> - 0.30-1
- Update Version
2017-10-17 13:30:59 +00:00
* Wed Oct 11 2017 Athos Ribeiro <athoscr@fedoraproject.org> - 0.29-1
- Update Version
2017-09-15 19:35:04 +00:00
* 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