hugo/hugo.spec

313 lines
10 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.80.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: 4%{?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.
# https://sources.debian.org/data/main/h/hugo/0.58.3-1/debian/patches/0005-skip-modules-TestClient.patch
Patch0001: 0005-skip-modules-TestClient.patch
# https://sources.debian.org/data/main/h/hugo/0.69.0-1/debian/patches/0006-skip-TestHugoModulesTargetInSubFolder.patch
Patch0002: 0006-skip-TestHugoModulesTargetInSubFolder.patch
# Minify 2.9.3 removed Decimals in favor of Precision
Patch0004: 0001-Update-to-minify-2.9.4.patch
# Fix for TestResourceChains/minify failure
Patch0005: 0001-Remove-trailing-semicolon.patch
# Bump afero to 1.5.1
Patch0006: 0001-Bump-afero-to-1.5.1.patch
# Modify to use golang-github-getkin-kin-openapi-devel >= 0.61.0
Patch0007: 0007-rename-openapi3-Swagger.patch
2017-09-15 19:35:04 +00:00
BuildRequires: golang(github.com/bep/golibsass/libsass) >= 0.7.0
2019-08-01 04:43:13 +00:00
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
%patch0004 -p1
%patch0005 -p1
%patch0006 -p1
%patch0007 -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
sed -i \
-e 's|"github.com/russross/blackfriday|"gopkg.in/russross/blackfriday.v1|' \
$(find . -name '*.go')
2019-02-28 07:12:05 +00:00
# Pin github.com/evanw/esbuild to v0.8.20
# See https://github.com/gohugoio/hugo/issues/8141
sed -i \
-e 's|"github.com/evanw/esbuild|"github.com/evanw/esbuild-0.8.20|' \
$(find . -name '*.go')
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
%generate_buildrequires
%go_generate_buildrequires
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
* Wed Sep 29 2021 W. Michael Petullo <mike@flyn.org> - 0.80.0-4
- Patch to work with current golang-github-getkin-kin-openapi-devel package
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.80.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.80.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Sun Jan 17 22:04:05 CET 2021 Robert-André Mauchin <zebob.m@gmail.com> - 0.80.0-1
- Update to 0.80.0
- Close: rhbz#1856494
* Fri Sep 18 04:37:22 CEST 2020 Robert-André Mauchin <zebob.m@gmail.com> - 0.75.1-1
- Update to 0.75.1
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.73.0-3
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.73.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Jun 23 2020 Athos Ribeiro <athoscr@fedoraproject.org> - 0.73.0-1
- Update to latest version
* Sun Jun 07 2020 Athos Ribeiro <athoscr@fedoraproject.org> - 0.72.0-1
- Update to latest version
* Thu May 07 2020 Athos Ribeiro <athoscr@fedoraproject.org> - 0.70.0-2
- Use generated dynamic buildrequires
* 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