From 8599efd9fd249949d82c75025ddc1414db676982 Mon Sep 17 00:00:00 2001 From: maxice8 Date: Thu, 3 May 2018 14:26:43 -0300 Subject: [PATCH] common/: add support for changelog field. This commits allows ./xbps-src show to show the changelog field and for changelog to be included with the -c/--changelog option via xbps-create. Closes: #14102 [via git-merge-pr] --- Manual.md | 3 +++ common/environment/setup/sourcepkg.sh | 2 +- common/hooks/do-pkg/00-gen-pkg.sh | 1 + common/xbps-src/shutils/show.sh | 1 + 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Manual.md b/Manual.md index 626c0faba09..be29343289c 100644 --- a/Manual.md +++ b/Manual.md @@ -579,6 +579,9 @@ Example: A list is composed of three components separated by a colon: group, symlink and target. i.e `alternatives="vi:/usr/bin/vi:/usr/bin/nvi ex:/usr/bin/ex:/usr/bin/nvi-ex"`. +- `changelog` URL to the changelog of the package, the changelog must be in plaintext. +i.e `changelog="https://raw.githubusercontent.com/user/package/master/CHANGELOG.md"` + #### About the many types of `depends` variable. diff --git a/common/environment/setup/sourcepkg.sh b/common/environment/setup/sourcepkg.sh index 5fa21fe72fc..dc939f6ec7c 100644 --- a/common/environment/setup/sourcepkg.sh +++ b/common/environment/setup/sourcepkg.sh @@ -2,7 +2,7 @@ # the package template (excluding subpackages). ## VARIABLES -unset -v pkgname version revision short_desc homepage license maintainer +unset -v pkgname version revision short_desc homepage changelog license maintainer unset -v only_for_archs distfiles checksum build_style nocross broken unset -v configure_script configure_args wrksrc build_wrksrc create_wrksrc unset -v make_build_args make_check_args make_install_args diff --git a/common/hooks/do-pkg/00-gen-pkg.sh b/common/hooks/do-pkg/00-gen-pkg.sh index 75d47d36496..bff366bbb39 100644 --- a/common/hooks/do-pkg/00-gen-pkg.sh +++ b/common/hooks/do-pkg/00-gen-pkg.sh @@ -74,6 +74,7 @@ genpkg() { ${_alternatives:+--alternatives "${_alternatives}"} \ ${_preserve:+--preserve} \ ${tags:+--tags "${tags}"} \ + ${changelog:+--changelog "${changelog}"} \ --architecture ${arch} \ --homepage "${homepage}" \ --license "${license}" \ diff --git a/common/xbps-src/shutils/show.sh b/common/xbps-src/shutils/show.sh index e58b805e4a7..2303fa28519 100644 --- a/common/xbps-src/shutils/show.sh +++ b/common/xbps-src/shutils/show.sh @@ -15,6 +15,7 @@ show_pkg() { [ -n "$noarch" ] && echo "noarch: yes" echo "maintainer: $maintainer" [ -n "$homepage" ] && echo "Upstream URL: $homepage" + [ -n "$changelog" ] && echo "Changelog URL: $changelog" [ -n "$license" ] && echo "License(s): $license" [ -n "$build_style" ] && echo "build_style: $build_style" for i in ${configure_args}; do