Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/cygwin-apps/calm.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJon Turney <jon.turney@dronecode.org.uk>2023-12-29 17:34:44 +0300
committerJon Turney <jon.turney@dronecode.org.uk>2023-12-29 23:16:14 +0300
commit6103afd483abd1bd482eeaa00e999e6fe1a9ca2a (patch)
tree3c543dec0b1aad4af626446ad501ea23952740f2
parent2f50daec7162c918b480f90c5973b1f600956f36 (diff)
Add package recipe URL to JSON dump
-rwxr-xr-xcalm/package.py18
1 files changed, 18 insertions, 0 deletions
diff --git a/calm/package.py b/calm/package.py
index dd46b57..d135d80 100755
--- a/calm/package.py
+++ b/calm/package.py
@@ -1393,6 +1393,20 @@ def upper_first_character(s):
#
+#
+#
+
+def _find_build_recipe_file(pn):
+ repo = '/git/cygwin-packages/%s.git' % pn
+ if os.path.exists(repo):
+ # XXX: we might want to check contents of the repo to determine if this
+ # package has a cygport or g-b-s build script
+ return 'https://cygwin.com/cgit/cygwin-packages/%s/tree/%s.cygport' % (pn, pn)
+
+ return None
+
+
+#
# write a json summary of packages
#
def write_repo_json(args, packages, f):
@@ -1443,6 +1457,10 @@ def write_repo_json(args, packages, f):
if 'license' in po.version_hints[bv]:
d['license'] = po.version_hints[bv]['license']
+ build_recipe = _find_build_recipe_file(po.orig_name)
+ if build_recipe:
+ d['build_recipe'] = build_recipe
+
if (po.orig_name in pkg_maintainers) and (not pkg_maintainers[po.orig_name].is_orphaned()):
d['maintainers'] = sorted(pkg_maintainers[po.orig_name].maintainers())