Why Nostr? What is Njump?
2024-07-03 00:54:14

npub1qs…jrr3m on Nostr: commit 6eb8e42ad9706ea3a476ab9be6f5fe8437788945 Author: @RandyMcMillan ...

commit 6eb8e42ad9706ea3a476ab9be6f5fe8437788945
Author: @RandyMcMillan <[email protected]>
Date: Tue Jan 9 00:06:05 2024 -0500

gnostr.mk

diff --git a/gnostr.mk b/gnostr.mk
index 8e60b0730..6ca10ebb0 100644
--- a/gnostr.mk
+++ b/gnostr.mk
@@ -37,10 +37,32 @@ GTAR :=$(shell which tar)
endif
export GTAR

+DOCS=\
+gnostr-act\
+gnostr-blockheight\
+gnostr-cli\
+gnostr-client\
+gnostr-get-relays-c\
+gnostr-get-relays\
+gnostr-git-log\
+gnostr-git-reflog\
+gnostr-gnode\
+gnostr-keyconv\
+gnostr-post\
+gnostr-query\
+gnostr-relays\
+gnostr-req\
+gnostr-send\
+gnostr-set-relays\
+gnostr-sha256\
+gnostr-tui\
+gnostr-weeble\
+gnostr-wobble\
+gnostr\

##all:
#all: submodules gnostr gnostr-git gnostr-get-relays gnostr-docs## make gnostr gnostr-cat gnostr-git gnostr-relay gnostr-xor docs
-all: submodules gnostr gnostr-git gnostr-get-relays gnostr-docs## make gnostr gnostr-cat gnostr-git gnostr-relay gnostr-xor docs
+all: submodules gnostr gnostr-git gnostr-get-relays ##gnostr-docs## make gnostr gnostr-cat gnostr-git gnostr-relay gnostr-xor docs
## build gnostr tool and related dependencies

##gnostr-docs:
@@ -57,8 +79,40 @@ gnostr-docs:docker-start doc/gnostr.1## docs: convert README to doc/gnostr.1
git add --ignore-errors sources/*.md 2>/dev/null || echo && git add --ignore-errors *.md 2>/dev/null || echo
#@git ls-files -co --exclude-standard | grep '\.md/$\' | xargs git

-doc/gnostr.1: README##
- scdoc < $^ > $@
+doc-gnostr-act:
+ help2man gnostr-act | sed 's/act /gnostr\-act /g' | sed 's/ACT /GNOSTR\-ACT /g' > doc/gnostr-act.1 #&& man doc/gnostr-act.1
+doc-gnostr-cat:
+ help2man gnostr-cat > doc/gnostr-cat.1 #&& man doc/gnostr-cat.1
+doc-gnostr-git:
+ help2man gnostr-git | sed 's/ git / gnostr\-git /g' | sed 's/ GIT / GNOSTR\-GIT /g' > doc/gnostr-git.1 #&& man doc/gnostr-git.1
+.PHONY:doc
+doc:doc-gnostr-act doc-gnostr-cat doc-gnostr-git gnostr-install##
+##help2man < $^ > $@
+ @(\
+ for b in $(DOCS);\
+ do touch doc/$$b.1;\
+ done;\
+ exit;\
+ )
+ (\
+ for b in $(DOCS);\
+ do echo doc/$$b.1 > /tmp/make-doc.log;\
+ done;\
+ exit;\
+ )
+ (\
+ for b in $(DOCS);\
+ do help2man $$b > doc/$$b.1;\
+ echo $$b;\
+ done;\
+ exit;\
+ )
+ #for b in $(DOCS); do echo $b; done; exit
+ #for b in $(DOCS); do touch doc/$(DOCS); done;exit
+ #for n in $(DOCS); do touch doc/$n.1; done
+ #bash -c "for n in $(ls gnostr-* ); do touch doc/$n.1; done"
+ #for n in $(DOCS); do [ -x $n ] && help2man $n > doc/$n.1 || true; done
+ #bash -c "for n in $(ls gnostr-* ); do [ -x $n ] && help2man $n > doc/$n.1 || true; done"

.PHONY: version
version: gnostr.c## print version
@@ -177,10 +231,10 @@ gnostr-git:deps/gnostr-git/gnostr-git## gnostr-git


gnostr-get-relays:
- $(CC) ./template/gnostr-get-relays.c -o gnostr-get-relays
+ $(CC) ./src/gnostr-get-relays.c -o gnostr-get-relays

gnostr-set-relays:
- $(CC) ./template/gnostr-set-relays.c -o gnostr-set-relays
+ $(CC) ./src/gnostr-set-relays.c -o gnostr-set-relays


gnostr-cargo-binstall:
@@ -220,28 +274,33 @@ gnostr-command:deps/gnostr-command/target/release/gnostr-command## gnostr-comma
.PHONY:bins
bins:
@cd bins && make cargo-b-release && make cargo-i
+bins-test-post-event:
+ cat test/first-gnostr-commit.json | gnostr-post-event wss://relay.damus.io
+bins-test-fetch-by-id:
+ gnostr-fetch-by-id wss://relay.damus.io fbf73a17a4e0fe390aba1808a8d55f1b50717d5dd765b2904bf39eba18c51f7c | jq || true
+ #gnostr-fetch-by-id wss://relay.damus.io fbf73a17a4e0fe390aba1808a8d55f1b50717d5dd765b2904bf39eba18c51f7c | jq .content || true
+
+.PHONY:tui
+tui:
+ @cd tui && make build-release install

deps/gnostr-legit/.git:gnostr-git
@devtools/refresh-submodules.sh deps/gnostr-legit
-#.PHONY:deps/gnostr-legit/gnostr-legit
-deps/gnostr-legit/gnostr-legit:deps/gnostr-legit/.git
+#.PHONY:deps/gnostr-legit/release/gnostr-legit
+deps/gnostr-legit/target/release/gnostr-legit:deps/gnostr-legit/.git
cd deps/gnostr-legit && \
- make cargo-build-release install
-deps/gnostr-legit/target/release/gnostr-legit:deps/gnostr-legit/gnostr-legit## gnostr-legit
+ make cargo-b-release install
gnostr-legit:deps/gnostr-legit/target/release/gnostr-legit## gnostr-legit
cp $< $@ && exit;
install -v template/gnostr-* /usr/local/bin >/tmp/gnostr-legit.log

-
-
deps/gnostr-sha256/.git:
@devtools/refresh-submodules.sh deps/gnostr-sha256
#.PHONY:deps/gnostr-sha256/gnostr-sha256
deps/gnostr-sha256/gnostr-sha256:deps/gnostr-sha256/.git
cd deps/gnostr-sha256 && \
- make cargo-install
+ make cargo-b-release install
deps/gnostr-sha256/target/release/gnostr-sha256:deps/gnostr-sha256/gnostr-sha256## gnostr-sha256
-.PHONY:
gnostr-sha256:deps/gnostr-sha256/target/release/gnostr-sha256


@@ -490,6 +549,8 @@ gnostr-all:
$(MAKE) -j libsecp256k1.a
type -P gnostr || $(MAKE) -j gnostr
$(MAKE) -j gnostr-install
+ type -P gnostr-post-event || $(MAKE) -j bins
+ type -P gnostr-tui || $(MAKE) -j tui
type -P gnostr-cat || $(MAKE) -j gnostr-cat
type -P gnostr-cli || $(MAKE) -j gnostr-cli
type -P gnostr-grep || $(MAKE) -j gnostr-grep
Author Public Key
npub1qsdleyqflt606ph0ghz0zn2u96k9xfxqv29mp0nznhvs3fn7kyhs5jrr3m