geml/Makefile

45 lines
960 B
Makefile

bin/geml-server: src/*.lisp
mkdir -p bin
sbcl --no-userinit --no-sysinit --non-interactive \
--load ~/.quicklisp/setup.lisp \
--load build.lisp
clean:
-rm bin/geml-server
-rm bin/
install: bin/geml-server
id -u geml &>/dev/null || useradd geml --system -g geml
install \
--target-directory /usr/local/bin/ \
--mode 744 \
--owner geml \
--group geml \
bin/geml-server
install \
--target-directory /etc/systemd/system/ \
--mode 644 \
--owner geml \
--group geml \
geml.service
mkdir -p /etc/geml/
chown geml:geml /etc/geml
install \
--target-directory /etc/geml/ \
--owner geml \
--group geml \
--mode 664 \
geml.example.ini
mkdir -p /var/lib/geml
chown -R geml:geml /var/lib/geml
chmod 770 /var/lib/geml
mkdir -p /srv/gmi
chown -R geml:geml /srv/gmi
chmod 770 /srv/gmi
uninstall:
id -u geml &>/dev/null && userdel geml
rm /usr/local/bin/geml-server
rm /etc/systemd/system/geml.service
rm -rf /etc/geml/