# Generated by go2rpm 1.16.0 %bcond check 1 %global debug_package %{nil} # To update: # 1. Update the version in this file. # 2. Retrieve new source archive: # spectool -g hugo.spec. # 3. Generate the vendor archive: # go_vendor_archive create --config go-vendor-tools.toml hugo.spec # https://github.com/gohugoio/hugo %global goipath github.com/gohugoio/hugo Version: 0.147.7 %gometa -L -f %global common_description %{expand: The world’s fastest framework for building websites.} Name: hugo Release: %autorelease Summary: The world’s fastest framework for building websites # Generated by go-vendor-tools License: Apache-2.0 AND BSD-2-Clause AND BSD-3-Clause AND MIT AND MPL-2.0 AND Unlicense URL: %{gourl} Source0: %{gosource} # Generated by go-vendor-tools Source1: %{archivename}-vendor.tar.bz2 Source2: go-vendor-tools.toml # Manually added missing license file Source3: LICENSE-testmodBuilder # Skip tests that uses the network. # Based on https://sources.debian.org/data/main/h/hugo/0.58.3-1/debian/patches/0005-skip-modules-TestClient.patch Patch0001: 0010-skip-modules-TestClient.patch BuildRequires: go-vendor-tools %description %{common_description} %prep %goprep -A %setup -q -T -D -a1 %{forgesetupargs} %autopatch -p1 # Fix goipath: sed -i 's|invopop/yaml|oasdiff/yaml|g' $(find . -iname '*.go' -type f) # LICENSE file not in version of repository pulled in by Hugo: pwd ls cp %SOURCE3 vendor/github.com/gohugoio/testmodBuilder/mods/LICENSE %generate_buildrequires %go_vendor_license_buildrequires -c %{S:2} %build # Allow github.com/tetratelabs/wazero to build: %global __golang_extldflags -Wl,-z,undefs %gobuild -o %{gobuilddir}/bin/hugo %{goipath} # Generated by go2rpm, but deactivated here. # for cmd in livereload/gen markup/goldmark scripts/fork_go_templates; do # %gobuild -o %{gobuilddir}/bin/$(basename $cmd) %{goipath}/$cmd # done %install %go_vendor_license_install -c %{S:2} install -m 0755 -vd %{buildroot}%{_bindir} install -m 0755 -vp %{gobuilddir}/bin/* %{buildroot}%{_bindir}/ %check %go_vendor_license_check -c %{S:2} %if %{with check} # .: extensive test that uses network. # common/hcontext: terminal coloring? # common/hstrings: terminal coloring? # common/text: terminal coloring? # The rest are: relocation target github.com/tetratelabs/wazero/internal/engine/wazevo/backend/isa/amd64.entrypoint not defined %gocheck \ -d . \ -d common/hcontext \ -d common/hstrings \ -d common/text \ -d cache/filecache \ -d cache/httpcache \ -d common/herrors \ -d common/htime \ -d common/hugo \ -d common/paths \ -d config/allconfig \ -d config/testconfig \ -d create \ -d hugofs/glob \ -d hugolib \ -d hugolib/filesystems \ -d hugolib/pagesfromdata \ -d hugolib/segments \ -d internal/js/esbuild \ -d internal/warpc \ -d langs/i18n \ -d markup/goldmark \ -d markup/goldmark/blockquotes \ -d markup/goldmark/codeblocks \ -d markup/goldmark/images \ -d markup/goldmark/internal/extensions/attributes \ -d markup/goldmark/passthrough \ -d markup/goldmark/tables \ -d markup/highlight \ -d markup/tableofcontents \ -d related \ -d resources \ -d resources/images \ -d resources/page \ -d resources/page/pagemeta \ -d resources/resource \ -d resources/resource_factories/create \ -d resources/resource_transformers/babel \ -d resources/resource_transformers/cssjs \ -d resources/resource_transformers/integrity \ -d resources/resource_transformers/js \ -d resources/resource_transformers/minifier \ -d resources/resource_transformers/templates \ -d resources/resource_transformers/tocss/dartsass \ -d resources/resource_transformers/tocss/scss \ -d tpl/cast \ -d tpl/collections \ -d tpl/data \ -d tpl/debug \ -d tpl/fmt \ -d tpl/images \ -d tpl/lang \ -d tpl/math \ -d tpl/openapi/openapi3 \ -d tpl/os \ -d tpl/page \ -d tpl/partials \ -d tpl/path \ -d tpl/reflect \ -d tpl/resources \ -d tpl/strings \ -d tpl/templates \ -d tpl/time \ -d tpl/tplimpl \ -d tpl/transform \ -d tpl/urls \ %endif %files -f %{go_vendor_license_filelist} %license vendor/modules.txt %doc docs CONTRIBUTING.md README.md SECURITY.md %doc create/skeletons/theme/content/_index.md %doc create/skeletons/theme/content/posts/_index.md %doc create/skeletons/theme/content/posts/post-1.md %doc create/skeletons/theme/content/posts/post-2.md %doc create/skeletons/theme/content/posts/post-3/index.md %doc hugolib/testsite/content/first-post.md %doc hugolib/testsite/content_nn/first-post.md %doc testscripts/commands/commands_errors.txt %doc testscripts/commands/completion.txt testscripts/commands/config.txt %doc testscripts/commands/config__cachedir.txt testscripts/commands/convert.txt %doc testscripts/commands/deprecate.txt testscripts/commands/env.txt %doc testscripts/commands/gen.txt testscripts/commands/hugo.txt %doc testscripts/commands/hugo__configdir.txt %doc testscripts/commands/hugo__errors.txt testscripts/commands/hugo__flags.txt %doc testscripts/commands/hugo__noconfig.txt %doc testscripts/commands/hugo__path-warnings-postprocess.txt %doc testscripts/commands/hugo__path-warnings.txt %doc testscripts/commands/hugo__path-warnings_issue13164.txt %doc testscripts/commands/hugo__processingstats.txt %doc testscripts/commands/hugo__processingstats2.txt %doc testscripts/commands/hugo__publishdir_in_config.txt %doc testscripts/commands/hugo__static_composite.txt %doc testscripts/commands/hugo__watch.txt testscripts/commands/hugo_build.txt %doc testscripts/commands/hugo_configdev_env.txt %doc testscripts/commands/hugo_configdev_environment.txt %doc testscripts/commands/hugo_configprod.txt %doc testscripts/commands/hugo_printpathwarnings.txt %doc testscripts/commands/hugo_printunusedtemplates.txt %doc testscripts/commands/import_jekyll.txt testscripts/commands/list.txt %doc testscripts/commands/mod.txt testscripts/commands/mod__disable.txt %doc testscripts/commands/mod__themesdir.txt testscripts/commands/mod_get.txt %doc testscripts/commands/mod_get_u.txt testscripts/commands/mod_init.txt %doc testscripts/commands/mod_npm.txt %doc testscripts/commands/mod_npm_withexisting.txt %doc testscripts/commands/mod_tidy.txt testscripts/commands/mod_vendor.txt %doc testscripts/commands/new.txt testscripts/commands/new_content.txt %doc testscripts/commands/new_content_archetypedir.txt %doc testscripts/commands/noop.txt testscripts/commands/server.txt %doc testscripts/commands/server__edit_config.txt %doc testscripts/commands/server__edit_content.txt %doc testscripts/commands/server__error_recovery_edit_config.txt %doc testscripts/commands/server__error_recovery_edit_content.txt %doc testscripts/commands/server__multihost.txt %doc testscripts/commands/server__watch_hugo_stats.txt %doc testscripts/commands/server__watch_moduleconfig.txt %doc testscripts/commands/server_disablelivereload.txt %doc testscripts/commands/server_disablelivereload__config.txt %doc testscripts/commands/server_render_static_to_disk.txt %doc testscripts/commands/server_render_to_memory.txt %doc testscripts/commands/version.txt testscripts/commands/warnf_stderr.txt %doc testscripts/unfinished/noop.txt testscripts/withdeploy/deploy.txt %doc testscripts/withdeploy-off/deploy_off.txt %doc tpl/tplimpl/embedded/templates/robots.txt %{_bindir}/hugo %changelog %autochangelog