Bladeren bron

bin/tau: install tau using Makefile

ghassmo 4 jaren geleden
bovenliggende
commit
7c26f6e394
3 gewijzigde bestanden met toevoegingen van 58 en 0 verwijderingen
  1. 1 0
      bin/tau/.gitignore
  2. 37 0
      bin/tau/Makefile
  3. 20 0
      bin/tau/taud_config.toml

+ 1 - 0
bin/tau/.gitignore

@@ -0,0 +1 @@
+/bin

+ 37 - 0
bin/tau/Makefile

@@ -0,0 +1,37 @@
+.POSIX:
+
+# Install prefix
+PREFIX = ~/.local
+
+# Cargo binary
+CARGO = cargo
+
+BINS = taud tau-cli 
+
+BINSDIR = ./bin
+
+BINDEPS = \
+	$(shell find ./taud/src -type f) \
+	$(shell find ./tau-cli/src -type f) \
+	$(shell find . -type f -name taud_config.toml)
+
+all: $(BINS)
+
+$(BINS): $(BINDEPS)
+	mkdir -p $(BINSDIR) 
+	$(CARGO) build --all-features --release --package $@
+	cp -f ../../target/release/$@ $(BINSDIR)/$@
+
+clean: 
+	rm -f $(BINSDIR)/*
+
+install: all
+	mkdir -p $(DESTDIR)$(PREFIX)/bin
+	cp -f $(BINSDIR)/taud $(DESTDIR)$(PREFIX)/bin
+	cp -f $(BINSDIR)/tau-cli $(DESTDIR)$(PREFIX)/bin/tau
+
+uninstall:
+	rm -f $(DESTDIR)$(PREFIX)/bin/tau
+	rm -f $(DESTDIR)$(PREFIX)/bin/taud
+
+.PHONY: all clean install uninstall

+ 20 - 0
bin/tau/taud_config.toml

@@ -0,0 +1,20 @@
+## taud configuration file
+##
+## Please make sure you go through all the settings so you can configure
+## your daemon properly.
+
+# Path to the dataset 
+dataset_path = "~/.config/tau"
+datastore_raft = "~/.config/tau.db"
+
+# Path to DER-formatted PKCS#12 archive. (used only with tls url)
+# This can be created using openssl:
+# openssl pkcs12 -export -out identity.pfx -inkey key.pem -in cert.pem -certfile chain_certs.pem
+tls_identity_path = ""
+
+# The address where taud should bind its RPC socket
+[rpc_listener_url]
+url="127.0.0.1:8875"
+# Password for the created TLS identity or tor password
+password = "FOOBAR"
+