From: Jon Turney <jon.turney@dronecode.org.uk>
To: cygwin-apps@cygwin.com
Cc: Jon Turney <jon.turney@dronecode.org.uk>
Subject: [PATCH cygport] Add LICENSE variable
Date: Sun, 29 May 2022 15:05:05 +0100 [thread overview]
Message-ID: <20220529140505.18387-1-jon.turney@dronecode.org.uk> (raw)
Pass it's value through to the source package hint.
---
lib/pkg_info.cygpart | 7 +++++++
lib/pkg_pkg.cygpart | 6 ++++++
testsuite/basic/info/foo.cygport | 1 +
testsuite/basic/info/info.out | 1 +
4 files changed, 15 insertions(+)
diff --git a/lib/pkg_info.cygpart b/lib/pkg_info.cygpart
index 1ad8baa..6ed34ca 100644
--- a/lib/pkg_info.cygpart
+++ b/lib/pkg_info.cygpart
@@ -43,6 +43,12 @@ __pager() {
# what address will be displayed in BROWSER by the homepage command.
#****
+#****v* Information/LICENSE
+# DESCRIPTION
+# A SPDX license expression (See https://spdx.dev/ids/) for the license(s) of
+# the package.
+#****
+
__show_info() {
__pager <<-_EOF
Cygport package information
@@ -50,6 +56,7 @@ __show_info() {
Package version: ${PV}
Cygwin release: ${PR}
Homepage: ${HOMEPAGE}
+ License: ${LICENSE}
Summary: ${SUMMARY:-${DESCRIPTION}}
Description:
${DESCRIPTION:-${SUMMARY}}
diff --git a/lib/pkg_pkg.cygpart b/lib/pkg_pkg.cygpart
index db998f0..82112e1 100644
--- a/lib/pkg_pkg.cygpart
+++ b/lib/pkg_pkg.cygpart
@@ -556,6 +556,12 @@ _EOF
then
cat >> ${distdir}/${PN}/${PN}-${PVR}-src.hint <<-_EOF
homepage: ${HOMEPAGE}
+_EOF
+ fi
+ if [ -n "${LICENSE}" ]
+ then
+ cat >> ${distdir}/${PN}/${PN}-${PVR}-src.hint <<-_EOF
+license: ${LICENSE}
_EOF
fi
else
diff --git a/testsuite/basic/info/foo.cygport b/testsuite/basic/info/foo.cygport
index a5d73b7..188b13c 100644
--- a/testsuite/basic/info/foo.cygport
+++ b/testsuite/basic/info/foo.cygport
@@ -3,4 +3,5 @@ VERSION=2.3.4
RELEASE=1
DESCRIPTION="Cygport messages test package"
HOMEPAGE="http://sourceware.org/cygwinports/"
+LICENSE="GPL-3.0-or-later"
SRC_URI="http://sourceware.org/cygwinports/\${P}.ABC"
diff --git a/testsuite/basic/info/info.out b/testsuite/basic/info/info.out
index 0cd2a1a..8308681 100644
--- a/testsuite/basic/info/info.out
+++ b/testsuite/basic/info/info.out
@@ -3,6 +3,7 @@ Cygport package information
Package version: 2.3.4
Cygwin release: 1
Homepage: http://sourceware.org/cygwinports/
+ License: GPL-3.0-or-later
Summary: Cygport messages test package
Description:
Cygport messages test package
--
2.36.1
reply other threads:[~2022-05-29 14:05 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220529140505.18387-1-jon.turney@dronecode.org.uk \
--to=jon.turney@dronecode.org.uk \
--cc=cygwin-apps@cygwin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).