Revised README and Build System

This commit is contained in:
Emil 2023-08-07 08:33:32 -06:00
parent 66da51c73f
commit 919aaac276
No known key found for this signature in database
GPG Key ID: 5432DB986FDBCF8A
5 changed files with 24 additions and 25 deletions

View File

@ -23,13 +23,8 @@ ifdef SAN
CFLAGS += -fsanitize=${SAN}
endif
ifeq (${NO_VULN},1)
CPPFLAGS += -DNO_VULN_COMMANDS
endif
ifeq (${ENABLE_SSL},1)
LDLIBS += -lssl -lcrypto
CPPFLAGS += -DIRC_SSL_SUPPORT
endif
all: include/config.h ${PROGN}
@ -40,9 +35,6 @@ ${PROGN}: ${HDR} ${SRC}
# do nothing but update them...
${SRC} ${HDR}:
submodules:
git submodule update --init --recursive
include/config.h: config.mk.h
cp -f $< $@

View File

@ -3,30 +3,30 @@
Healthy for your coding ability, take once weekly, excessive doses
may result in arthritis, ass pain, and death.
Only for real chads, goto irc.rizon.net/#/g/chad for first-hand
enjoyment of the one and only probotic and to yell at the developers.
* Description
This bot will let you be delagated with challenges at dates within
it's database, this can all be done via the IRC interface.
Prints useful challenges when requested.
See doc/api.md for detailed information about this interface.
* Building and Installation
First, you'll want specify your server and channel as well as bot username
and a password. This can be done either with command-line options or in a
specified credentials file.
Building requires (debian derived):
libsqlite3-dev build-essentials
You can simply run install.sh to build and install this project. See the
Makefile for specific build options, I highly recommend NVULN=1 for all
non-developmental deployments.
** Submodules
git submodule update --init --recursive
make -C lib/libircclient
This'll require a few libraries:
libircclient-dev libsqlite3-dev build-essentials
** Configuration (Optional but highly recommended)
make include/config.h && $EDITOR include/config.h
* Hosting
** Building and Installation
make && BOOTSTRAP_ONLY=1 ./install.sh
remove BOOTSTRAP_ONLY=1 if you plan to install this somewhere.
* Source Code Hosts
https://git.lain.church/emil/probotic
https://bis64wqhh3louusbd45iyj76kmn4rzw5ysawyan5bkxwyzihj67c5lid.onion/emil/probotic

View File

@ -1 +1,7 @@
#define DBFILE "probotic_data.sqlite"
/* Disables vulnerable commands */
/* #define NO_VULN_COMMANDS */
/* Enables SSL support */
/* #define IRC_SSL_SUPPORT */

7
install.sh Normal file → Executable file
View File

@ -7,9 +7,10 @@ TARGET=${TARGET-/opt/probotic}
DIR=$(dirname $(readlink -f "$0"))
cd $DIR
# BUILD & BOOTSTRAP
make -C $DIR DEBUG=0 NVULN=1 || exit 1
$DIR/bootstrap/bootstrap.sh || exit 1
# BOOTSTRAP
cd $DIR/bootstrap && ./bootstrap.sh || exit 1
cd ..;
[ "$BOOTSTRAP_ONLY" = 1 ] && exit 0
# INSTALL
mkdir -p $TARGET

0
uninstall.sh Normal file → Executable file
View File