Browse Source
- Fix Go installation by extracting to /tmp first then moving to final destination - Return to original directory after Go installation - Add attempt to install secp256k1 from package manager before building from source - Add missing automake package for autoreconf - Fix binary build by running go build after embedded web update Co-authored-by: mleku <me@mleku.dev> Reviewed-on: https://git.nostrdev.com/mleku/next.orly.dev/pulls/1 Co-authored-by: daniyal <daniyal@nostrdev.com> Co-committed-by: daniyal <daniyal@nostrdev.com>main
2 changed files with 45 additions and 9 deletions
@ -1,14 +1,40 @@
@@ -1,14 +1,40 @@
|
||||
#!/usr/bin/env bash |
||||
set -e |
||||
|
||||
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) |
||||
apt -y install build-essential autoconf libtool git wget |
||||
cd $SCRIPT_DIR |
||||
|
||||
# Update package lists |
||||
apt-get update |
||||
|
||||
# Try to install from package manager first (much faster) |
||||
echo "Attempting to install secp256k1 from package manager..." |
||||
if apt-get install -y libsecp256k1-dev >/dev/null 2>&1; then |
||||
echo "✓ Installed secp256k1 from package manager" |
||||
exit 0 |
||||
fi |
||||
|
||||
# Fall back to building from source if package not available |
||||
echo "Package not available in repository, building from source..." |
||||
|
||||
# Install build dependencies |
||||
apt-get install -y build-essential autoconf automake libtool git wget pkg-config |
||||
|
||||
cd "$SCRIPT_DIR" |
||||
rm -rf secp256k1 |
||||
|
||||
# Clone and setup secp256k1 |
||||
git clone https://github.com/bitcoin-core/secp256k1.git |
||||
cd secp256k1 |
||||
git checkout v0.6.0 |
||||
|
||||
# Initialize and update submodules |
||||
git submodule init |
||||
git submodule update |
||||
|
||||
# Build and install |
||||
./autogen.sh |
||||
./configure --enable-module-schnorrsig --enable-module-ecdh --prefix=/usr |
||||
make -j1 |
||||
sudo make install |
||||
make -j$(nproc) |
||||
make install |
||||
|
||||
cd "$SCRIPT_DIR" |
||||
|
||||
Loading…
Reference in new issue