From: Jon Turney <jon.turney@dronecode.org.uk>
To: cygwin-apps@cygwin.com
Cc: Jon Turney <jon.turney@dronecode.org.uk>
Subject: [PATCH cygport 3/2] Generate a separate .hint for the source package
Date: Sat, 22 Feb 2020 14:48:00 -0000 [thread overview]
Message-ID: <20200222144751.22096-2-jon.turney@dronecode.org.uk> (raw)
In-Reply-To: <20200208134634.58200-1-jon.turney@dronecode.org.uk>
Pass through HOMEPAGE as homepage: in that hint, if present.
requires: in a source package hint makes no sense.
---
lib/pkg_pkg.cygpart | 21 ++++++++++++-------
.../dist/multiple/multiple-3.14-1-src.hint | 6 ++++++
testsuite/hints/multiple/multiple.cygport | 1 +
.../dist/single/single-2.3.4-1-src.hint | 5 +++++
4 files changed, 25 insertions(+), 8 deletions(-)
create mode 100644 testsuite/hints/multiple/hints/multiple-3.14-1.x86_64/dist/multiple/multiple-3.14-1-src.hint
create mode 100644 testsuite/hints/single/hints/single-2.3.4-1.x86_64/dist/single/single-2.3.4-1-src.hint
diff --git a/lib/pkg_pkg.cygpart b/lib/pkg_pkg.cygpart
index 753de9e..211524d 100644
--- a/lib/pkg_pkg.cygpart
+++ b/lib/pkg_pkg.cygpart
@@ -878,32 +878,37 @@ _EOF
done
fi
- # e.g. split library package w/o PN in PKG_NAMES
- if [ ! -f ${distdir}/${PN}/${PN}-${PVR}.hint ]
+ # source package hint
+ if [ ! -f ${distdir}/${PN}/${PN}-${PVR}-src.hint ]
then
pkg_category_var=${PN//[-+\.]/_}_CATEGORY;
pkg_summary_var=${PN//[-+\.]/_}_SUMMARY;
pkg_description_var=${PN//[-+\.]/_}_DESCRIPTION;
- if [ -f ${C}/${PN}.hint ]
+ if [ -f ${C}/${PN}-src.hint ]
then
- cp ${C}/${PN}.hint ${distdir}/${PN}/${PN}-${PVR}.hint
+ cp ${C}/${PN}-src.hint ${distdir}/${PN}/${PN}-${PVR}-src.hint
elif [ -f ${C}/setup.hint ]
then
- cp ${C}/setup.hint ${distdir}/${PN}/${PN}-${PVR}.hint
+ cp ${C}/setup.hint ${distdir}/${PN}/${PN}-${PVR}-src.hint
elif [ -n "${!pkg_category_var:-${CATEGORY}}" \
-a -n "${!pkg_summary_var:-${SUMMARY}}${!pkg_description_var:-${DESCRIPTION}}" ]
then
- cat > ${distdir}/${PN}/${PN}-${PVR}.hint <<-_EOF
+ cat > ${distdir}/${PN}/${PN}-${PVR}-src.hint <<-_EOF
category: ${!pkg_category_var:-${CATEGORY}}
-requires:
sdesc: "${!pkg_summary_var:-${SUMMARY}}"
ldesc: "${!pkg_description_var:-${DESCRIPTION:-${!pkg_summary_var:-${SUMMARY}}}}"
skip:
${pkg_tag}
_EOF
+ if [ -n "${HOMEPAGE}" ]
+ then
+ cat >> ${distdir}/${PN}/${PN}-${PVR}-src.hint <<-_EOF
+homepage: ${HOMEPAGE}
+_EOF
+ fi
else
- warning "${PN}.hint is missing";
+ warning "${PN}-src.hint is missing";
fi
fi
}
diff --git a/testsuite/hints/multiple/hints/multiple-3.14-1.x86_64/dist/multiple/multiple-3.14-1-src.hint b/testsuite/hints/multiple/hints/multiple-3.14-1.x86_64/dist/multiple/multiple-3.14-1-src.hint
new file mode 100644
index 0000000..51e527e
--- /dev/null
+++ b/testsuite/hints/multiple/hints/multiple-3.14-1.x86_64/dist/multiple/multiple-3.14-1-src.hint
@@ -0,0 +1,6 @@
+category: Base
+sdesc: "Summary of hints for multiple package test (source)"
+ldesc: "Description of hints for multiple package test (source)"
+skip:
+
+homepage: http://test.invalid
diff --git a/testsuite/hints/multiple/multiple.cygport b/testsuite/hints/multiple/multiple.cygport
index ab6ade9..f56502c 100644
--- a/testsuite/hints/multiple/multiple.cygport
+++ b/testsuite/hints/multiple/multiple.cygport
@@ -3,6 +3,7 @@ VERSION=3.14
RELEASE=1
SUMMARY="Summary of hints for multiple package test"
DESCRIPTION="Description of hints for multiple package test"
+HOMEPAGE="http://test.invalid"
PKG_NAMES="libmultiple1 libmultiple-devel"
diff --git a/testsuite/hints/single/hints/single-2.3.4-1.x86_64/dist/single/single-2.3.4-1-src.hint b/testsuite/hints/single/hints/single-2.3.4-1.x86_64/dist/single/single-2.3.4-1-src.hint
new file mode 100644
index 0000000..2bb4adc
--- /dev/null
+++ b/testsuite/hints/single/hints/single-2.3.4-1.x86_64/dist/single/single-2.3.4-1-src.hint
@@ -0,0 +1,5 @@
+category: Base
+sdesc: "Summary of hints for single package test"
+ldesc: "Description of hints for single package test"
+skip:
+
--
2.21.0
next prev parent reply other threads:[~2020-02-22 14:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-08 13:47 [PATCH cygport 0/2] Add provides: and conflicts: Jon Turney
2020-02-08 13:47 ` [PATCH cygport 2/2] Add provides: and conflicts: hints Jon Turney
2020-02-08 13:47 ` [PATCH cygport 1/2] Add test which compares hints with expected Jon Turney
2020-02-22 14:48 ` Jon Turney [this message]
2020-02-22 14:48 ` [PATCH cygport] Generate a separate .hint for the source package Jon Turney
2020-03-24 3:07 ` [PATCH cygport 0/2] Add provides: and conflicts: Yaakov Selkowitz
2020-04-05 14:17 ` Jon Turney
2020-04-06 23:11 ` Yaakov Selkowitz
2020-04-06 23:11 ` Yaakov Selkowitz
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=20200222144751.22096-2-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).