2017-12-04 16:32:37 -06:00
|
|
|
CONFDIR = ${pkgdir}/usr/local/etc/TheRaven
|
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
|
|
|
|
|
|
|
clean:
|
2016-12-04 19:55:52 -06:00
|
|
|
for i in raven.mono; do if [ -f $$i ]; then rm $$i; fi; done
|
2016-08-04 11:08:14 -05:00
|
|
|
|
2016-09-27 10:33:41 -05:00
|
|
|
test: compile
|
2020-09-10 16:20:40 -05:00
|
|
|
cd ./sample-confs; mono ../raven.mono -c sample.conf -v -h
|
2016-08-04 11:08:14 -05:00
|
|
|
|
2018-10-16 17:41:39 -05:00
|
|
|
install: compile
|
2017-12-04 16:32:37 -06:00
|
|
|
mkdir -p ${pkgdir}/opt
|
|
|
|
cp raven.mono ${pkgdir}/opt/raven.mono
|
|
|
|
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
|
|
|
|
2017-12-04 16:32:37 -06:00
|
|
|
reverse: ${pkgdir}/usr/lib/systemd/system/raven.service
|
|
|
|
cp ${pkgdir}/usr/lib/systemd/system/raven.service .
|
2016-09-27 10:33:41 -05:00
|
|
|
|
2017-12-04 16:32:37 -06:00
|
|
|
checkperm: ${pkgdir}/opt/raven.mono
|
2020-11-24 12:52:50 -06:00
|
|
|
if ! id raven; then sudo useradd raven; echo User raven added; fi
|
2017-12-04 16:32:37 -06:00
|
|
|
chown -R raven:raven ${pkgdir}/opt/raven.mono ${CONFDIR}*
|
|
|
|
chmod 0600 ${pkgdir}/opt/raven.mono ${CONFDIR}*/*
|
2016-09-27 10:33:41 -05:00
|
|
|
chmod 0700 ${CONFDIR}*
|
|
|
|
|
2017-12-04 16:32:37 -06:00
|
|
|
diff:
|
|
|
|
diff ./raven.service ${pkgdir}/usr/lib/systemd/system/raven.service
|
|
|
|
diff ./sample.conf ${pkgdir}/usr/local/etc/TheRaven/raven.conf
|