mirror of
https://github.com/psa/libtensorflow1-freebsd-port.git
synced 2025-12-10 16:59:48 +01:00
Move GH_TUPLE to Makefile.gh_tuple to make regeneration easier. Include WORKSPACE in the list of files to pull dependencies from This bug discusses possibly using local_repository instead: https://github.com/bazelbuild/bazel/issues/4996 Setup for io_bazel_rules_closuer describes entries in WORKSPACE, which is how I got the idea to add it https://github.com/bazelbuild/rules_closure
29 lines
1.2 KiB
Makefile
29 lines
1.2 KiB
Makefile
generate-gh-tuples:
|
|
@make DISTFILES=$$(make -VDISTFILES:Mtensorflow-tensorflow\*) extract
|
|
@printf %s 'GH_TUPLE='
|
|
@IFS=: ;\
|
|
sed -nEe '/\/\/github.com/s/.*\/([^\/]*)\/([^\/]*)\/archive\/([^"]*)")?,.*/\1:\2:\3/p' \
|
|
$$(make -VWRKSRC)/WORKSPACE \
|
|
$$(make -VWRKSRC)/tensorflow/workspace.bzl \
|
|
| sort -u | \
|
|
while read name acct tarball; do \
|
|
tag=$$(printf %s "$$tarball" | sed -E 's,(.tar.gz|.tar.xz|.zip),,'); \
|
|
label=$$( \
|
|
printf %s "$$name" | sed 's,[^[:alpha:][:digit:]],_,g')_$$( \
|
|
printf %s "$$acct" | sed 's,[^[:alpha:][:digit:]],_,g')_$$( \
|
|
printf %s "$$tag" | sed 's,[^[:alpha:][:digit:]],_,g'); \
|
|
printf ' \\\n %s' "$$name:$$acct:$$tag:$$label"; \
|
|
done; \
|
|
sed -nEe '/\/\/github.com/s/.*\/([^\/]*)\/([^\/]*)\/releases\/download\/([^\/]+)\/([^"]*)")?,.*/\1:\2:\3/p' \
|
|
$$(make -VWRKSRC)/WORKSPACE \
|
|
$$(make -VWRKSRC)/tensorflow/workspace.bzl \
|
|
| sort -u | \
|
|
while read name acct tag; do \
|
|
label=$$( \
|
|
printf %s "$$name" | sed 's,[^[:alpha:][:digit:]],_,g')_$$( \
|
|
printf %s "$$acct" | sed 's,[^[:alpha:][:digit:]],_,g')_$$( \
|
|
printf %s "$$tag" | sed 's,[^[:alpha:][:digit:]],_,g'); \
|
|
printf ' \\\n %s' "$$name:$$acct:$$tag:$$label"; \
|
|
done; \
|
|
printf '\n'
|