hugo/hugo.spec

325 lines
12 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.
%bcond_without 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
2019-10-18 23:47:02 +00:00
Version: 0.58.3
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
2019-10-18 23:47:02 +00:00
Release: 1%{?dist}
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}
2019-10-18 23:47:02 +00:00
# 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
2019-03-01 23:59:48 +00:00
# Fix build against golang-github-kyokomi-emoji 2.1
Patch0002: 0001-Fix-tests-against-latest-emoji-package.patch
2019-10-18 23:47:02 +00:00
# Fix build against golang-github-tdewolff-minify 2.5.2
Patch0003: https://github.com/gohugoio/hugo/pull/6403.patch
# Fix test susceptible to inconsistent directory order.
Patch0004: https://github.com/gohugoio/hugo/pull/6385.patch
# Fix image tests on other arches.
Patch0005: https://github.com/gohugoio/hugo/pull/6396.patch
2017-09-15 19:35:04 +00:00
2019-08-01 04:43:13 +00:00
BuildRequires: golang(github.com/alecthomas/chroma)
BuildRequires: golang(github.com/alecthomas/chroma/formatters)
BuildRequires: golang(github.com/alecthomas/chroma/formatters/html)
BuildRequires: golang(github.com/alecthomas/chroma/lexers)
BuildRequires: golang(github.com/alecthomas/chroma/styles)
2019-10-18 23:47:02 +00:00
BuildRequires: golang(github.com/armon/go-radix)
BuildRequires: golang(github.com/aws/aws-sdk-go/aws)
BuildRequires: golang(github.com/aws/aws-sdk-go/aws/session)
BuildRequires: golang(github.com/aws/aws-sdk-go/service/cloudfront)
2019-08-01 04:43:13 +00:00
BuildRequires: golang(github.com/bep/debounce)
BuildRequires: golang(github.com/bep/gitmap)
BuildRequires: golang(github.com/bep/go-tocss/scss)
2019-10-18 23:47:02 +00:00
BuildRequires: golang(github.com/bep/tmc)
2019-08-01 04:43:13 +00:00
BuildRequires: golang(github.com/BurntSushi/locker)
BuildRequires: golang(github.com/BurntSushi/toml)
2019-10-18 23:47:02 +00:00
BuildRequires: golang(github.com/disintegration/gift)
BuildRequires: golang(github.com/dustin/go-humanize)
2019-08-01 04:43:13 +00:00
BuildRequires: golang(github.com/eknkc/amber)
2019-10-18 23:47:02 +00:00
BuildRequires: golang(github.com/frankban/quicktest)
2019-08-01 04:43:13 +00:00
BuildRequires: golang(github.com/fsnotify/fsnotify)
BuildRequires: golang(github.com/gobwas/glob)
2019-10-18 23:47:02 +00:00
BuildRequires: golang(github.com/gobwas/glob/syntax)
BuildRequires: golang(github.com/google/go-cmp/cmp)
2019-08-01 04:43:13 +00:00
BuildRequires: golang(github.com/gorilla/websocket)
BuildRequires: golang(github.com/jdkato/prose/transform)
BuildRequires: golang(github.com/kyokomi/emoji)
BuildRequires: golang(github.com/markbates/inflect)
BuildRequires: golang(github.com/mattn/go-isatty)
BuildRequires: golang(github.com/miekg/mmark)
BuildRequires: golang(github.com/mitchellh/hashstructure)
BuildRequires: golang(github.com/mitchellh/mapstructure)
BuildRequires: golang(github.com/muesli/smartcrop)
BuildRequires: golang(github.com/nicksnyder/go-i18n/i18n/bundle)
BuildRequires: golang(github.com/nicksnyder/go-i18n/i18n/language)
BuildRequires: golang(github.com/nicksnyder/go-i18n/i18n/translation)
2019-10-18 23:47:02 +00:00
BuildRequires: golang(github.com/niklasfasching/go-org/org)
2019-08-01 04:43:13 +00:00
BuildRequires: golang(github.com/olekukonko/tablewriter)
BuildRequires: golang(github.com/pkg/errors)
BuildRequires: golang(github.com/PuerkitoBio/purell)
2019-10-18 23:47:02 +00:00
BuildRequires: golang(github.com/rogpeppe/go-internal/module)
2019-08-01 04:43:13 +00:00
BuildRequires: golang(gopkg.in/russross/blackfriday.v1)
2019-10-18 23:47:02 +00:00
BuildRequires: golang(github.com/rwcarlsen/goexif/exif)
BuildRequires: golang(github.com/rwcarlsen/goexif/tiff)
2019-08-01 04:43:13 +00:00
BuildRequires: golang(github.com/spf13/afero)
BuildRequires: golang(github.com/spf13/cast)
BuildRequires: golang(github.com/spf13/cobra)
BuildRequires: golang(github.com/spf13/cobra/doc)
BuildRequires: golang(github.com/spf13/fsync)
BuildRequires: golang(github.com/spf13/jwalterweatherman)
BuildRequires: golang(github.com/spf13/pflag)
BuildRequires: golang(github.com/spf13/viper)
BuildRequires: (golang(github.com/tdewolff/minify) >= 2 with golang(github.com/tdewolff/minify) < 3)
BuildRequires: (golang(github.com/tdewolff/minify/css) >= 2 with golang(github.com/tdewolff/minify/css) < 3)
BuildRequires: (golang(github.com/tdewolff/minify/html) >= 2 with golang(github.com/tdewolff/minify/html) < 3)
BuildRequires: (golang(github.com/tdewolff/minify/js) >= 2 with golang(github.com/tdewolff/minify/js) < 3)
BuildRequires: (golang(github.com/tdewolff/minify/json) >= 2 with golang(github.com/tdewolff/minify/json) < 3)
BuildRequires: (golang(github.com/tdewolff/minify/svg) >= 2 with golang(github.com/tdewolff/minify/svg) < 3)
BuildRequires: (golang(github.com/tdewolff/minify/xml) >= 2 with golang(github.com/tdewolff/minify/xml) < 3)
BuildRequires: golang(github.com/yosssi/ace)
2019-10-18 23:47:02 +00:00
BuildRequires: golang(gocloud.dev/blob)
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)
2019-08-01 04:43:13 +00:00
BuildRequires: golang(golang.org/x/text/runes)
BuildRequires: golang(golang.org/x/text/transform)
BuildRequires: golang(golang.org/x/text/unicode/norm)
BuildRequires: golang(gopkg.in/yaml.v2)
%if %{with check}
# Tests
BuildRequires: golang(github.com/fortytw2/leaktest)
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)
2019-08-01 04:43:13 +00:00
BuildRequires: golang(github.com/sanity-io/litter)
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
2019-08-01 04:43:13 +00:00
%patch0002 -p1
2019-10-18 23:47:02 +00:00
%patch0003 -p1
%patch0004 -p1
%patch0005 -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
2019-08-01 04:43:13 +00:00
%gobuild -o %{gobuilddir}/bin/hugo %{goipath}
%{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
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