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]
This commit is contained in:
maxice8 2018-05-03 14:26:43 -03:00 committed by Toyam Cox
parent 6a61601a2e
commit 8599efd9fd
4 changed files with 6 additions and 1 deletions

View File

@ -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"`
<a id="explain_depends"></a>
#### About the many types of `depends` variable.

View File

@ -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

View File

@ -74,6 +74,7 @@ genpkg() {
${_alternatives:+--alternatives "${_alternatives}"} \
${_preserve:+--preserve} \
${tags:+--tags "${tags}"} \
${changelog:+--changelog "${changelog}"} \
--architecture ${arch} \
--homepage "${homepage}" \
--license "${license}" \

View File

@ -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