Deploy germinal #15
6 changed files with 41 additions and 11 deletions
Provide working make and make install
commit
fbe834803d
26
Makefile
Normal file
26
Makefile
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
bin/germinal: *lisp *asd
|
||||||
|
CL_SOURCE_REGISTRY=$(realpath $(dir germinal.asd)) sbcl --non-interactive \
|
||||||
|
--eval '(ql:quickload :germinal)' \
|
||||||
|
--eval '(asdf:make :germinal)'
|
||||||
|
|
||||||
|
.PHONY: clean
|
||||||
|
clean:
|
||||||
|
rm -rf bin/
|
||||||
|
|
||||||
|
PREFIX = /usr/local
|
||||||
|
.PHONY: install
|
||||||
|
install: bin/germinal
|
||||||
|
install -d $(PREFIX)/lib/germinal
|
||||||
|
install bin/* $(PREFIX)/lib/germinal
|
||||||
|
echo "#!/bin/sh\ncd $(PREFIX)/lib/germinal && exec ./germinal \$$@" \
|
||||||
|
> $(PREFIX)/bin/germinal
|
||||||
|
chmod +x $(PREFIX)/bin/germinal
|
||||||
|
install -m 644 germinal.service /etc/systemd/system/
|
||||||
|
install -d /etc/germinal
|
||||||
|
cp --no-clobber config.toml /etc/germinal/
|
||||||
|
install -d /var/gemini
|
||||||
|
|
||||||
|
.PHONY: uninstall
|
||||||
|
uninstall:
|
||||||
|
rm -f -- $(PREFIX)/bin/germinal /etc/systemd/system/germinal.service
|
||||||
|
rm -rf -- $(PREFIX)/lib/germinal
|
||||||
|
|
@ -30,8 +30,8 @@ that Germinal shares some sounds with Gemini.
|
||||||
|
|
||||||
This is still a bit of a hack, and if you don't have a working Common Lisp
|
This is still a bit of a hack, and if you don't have a working Common Lisp
|
||||||
development environment, you will probably have trouble getting it running.
|
development environment, you will probably have trouble getting it running.
|
||||||
The included ~build.sh~ will build a single executable, but unfortunately it
|
You can build and install Germinal using SBCL with:
|
||||||
depends on a shared library that will be somewhere in your ~/.cache folder...
|
~make && sudo make install~
|
||||||
|
|
||||||
Germinal has been tested on SBCL and ECL. It runs fine on both, but I haven't
|
Germinal has been tested on SBCL and ECL. It runs fine on both, but I haven't
|
||||||
been able to build a working binary distribution on ECL.
|
been able to build a working binary distribution on ECL.
|
||||||
|
|
@ -46,7 +46,7 @@ that Germinal shares some sounds with Gemini.
|
||||||
will be run from. This will improve in the future when I write the
|
will be run from. This will improve in the future when I write the
|
||||||
configuration parts. You can generate the cert like this:
|
configuration parts. You can generate the cert like this:
|
||||||
|
|
||||||
~openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes~
|
~openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes -subj '/CN=HOSTNAME'~
|
||||||
|
|
||||||
|
|
||||||
** Usage
|
** Usage
|
||||||
|
|
|
||||||
7
build.sh
7
build.sh
|
|
@ -1,7 +0,0 @@
|
||||||
#!/bin/sh
|
|
||||||
sbcl --non-interactive \
|
|
||||||
--load germinal.asd \
|
|
||||||
--eval '(ql:quickload :germinal)' \
|
|
||||||
--eval '(asdf:make :germinal)'
|
|
||||||
gzexe germinal
|
|
||||||
rm -f germinal~
|
|
||||||
|
|
@ -26,7 +26,9 @@
|
||||||
(:file "server")
|
(:file "server")
|
||||||
)
|
)
|
||||||
:description "A Gemini protocol server."
|
:description "A Gemini protocol server."
|
||||||
:build-operation "program-op"
|
|
||||||
:build-pathname "germinal"
|
:build-pathname "germinal"
|
||||||
:entry-point "germinal:start-cli"
|
:entry-point "germinal:start-cli"
|
||||||
|
|
||||||
|
:defsystem-depends-on (:deploy)
|
||||||
|
:build-operation "deploy-op"
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,8 @@ ProtectSystem=full
|
||||||
ProtectHome=yes
|
ProtectHome=yes
|
||||||
ProtectDevices=yes
|
ProtectDevices=yes
|
||||||
|
|
||||||
|
SystemCallFilter=@system-service
|
||||||
|
SystemCallErrorNumber=EPERM
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,13 @@
|
||||||
|
|
||||||
;;; Package-level things
|
;;; Package-level things
|
||||||
(in-package :germinal)
|
(in-package :germinal)
|
||||||
|
|
||||||
|
;;; Use system libraries
|
||||||
|
(deploy:define-library cl+ssl::libssl
|
||||||
|
:dont-deploy t)
|
||||||
|
(deploy:define-library osicat-posix::librt
|
||||||
|
:dont-deploy t)
|
||||||
|
|
||||||
(interpol:enable-interpol-syntax)
|
(interpol:enable-interpol-syntax)
|
||||||
|
|
||||||
(defvar *germinal-server-name* "localhost")
|
(defvar *germinal-server-name* "localhost")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue