2019-09-13 14:32:47 +02:00
|
|
|
TERMUX_PKG_HOMEPAGE=https://github.com/lightningnetwork/lnd
|
|
|
|
TERMUX_PKG_DESCRIPTION="Lightning Network Daemon"
|
|
|
|
TERMUX_PKG_LICENSE="MIT"
|
2020-03-17 14:23:00 +01:00
|
|
|
TERMUX_PKG_VERSION=0.9.2-beta
|
2019-09-13 16:01:16 +02:00
|
|
|
TERMUX_PKG_SRCURL=(https://github.com/lightningnetwork/lnd/archive/v${TERMUX_PKG_VERSION}.tar.gz
|
|
|
|
https://github.com/lightningnetwork/lnd/releases/download/v${TERMUX_PKG_VERSION}/vendor.tar.gz)
|
2020-03-17 14:23:00 +01:00
|
|
|
TERMUX_PKG_SHA256=(8143d9990bcd6ed6f2b5028e4e2dc49515079200d1d8a6f4af64245a17400e39
|
|
|
|
9ad9113b3a0ba0a1408ec8ee9ac59961e5ccf619b5ffd181110f37a451b6c165)
|
2019-09-13 16:43:14 +02:00
|
|
|
TERMUX_PKG_DEPENDS="bitcoin"
|
2019-09-13 16:51:17 +02:00
|
|
|
TERMUX_PKG_CONFFILES="var/service/lnd/run var/service/lnd/log/run"
|
2019-09-13 14:32:47 +02:00
|
|
|
TERMUX_PKG_BUILD_IN_SRC=true
|
|
|
|
|
|
|
|
termux_step_make() {
|
2020-03-08 18:02:16 +01:00
|
|
|
termux_setup_golang
|
|
|
|
GO111MODULE=on go build -tags linux -v -mod=vendor -ldflags "-X github.com/lightningnetwork/lnd/build.Commit=v$TERMUX_PKG_VERSION" ./cmd/lnd
|
|
|
|
GO111MODULE=on go build -tags linux -v -mod=vendor -ldflags "-X github.com/lightningnetwork/lnd/build.Commit=v$TERMUX_PKG_VERSION" ./cmd/lncli
|
2019-09-13 14:32:47 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
termux_step_make_install() {
|
2020-03-08 18:02:16 +01:00
|
|
|
install -Dm700 lnd lncli "$TERMUX_PREFIX"/bin/
|
2019-09-13 14:32:47 +02:00
|
|
|
}
|
2019-09-13 16:08:12 +02:00
|
|
|
|
|
|
|
termux_step_post_make_install() {
|
2020-03-08 18:02:16 +01:00
|
|
|
mkdir -p $TERMUX_PREFIX/var/service
|
|
|
|
cd $TERMUX_PREFIX/var/service
|
|
|
|
mkdir -p lnd/log
|
|
|
|
echo "#!$TERMUX_PREFIX/bin/sh" > lnd/run
|
|
|
|
echo 'exec lnd 2>&1' >> lnd/run
|
|
|
|
chmod +x lnd/run
|
|
|
|
touch lnd/down
|
2019-09-13 16:08:12 +02:00
|
|
|
|
2020-03-08 18:02:16 +01:00
|
|
|
ln -sf $TERMUX_PREFIX/share/termux-services/svlogger lnd/log/run
|
2019-09-13 16:08:12 +02:00
|
|
|
}
|