* [PATCH cygport] Add LICENSE variable
@ 2022-05-29 14:05 Jon Turney
0 siblings, 0 replies; only message in thread
From: Jon Turney @ 2022-05-29 14:05 UTC (permalink / raw)
To: cygwin-apps; +Cc: Jon Turney
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-05-29 14:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-29 14:05 [PATCH cygport] Add LICENSE variable Jon Turney
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).