diff --git a/build/make/calibre.mk b/build/make/calibre.mk new file mode 100644 index 0000000..d8fc5d5 --- /dev/null +++ b/build/make/calibre.mk @@ -0,0 +1,3 @@ +calibre: base + $(call script,$@) + $(call runit,$@) \ No newline at end of file diff --git a/build/runit/calibre b/build/runit/calibre new file mode 100644 index 0000000..ff381db --- /dev/null +++ b/build/runit/calibre @@ -0,0 +1,3 @@ +#!/bin/bash +set -e +/usr/bin/calibre-server --with-library=$CALIBRE_LIBRARY > $CALIBRE_LOG \ No newline at end of file diff --git a/build/scripts/calibre.sh b/build/scripts/calibre.sh new file mode 100644 index 0000000..3f5ad46 --- /dev/null +++ b/build/scripts/calibre.sh @@ -0,0 +1,10 @@ +## Configuration +export_env CALIBRE_LIBRARY /host/calibre/library +export_env CALIBRE_LOG /host/calibre.log + +## Dependencies +apt_install_permanent python-qt4 xz-utils xdg-utils imagemagick + +## Calibre +cd /opt +PYTHONIOENCODING="utf-8" wget -nv -O- https://raw.githubusercontent.com/kovidgoyal/calibre/master/setup/linux-installer.py | python -c "import sys; main=lambda:sys.stderr.write('Download failed\n'); exec(sys.stdin.read()); main()" \ No newline at end of file