Skip to content

Commit

Permalink
Add full anope build steps
Browse files Browse the repository at this point in the history
  • Loading branch information
linuxdaemon committed Feb 27, 2024
1 parent f7a83fa commit 4def5bc
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 6 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,13 @@ jobs:
wget -O - "https://codeload.github.com/snoonetIRC/anope-modules/tar.gz/master" | tar xz
- name: Build Anope ${{matrix.version}}
run: bash anope-install.sh ${{matrix.version}}
run: |
bash anope-install.sh ${{matrix.version}}
ls -la "anope-${{matrix.version}}"
- name: Archive Artifacts
working-directory: run
run: tar cvzf ../anope.${{matrix.version}}.${{matrix.os}}.tar.gz ./*
working-directory: anope-${{matrix.version}}/services
run: tar cvzf ../../anope.${{matrix.version}}.${{matrix.os}}.tar.gz ./*

- name: Upload archives
uses: actions/upload-artifact@v4
Expand Down
45 changes: 42 additions & 3 deletions anope-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,50 @@
set -e

BASE_DIR=$(dirname "$(readlink -f "${BASH_SOURCE[0]}")")

add_snoonet_module() {
ln -s "$PWD/anope-modules-master/modules/$1" "$PWD/modules/third/$1"
}

add_vendor_extra() {
pushd "$PWD/modules" || exit 1
ln -s "extra/$1" "$1"
popd || exit 1
}

install_extras() {
add_snoonet_module 'hs_reghost.cpp'
add_snoonet_module 'os_server_news.cpp'
add_snoonet_module 'm_store_server.cpp'
add_snoonet_module 'm_eventlog.cpp'
add_snoonet_module 'json_api.h'
add_snoonet_module 'mail_template.h'
add_snoonet_module 'snoo_types.h'
add_snoonet_module 'm_token_auth.h'
add_snoonet_module 'm_register_api'

add_vendor_extra 'm_mysql.cpp'
add_vendor_extra 'm_ssl_gnutls.cpp'
add_vendor_extra 'm_ssl_openssl.cpp'
add_vendor_extra 'm_regex_posix.cpp'
add_vendor_extra 'm_regex_pcre.cpp'
}

install() {
local version="$1"
cd "anope-$version" || exit 1
ls -la
return
local version_name="anope-${version}"
cd "${BASE_DIR:?}/${version_name}" || exit 1
install_extras
cat << EOF > config.cache
UMASK=022
EOF

install_extras

export CXXFLAGS="-std=c++11"
./Config -nointro -quick
cd build || exit 1
make --jobs "$(nproc)" && make install
}

VERSION="${1?No install version specified, exiting...}"
Expand Down

0 comments on commit 4def5bc

Please sign in to comment.