2017-12-04 16:32:37 -06:00
|
|
|
CONFDIR = ${pkgdir}/usr/local/etc/TheRaven
|
2023-10-14 13:33:51 -05:00
|
|
|
INSTALLDIR = ${pkgdir}/opt/aninix/TheRaven
|
|
|
|
SCRIPTS != ls -1 *.bash
|
2016-09-27 10:33:41 -05:00
|
|
|
|
2020-09-10 16:20:40 -05:00
|
|
|
compile: clean ./chatbot-support.bash ./math-support.bash
|
|
|
|
(mcs -out:raven.mono /opt/aninix/Uniglot/CSharp/*.csharp *.csharp Raven.csharp 2>&1 | grep -v CS2002); printf ""
|
2016-08-04 11:08:14 -05:00
|
|
|
|
2018-10-16 17:41:39 -05:00
|
|
|
install: compile
|
2023-10-14 13:33:51 -05:00
|
|
|
source $$PWD/installscript && pre_install || true
|
|
|
|
install -o raven -g raven -m 0750 -d ${INSTALLDIR}
|
|
|
|
for script in ${SCRIPTS} raven.mono; do install -o raven -g raven -m 0640 $$script ${INSTALLDIR}; done
|
2017-12-04 16:32:37 -06:00
|
|
|
if [ ! -d ${CONFDIR} ]; then mkdir -p ${CONFDIR}; cp sample-confs/* ${CONFDIR}; fi
|
2017-02-08 19:26:13 -06:00
|
|
|
# Hook to deprivilege bot
|
2016-09-27 10:33:41 -05:00
|
|
|
make checkperm
|
2017-02-08 19:26:13 -06:00
|
|
|
# Hook for Systemd
|
2017-12-04 16:32:37 -06:00
|
|
|
mkdir -p ${pkgdir}/usr/lib/systemd/system/
|
2020-09-10 16:20:40 -05:00
|
|
|
cp ./raven.service ${pkgdir}/usr/lib/systemd/system/raven.service
|
2016-09-27 10:33:41 -05:00
|
|
|
|
2024-04-08 00:00:47 -05:00
|
|
|
clean:
|
|
|
|
for i in raven.mono; do if [ -f $$i ]; then rm $$i; fi; done
|
|
|
|
|
|
|
|
uninstall:
|
|
|
|
rm -Rf ${INSTALLDIR} ${CONFDIR}
|
|
|
|
systemctl disable --now raven.service
|
|
|
|
rm /usr/lib/systemd/system/raven.service
|
|
|
|
|
|
|
|
test: compile
|
|
|
|
cd ./sample-confs; mono ../raven.mono -c sample.conf -v -h
|
2016-09-27 10:33:41 -05:00
|
|
|
|
2023-10-14 13:33:51 -05:00
|
|
|
checkperm: ${INSTALLDIR}/raven.mono
|
|
|
|
chown -R raven:raven ${INSTALLDIR} ${CONFDIR}
|
|
|
|
chmod 0600 ${INSTALLDIR}/* ${CONFDIR}/*
|
|
|
|
chmod 0700 ${CONFDIR} ${INSTALLDIR}
|
2016-09-27 10:33:41 -05:00
|
|
|
|
2024-04-08 00:00:47 -05:00
|
|
|
diff:
|
2017-12-04 16:32:37 -06:00
|
|
|
diff ./raven.service ${pkgdir}/usr/lib/systemd/system/raven.service
|
|
|
|
diff ./sample.conf ${pkgdir}/usr/local/etc/TheRaven/raven.conf
|
2024-04-08 00:00:47 -05:00
|
|
|
|
|
|
|
reverse: /usr/lib/systemd/system/raven.service /usr/local/etc/TheRaven
|
|
|
|
cp /usr/lib/systemd/system/raven.service .
|
|
|
|
cp ${INSTALLDIR}/*.bash .
|