From 3298cd549a8d880941d37a848dc145eb94180a95 Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Tue, 13 Nov 2018 08:37:35 -0500 Subject: [PATCH] try fixing debian build --- Makefile | 28 ++++++++++++++++++++-------- lokinet-bootstrap | 5 ++--- 2 files changed, 22 insertions(+), 11 deletions(-) mode change 100755 => 100644 lokinet-bootstrap diff --git a/Makefile b/Makefile index 80f4c80df..8f3079ce3 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,8 @@ SIGN = gpg --sign --detach REPO := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST)))) -PREFIX ?= /usr/local +DESTDIR ?= /usr/local +PREFIX = $(DESTDIR) CC ?= cc CXX ?= c++ @@ -52,6 +53,7 @@ RPI ?= OFF STATIC_LINK ?= OFF CMAKE_GEN ?= Unix Makefiles +INSTALL = install -m 755 BUILD_ROOT = $(REPO)/build @@ -76,6 +78,7 @@ LINT_FILES = $(wildcard llarp/*.cpp) LINT_CHECK = $(LINT_FILES:.cpp=.cpp-check) clean: + rm -f $(TARGETS) rm -rf $(BUILD_ROOT) rm -f $(SHADOW_PLUGIN) $(SHADOW_CONFIG) rm -f *.sig @@ -144,7 +147,9 @@ testnet: python3 contrib/testnet/genconf.py --bin=$(TESTNET_EXE) --svc=$(TESTNET_SERVERS) --clients=$(TESTNET_CLIENTS) --dir=$(TESTNET_ROOT) --out $(TESTNET_CONF) --connect=4 LLARP_DEBUG=$(TESTNET_DEBUG) supervisord -n -d $(TESTNET_ROOT) -l $(TESTNET_LOG) -c $(TESTNET_CONF) -test: debug +$(TEST_EXE): debug + +test: $(TEST_EXE) $(TEST_EXE) android-gradle-prepare: @@ -195,14 +200,21 @@ docker-debian: docker-fedora: docker build -f docker/fedora.Dockerfile . +debian-configure: + mkdir -p '$(BUILD_ROOT)' + $(CONFIG_CMD) -DDEBIAN=ON -DRELEASE_MOTTO="$(shell cat $(REPO)/motto.txt)" -DCMAKE_BUILD_TYPE=Release + +debian: debian-configure + $(MAKE) -C '$(BUILD_ROOT)' + cp $(BUILD_ROOT)/lokinet lokinet + cp $(BUILD_ROOT)/rcutil lokinet-rcutil + install: - rm -f $(PREFIX)/bin/lokinet - cp $(EXE) $(PREFIX)/bin/lokinet - chmod 755 $(PREFIX)/bin/lokinet + $(INSTALL) $(EXE) $(PREFIX) + $(INSTALL) $(REPO)/lokinet-bootstrap $(PREFIX) + +setcap: $(SETCAP) $(PREFIX)/bin/lokinet || true - rm -f $(PREFIX)/bin/lokinet-bootstrap - cp $(REPO)/lokinet-bootstrap $(PREFIX)/bin/lokinet-bootstrap - chmod 755 $(PREFIX)/bin/lokinet-bootstrap fuzz-configure: clean cmake -GNinja -DCMAKE_BUILD_TYPE=Fuzz -DCMAKE_C_COMPILER=afl-gcc -DCMAKE_CXX_COMPILER=afl-g++ diff --git a/lokinet-bootstrap b/lokinet-bootstrap old mode 100755 new mode 100644 index 9ec0bff7a..701608ae9 --- a/lokinet-bootstrap +++ b/lokinet-bootstrap @@ -1,8 +1,7 @@ -#!/usr/bin/env sh -# +#!/usr/bin/env bash # this shell script will be replaced by a proper program in the future (probably) # if [ "X$1" = "X" ] ; then url="https://i2p.rocks/i2procks.signed" ; else url="$1" ; fi echo "downloading $url" -wget -O $HOME/.lokinet/bootstrap.signed "$url" || echo "failed to download bootstrap from $url" +wget -O $HOME/.lokinet/bootstrap.signed "$url" || echo "failed to download bootstrap from $url" \ No newline at end of file