hugo/hugo.spec

254 lines
9.3 KiB
RPMSpec
Raw Normal View History

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-03-04 23:07:52 +00:00
Version: 0.54.0
2019-02-26 09:33:20 +00:00
%gometa
2017-09-15 19:35:04 +00:00
Name: hugo
2019-03-04 23:07:52 +00:00
Release: 1%{?dist}
2017-09-15 19:35:04 +00:00
Summary: A Fast and Flexible Static Site Generator built with love in GoLang
License: ASL 2.0 and MIT
2019-02-26 09:33:20 +00:00
URL: %{gourl}
Source0: %{gosource}
2019-03-04 23:07:52 +00:00
# Fix build with golang-github-bep-debounce 1.2.0
Patch0001: https://github.com/gohugoio/hugo/pull/5670.patch
2019-03-01 23:59:48 +00:00
%if %{?fedora} > 29
# Fix build against golang-github-kyokomi-emoji 2.1
Patch0002: 0001-Fix-tests-against-latest-emoji-package.patch
%endif
2019-03-04 23:07:52 +00:00
# Adjust test for Go 1.12
Patch0003: b4148cd1d9ea889b81070d3e84a37bd5d23e5746.patch
2017-09-15 19:35:04 +00:00
%description
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.
2019-02-26 09:33:20 +00:00
%package -n %{goname}-devel
2017-09-15 19:35:04 +00:00
Summary: %{summary}
BuildArch: noarch
2019-03-04 23:07:52 +00:00
BuildRequires: golang(github.com/BurntSushi/locker)
2017-09-15 19:35:04 +00:00
BuildRequires: golang(github.com/BurntSushi/toml)
BuildRequires: golang(github.com/PuerkitoBio/purell)
2017-10-17 13:30:59 +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-03-04 23:07:52 +00:00
BuildRequires: golang(github.com/bep/debounce)
2017-09-15 19:35:04 +00:00
BuildRequires: golang(github.com/bep/gitmap)
2019-03-04 23:07:52 +00:00
BuildRequires: golang(github.com/bep/go-tocss/scss)
BuildRequires: golang(github.com/bep/go-tocss/scss/libsass)
BuildRequires: golang(github.com/bep/go-tocss/tocss)
2017-09-15 19:35:04 +00:00
BuildRequires: golang(github.com/chaseadamsio/goorgeous)
2019-02-26 09:33:20 +00:00
BuildRequires: golang(github.com/disintegration/imaging)
2017-09-15 19:35:04 +00:00
BuildRequires: golang(github.com/eknkc/amber)
BuildRequires: golang(github.com/fsnotify/fsnotify)
2019-02-26 09:33:20 +00:00
BuildRequires: golang(github.com/gobwas/glob)
2017-09-15 19:35:04 +00:00
BuildRequires: golang(github.com/gorilla/websocket)
BuildRequires: golang(github.com/hashicorp/go-immutable-radix)
BuildRequires: golang(github.com/jdkato/prose/transform)
BuildRequires: golang(github.com/kyokomi/emoji)
2019-02-26 09:33:20 +00:00
BuildRequires: golang(github.com/markbates/inflect)
2019-03-04 23:07:52 +00:00
BuildRequires: golang(github.com/mattn/go-isatty)
2017-09-15 19:35:04 +00:00
BuildRequires: golang(github.com/miekg/mmark)
2019-03-04 23:07:52 +00:00
BuildRequires: golang(github.com/mitchellh/hashstructure)
2017-09-15 19:35:04 +00:00
BuildRequires: golang(github.com/mitchellh/mapstructure)
2019-02-26 09:33:20 +00:00
BuildRequires: golang(github.com/muesli/smartcrop)
2017-09-15 19:35:04 +00:00
BuildRequires: golang(github.com/nicksnyder/go-i18n/i18n/bundle)
2017-11-20 23:53:55 +00:00
BuildRequires: golang(github.com/nicksnyder/go-i18n/i18n/language)
2019-02-26 09:33:20 +00:00
BuildRequires: golang(github.com/olekukonko/tablewriter)
2019-03-04 23:07:52 +00:00
BuildRequires: golang(github.com/pkg/errors)
2019-02-28 07:12:05 +00:00
BuildRequires: golang(gopkg.in/russross/blackfriday.v1)
2017-09-15 19:35:04 +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/nitro)
BuildRequires: golang(github.com/spf13/pflag)
BuildRequires: golang(github.com/spf13/viper)
2019-03-04 23:30:17 +00:00
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)
2017-09-15 19:35:04 +00:00
BuildRequires: golang(github.com/yosssi/ace)
BuildRequires: golang(golang.org/x/image/webp)
2018-02-17 01:27:46 +00:00
BuildRequires: golang(golang.org/x/sync/errgroup)
2019-02-26 09:33:20 +00:00
BuildRequires: golang(golang.org/x/text/transform)
BuildRequires: golang(golang.org/x/text/unicode/norm)
BuildRequires: golang(gopkg.in/yaml.v2)
2017-09-15 19:35:04 +00:00
2019-02-26 09:33:20 +00:00
# These are used during tests
2019-03-04 23:07:52 +00:00
BuildRequires: golang(github.com/alecthomas/assert)
2017-09-15 19:35:04 +00:00
BuildRequires: golang(github.com/fortytw2/leaktest)
2019-02-28 07:12:57 +00:00
BuildRequires: golang(github.com/sanity-io/litter)
2017-09-15 19:35:04 +00:00
BuildRequires: golang(github.com/stretchr/testify/assert)
BuildRequires: golang(github.com/stretchr/testify/require)
2018-03-01 16:50:18 +00:00
BuildRequires: python3-docutils
2017-09-15 19:35:04 +00:00
BuildRequires: python3-pygments
BuildRequires: rubygem-asciidoctor
2019-02-26 09:33:20 +00:00
%description -n %{goname}-devel
2017-09-15 19:35:04 +00:00
%{summary}
2019-02-26 09:33:20 +00:00
This package contains library source intended for building other packages
which use import path with %{goipath} prefix.
2017-09-15 19:35:04 +00:00
%prep
2019-02-26 09:33:20 +00:00
%forgeautosetup -p1
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
2017-09-15 19:35:04 +00:00
%build
2019-02-26 09:33:20 +00:00
%gobuildroot
2017-09-15 19:35:04 +00:00
2019-02-26 09:33:20 +00:00
%gobuild -o _bin/hugo %{goipath}
2017-09-15 19:35:04 +00:00
%install
2019-02-26 09:33:20 +00:00
%goinstall
2017-09-15 19:35:04 +00:00
install -d -p %{buildroot}%{_bindir}
2019-02-26 09:33:20 +00:00
install -p -m 0755 _bin/hugo %{buildroot}%{_bindir}
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-02-26 09:33:20 +00:00
%gochecks -d releaser -d tpl/time
2017-09-15 19:35:04 +00:00
%files
%doc CONTRIBUTING.md README.md
2019-03-04 23:07:52 +00:00
%license LICENSE
2017-09-15 19:35:04 +00:00
%{_bindir}/hugo
2019-02-26 09:33:20 +00:00
%files -n %{goname}-devel -f devel.file-list
2017-09-15 19:35:04 +00:00
%doc CONTRIBUTING.md README.md
2019-03-04 23:07:52 +00:00
%license LICENSE
2017-09-15 19:35:04 +00:00
%changelog
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