summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCzarek Nakamoto <cyjan@mrcyjanek.net>2024-03-13 09:01:30 +0100
committerCzarek Nakamoto <cyjan@mrcyjanek.net>2024-03-13 09:01:30 +0100
commit7dd6be9aea87eeb775f9bc07e9e4eff96215b8c2 (patch)
tree4a10251ee6c96caa7d66d911650310c0b0c03cc6
parent16b64cc804859083c3c7ea513bf86342ae0cb2fb (diff)
bookworm -> buster
-rw-r--r--.env38
-rw-r--r--.woodpecker/linux.yaml25
-rw-r--r--Makefile213
-rw-r--r--README.md11
4 files changed, 17 insertions, 270 deletions
diff --git a/.env b/.env
deleted file mode 100644
index 79a8841..0000000
--- a/.env
+++ /dev/null
@@ -1,38 +0,0 @@
-NPROC=4
-# Boost
-BOOST_VERSION=1_84_0
-BOOST_VERSION_DOT=1.84.0
-BOOST_HASH=cc4b893acf645c9d4b698e9a0f08ca8846aa5d6c68275c14c3e7949c24109454
-# iconv
-ICONV_VERSION=1.16
-ICONV_HASH=e6a1b1b589654277ee790cce3734f07876ac4ccfaecbee8afa0b649cf529cc04
-# zlib
-ZLIB_VERSION=1.3.1
-ZLIB_HASH=9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23
-# OpenSSL
-OPENSSL_VERSION=3.2.0
-OPENSSL_HASH=14c826f07c7e433706fb5c69fa9e25dab95684844b4c962a2cf1bf183eb4690e
-# ZMQ
-ZMQ_VERSION=v4.3.5
-ZMQ_HASH=622fc6dde99ee172ebaa9c8628d85a7a1995a21d
-# libsodium
-SODIUM_VERSION=1.0.18
-SODIUM_HASH=4f5e89fa84ce1d178a6765b8b46f2b6f91216677
-# libexpat
-LIBEXPAT_VERSION=R_2_4_8
-LIBEXPAT_HASH=3bab6c09bbe8bf42d84b81563ddbcf4cca4be838
-# libunbound
-LIBUNBOUND_VERSION=branch-1.16.1
-LIBUNBOUND_HASH=903538c76e1d8eb30d0814bb55c3ef1ea28164e8
-# polyseed
-POLYSEED_HASH=b7c35bb3c6b91e481ecb04fc235eaff69c507fa1
-# utf8proc
-UTF8PROC_HASH=1cb28a66ca79a0845e99433fd1056257456cef8b
-# (finally) monero
-MONERO_GIT_SOURCE_SIMPLE=git.mrcyjanek.net_mrcyjanek_monero
-MONERO_GIT_SOURCE=https://git.mrcyjanek.net/mrcyjanek/monero.git
-MONERO_TAG=release-v0.18.3.1-anonero
-# Tools
-PERL_VERSION_FULL=5.38.2
-PERL_VERSION_MAJOR=5.0
-PERL_HASH=a0a31534451eb7b83c7d6594a497543a54d488bc90ca00f5e34762577f40655e
diff --git a/.woodpecker/linux.yaml b/.woodpecker/linux.yaml
index 2fa8342..5d66f15 100644
--- a/.woodpecker/linux.yaml
+++ b/.woodpecker/linux.yaml
@@ -8,52 +8,55 @@ clone:
labels:
platform: linux/amd64
+when:
+ - event: tag
+
steps:
- name: patch monero and cache depends
- image: git.mrcyjanek.net/mrcyjanek/debian:bookworm
+ image: git.mrcyjanek.net/mrcyjanek/debian:buster
commands:
- cd monero && git submodule update --init --force && cd ..
- ./apply_patches.sh
- cd monero/contrib/depends
- make download
- name: x86_64-linux-gnu
- image: git.mrcyjanek.net/mrcyjanek/debian:bookworm
+ image: git.mrcyjanek.net/mrcyjanek/debian:buster
commands:
- apt update
- apt install -y gcc g++ gperf
- ./build_single.sh x86_64-linux-gnu -j$(nproc)
- name: i686-linux-gnu
- image: git.mrcyjanek.net/mrcyjanek/debian:bookworm
+ image: git.mrcyjanek.net/mrcyjanek/debian:buster
commands:
- apt update
- apt install -y gcc-i686-linux-gnu g++-i686-linux-gnu gperf
- ./build_single.sh i686-linux-gnu -j$(nproc)
- name: aarch64-linux-gnu
- image: git.mrcyjanek.net/mrcyjanek/debian:bookworm
+ image: git.mrcyjanek.net/mrcyjanek/debian:buster
commands:
- apt update
- apt install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu gperf
- ./build_single.sh aarch64-linux-gnu -j$(nproc)
- name: x86_64-linux-android
- image: git.mrcyjanek.net/mrcyjanek/debian:bookworm
+ image: git.mrcyjanek.net/mrcyjanek/debian:buster
commands:
- apt update
- - apt install -y python-is-python3 libtinfo5 gperf
+ - apt install -y libtinfo5 gperf
- ./build_single.sh x86_64-linux-android -j$(nproc)
- name: aarch64-linux-android
- image: git.mrcyjanek.net/mrcyjanek/debian:bookworm
+ image: git.mrcyjanek.net/mrcyjanek/debian:buster
commands:
- apt update
- - apt install -y python-is-python3 libtinfo5 gperf
+ - apt install -y libtinfo5 gperf
- ./build_single.sh aarch64-linux-android -j$(nproc)
- name: arm-linux-androideabi
- image: git.mrcyjanek.net/mrcyjanek/debian:bookworm
+ image: git.mrcyjanek.net/mrcyjanek/debian:buster
commands:
- apt update
- - apt install -y python-is-python3 libtinfo5 gperf
+ - apt install -y libtinfo5 gperf
- ./build_single.sh arm-linux-androideabi -j$(nproc)
- name: upload artifact
- image: git.mrcyjanek.net/mrcyjanek/debian:bookworm
+ image: git.mrcyjanek.net/mrcyjanek/debian:buster
commands:
- rm -rf ~/.ssh || true
- mkdir -p ~/.ssh
diff --git a/Makefile b/Makefile
deleted file mode 100644
index 7dee8d4..0000000
--- a/Makefile
+++ /dev/null
@@ -1,213 +0,0 @@
-include .env
-export $(shell sed 's/=.*//' .env)
-
-CC ?= clang
-CXX ?= clang++
-HOST ?= $(shell gcc -dumpmachine)
-
-
-PREFIX := ${PWD}/prefix
-
-.PHONY: clean_download
-clean_download:
- rm -rf boost_*
- rm -rf libexpat
- rm -rf libiconv*
- rm -rf libsodium
- rm -rf libzmq
- rm -rf monero
- rm -rf openssl-*
- rm -rf perl
- rm -rf polyseed
- rm -rf unbound
- rm -rf utf8proc
- rm -rf zlib
-
-.PHONY: download
-download:
- rm -rf monero
- # Monero
- (git clone ${MONERO_GIT_SOURCE} --depth=1 --branch ${MONERO_TAG} monero && cd monero && git submodule init && git submodule update)
- # Boost
- curl -L -o boost_${BOOST_VERSION}.tar.bz2 https://archives.boost.io/release/${BOOST_VERSION_DOT}/source/boost_${BOOST_VERSION}.tar.bz2
- echo "${BOOST_HASH} boost_${BOOST_VERSION}.tar.bz2" | sha256sum -c
- tar -xf boost_${BOOST_VERSION}.tar.bz2
- rm -f boost_${BOOST_VERSION}.tar.bz2
- # libiconv
- curl -O http://ftp.gnu.org/pub/gnu/libiconv/libiconv-${ICONV_VERSION}.tar.gz
- echo "${ICONV_HASH} libiconv-${ICONV_VERSION}.tar.gz" | sha256sum -c
- tar -xzf libiconv-${ICONV_VERSION}.tar.gz
- rm -f libiconv-${ICONV_VERSION}.tar.gz
- # zlib
- curl -O https://zlib.net/zlib-${ZLIB_VERSION}.tar.gz
- echo "${ZLIB_HASH} zlib-${ZLIB_VERSION}.tar.gz" | sha256sum -c
- tar -xzf zlib-${ZLIB_VERSION}.tar.gz
- rm zlib-${ZLIB_VERSION}.tar.gz
- mv zlib-${ZLIB_VERSION} zlib
- # openssl
- curl -O https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz
- echo "${OPENSSL_HASH} openssl-${OPENSSL_VERSION}.tar.gz" | sha256sum -c
- tar -xzf openssl-${OPENSSL_VERSION}.tar.gz
- rm openssl-${OPENSSL_VERSION}.tar.gz
- # libzmq
- git clone https://github.com/zeromq/libzmq.git -b ${ZMQ_VERSION} --depth=1
- (cd libzmq && test `git rev-parse HEAD` = ${ZMQ_HASH}) || exit 1
- # libsodium
- git clone https://github.com/jedisct1/libsodium.git -b ${SODIUM_VERSION} --depth=1
- (cd libsodium && test `git rev-parse HEAD` = ${SODIUM_HASH}) || exit 1
- # libexpat
- git clone https://github.com/libexpat/libexpat.git -b ${LIBEXPAT_VERSION} --depth=1
- (cd libexpat && test `git rev-parse HEAD` = ${LIBEXPAT_HASH}) || exit 1
- # unbound
- git clone https://github.com/NLnetLabs/unbound.git -b ${LIBUNBOUND_VERSION} --depth=1
- (cd unbound && test `git rev-parse HEAD` = ${LIBUNBOUND_HASH}) || exit 1
- # polyseed
- git clone https://github.com/tevador/polyseed.git
- (cd polyseed && git reset --hard ${POLYSEED_HASH}) || exit 1
- # utf8proc
- git clone https://github.com/JuliaStrings/utf8proc -b v2.8.0 --depth=1
- (cd utf8proc && git reset --hard ${UTF8PROC_HASH})
-
-
-# This is just a suggestion of the steps, you should figure on your own what is required
-# and what's not.
-# A general rule of thumb is that `make depends_host` works everywhere, but not everything
-# is required. But since we target so many different OS.. yeah.
-.PHONY: depends_host
-depends_host: libiconv_host boost_host zlib_host openssl_host openssl_host_alt libzmq_host libsodium_host host_copy_libs libexpat_host unbound_host polyseed_host utf8proc_host host_copy_libs
-
-.PHONY: host_copy_libs
-host_copy_libs:
- -cp -a ${PREFIX}/lib64/* ${PREFIX}/lib # fix linking issue (openssl?)
- -mkdir -p ${PREFIX}/openssl/lib
- -cp -a ${PREFIX}/openssl/lib64/* ${PREFIX}/openssl/lib # fix linking issue (openssl?)
-
-.PHONY: host_move_libs
-host_move_libs:
- -cp -a ${PREFIX}/lib64/* ${PREFIX}/lib # fix linking issue (openssl?)
- -rm -rf ${PREFIX}/lib64/*
-
-.PHONY: libiconv_host
-libiconv_host:
- cd libiconv-${ICONV_VERSION} && ./configure --prefix=${PREFIX} --host=${HOST} --disable-rpath
- cd libiconv-${ICONV_VERSION} && make -j${NPROC}
- cd libiconv-${ICONV_VERSION} && make install
-
-.PHONY: boost_host
-boost_host:
- cd boost_${BOOST_VERSION} && echo '' | cat - ./boost/thread/pthread/thread_data.hpp > temp && mv temp ./boost/thread/pthread/thread_data.hpp
- cd boost_${BOOST_VERSION} && echo '#define PTHREAD_STACK_MIN 16384' | cat - ./boost/thread/pthread/thread_data.hpp > temp && mv temp ./boost/thread/pthread/thread_data.hpp
- cd boost_${BOOST_VERSION} && echo '#undef PTHREAD_STACK_MIN'| cat - ./boost/thread/pthread/thread_data.hpp > temp && mv temp ./boost/thread/pthread/thread_data.hpp
- cd boost_${BOOST_VERSION} && echo '' | cat - ./boost/thread/pthread/thread_data.hpp > temp && mv temp ./boost/thread/pthread/thread_data.hpp
- cd boost_${BOOST_VERSION} && ./bootstrap.sh --prefix=${PREFIX} --with-toolset=${BOOST_TOOLSET}
- cd boost_${BOOST_VERSION} && ./b2 cxxflags=-fPIC cflags=-fPIC --build-type=minimal link=static runtime-link=static --with-chrono --with-date_time --with-filesystem --with-program_options --with-regex --with-serialization --with-system --with-thread --with-locale --build-dir=linux --stagedir=linux toolset=${BOOST_TOOLSET} threading=multi threadapi=pthread -sICONV_PATH=${PREFIX} install -j${NPROC}
-
-.PHONY: zlib_host
-zlib_host:
- cd zlib && ./configure --static --prefix=${PREFIX}
- cd zlib && make -j${NPROC}
-
-.PHONY: openssl_host
-openssl_host:
- cd openssl-${OPENSSL_VERSION} && env PATH="${PREFIX}/perl/bin/:${PATH}" ./Configure ${OPENSSL_TARGET} -static no-shared no-tests --with-zlib-include=${PREFIX}/zlib/include --with-zlib-lib=${PREFIX}/zlib/lib --prefix=${PREFIX} --openssldir=${PREFIX} -fPIC
- cd openssl-${OPENSSL_VERSION} && make -j${NPROC}
- cd openssl-${OPENSSL_VERSION} && make install_sw
-
-.PHONY: openssl_host_alt
-openssl_host_alt:
- cd openssl-${OPENSSL_VERSION} && env PATH="${PREFIX}/perl/bin/:${PATH}" ./Configure ${OPENSSL_TARGET} -static no-shared no-tests --with-zlib-include=${PREFIX}/zlib/include --with-zlib-lib=${PREFIX}/zlib/lib --prefix=${PREFIX}/openssl --openssldir=${PREFIX}/openssl -fPIC
- cd openssl-${OPENSSL_VERSION} && make -j${NPROC}
- cd openssl-${OPENSSL_VERSION} && make install_sw
-
-.PHONY: libzmq_host
-libzmq_host:
- rm -rf libzmq/build || true
- cd libzmq && ./autogen.sh
- cd libzmq && mkdir build
- cd libzmq/build && cmake -DCMAKE_INSTALL_PREFIX=${PREFIX} -DBUILD_SHARED=OFF -DBUILD_TESTS=OFF ..
- cd libzmq/build && make -j${NPROC}
- cd libzmq/build && make install
-
-.PHONY: libsodium_host
-libsodium_host:
- cd libsodium && ./autogen.sh
- cd libsodium && ./configure --prefix=${PREFIX} --enable-static --disable-shared --with-pic
- cd libsodium && make -j${NPROC}
- cd libsodium && make install
-
-.PHONY: libexpat_host
-libexpat_host:
- cd libexpat/expat && CC=${CC} CXX=${CXX} LDFLAGS="-L${PREFIX}/lib64/" ./buildconf.sh
- cd libexpat/expat && CC=${CC} CXX=${CXX} LDFLAGS="-L${PREFIX}/lib64/" ./configure --prefix=${PREFIX} --enable-static --disable-shared
- cd libexpat/expat && make -j${NPROC}
- cd libexpat/expat && make install
-
-.PHONY: unbound_host
-unbound_host:
- cd unbound && CC=${CC} CXX=${CXX} LDFLAGS="-L${PREFIX}/lib64/" ./configure -with-pic --prefix=${PREFIX} --enable-static --disable-shared --disable-flto --with-libexpat=${PREFIX} --with-ssl=${PREFIX}/openssl
- cd unbound && make -j${NPROC}
- cd unbound && make install
-
-.PHONY: polyseed_host
-polyseed_host:
- cd polyseed && rm -rf ./CMakeCache.txt ./CMakeFiles/
- cd polyseed && cmake -DCMAKE_INSTALL_PREFIX=${PREFIX} .
- cd polyseed && make -j${NPROC}
- cd polyseed && make install
-
-.PHONY: utf8proc_host
-utf8proc_host:
- cd utf8proc && rm -rf build || true
- cd utf8proc && mkdir build
- cd utf8proc/build && rm -rf ../CMakeCache.txt ../CMakeFiles/ || true
- cd utf8proc/build && cmake -DCMAKE_INSTALL_PREFIX=${PREFIX} ..
- cd utf8proc/build && make -j${NPROC}
- cd utf8proc/build && make install
-
-.PHONY: monero_linux_amd64
-monero_linux_amd64:
- cd monero \
- && rm -rf build/release \
- && mkdir -p build/release \
- && cd build/release \
- && env CMAKE_INCLUDE_PATH="${PREFIX}/include" CMAKE_LIBRARY_PATH="${PREFIX}/lib" USE_SINGLE_BUILDDIR=1 cmake -D USE_DEVICE_TREZOR=OFF -D BUILD_GUI_DEPS=1 -D BUILD_TESTS=OFF -D ARCH="x86-64" -D STATIC=ON -D BUILD_64="ON" -D CMAKE_BUILD_TYPE=release -D ANDROID=false -D BUILD_TAG="linux-x86_64" -D CMAKE_SYSTEM_NAME="Linux" ../..
- cd monero/build/release && make wallet_api -j${NPROC}
-
-
-.PHONY: monero_linux_arm64
-monero_linux_arm64:
- cd monero \
- && rm -rf build/release \
- && mkdir -p build/release \
- && cd build/release \
- && env CMAKE_INCLUDE_PATH="${PREFIX}/include" CMAKE_LIBRARY_PATH="${PREFIX}/lib" USE_SINGLE_BUILDDIR=1 cmake -D USE_DEVICE_TREZOR=OFF -D BUILD_GUI_DEPS=1 -D BUILD_TESTS=OFF -D ARCH="armv8-a" -D STATIC=ON -D BUILD_64="ON" -D CMAKE_BUILD_TYPE=release -D ANDROID=false -D BUILD_TAG="linux-armv8a" -D CMAKE_SYSTEM_NAME="Linux" ../..
- cd monero/build/release && make wallet_api -j${NPROC}
-
-.PHONY: moneroc_linux_host64
-moneroc_linux_host64:
- rm -rf libbridge/build || true
- mkdir -p libbridge/build
- cd libbridge/build && env CC=${CC} CXX=${CXX} cmake -DANDROID_ABI=linux-x86_64 ..
- cd libbridge/build && make -j${NPROC}
-
-
-# Fixed
-
-.PHONY: host_tool_perl
-host_tool_perl:
- rm -rf perl-* || true
- curl -O https://www.cpan.org/src/${PERL_VERSION_MAJOR}/perl-${PERL_VERSION_FULL}.tar.gz
- echo "${PERL_HASH} perl-${PERL_VERSION_FULL}.tar.gz" | sha256sum -c
- tar xzf perl-${PERL_VERSION_FULL}.tar.gz
- rm perl-${PERL_VERSION_FULL}.tar.gz
- cd perl-${PERL_VERSION_FULL} && ./Configure -des -Dprefix=${PREFIX}/perl
- cd perl-${PERL_VERSION_FULL} && make -j${NPROC}
- cd perl-${PERL_VERSION_FULL} && make install
-
-#
-
-.PHONY: alpine_fix_libexecinfo
-alpine_fix_libexecinfo:
- echo | abuild-keygen -a -q
- cd external/alpine/libexecinfo && abuild -F -r
- apk add --allow-untrusted $(shell find ${HOME}/packages -name '*libexecinfo*.apk') \ No newline at end of file
diff --git a/README.md b/README.md
index 25551fd..d4c34bc 100644
--- a/README.md
+++ b/README.md
@@ -2,15 +2,10 @@
> Wrapper around wallet2_api.h that can be called using C api.
+[![status-badge](https://ci.mrcyjanek.net/api/badges/5/status.svg?branch=rewrite-wip)](https://ci.mrcyjanek.net/repos/5/branches/rewrite-wip)
+
## Contributing
To contribute you can visit git.mrcyjanek.net/mrcyjanek/monero_c and open a PR, alternatively use any other code mirror or send patches directly.
-**IMPORTANT** I don't have time to write better README, please check Makefile for build instructions, in general it comes down to:
-
-```bash
-$ make download
-$ make host_depends
-$ make monero_linux_amd64 # or else, depending on your OS/arch
-$ make moneroc_linux_amd64 # or else, depending on your OS/arch
-``` \ No newline at end of file
+**IMPORTANT** I don't have time to write better README, please check `build_single.sh` for build instructions, in general it comes down to \ No newline at end of file