summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilhelm Schuster2021-02-22 11:47:45 +0100
committerWilhelm Schuster2021-02-22 12:12:15 +0100
commite256b8aeae52a4888bacd05eec9478a0ece13381 (patch)
tree14a664f05ca680b8896aa55cbc62fcedfce2665f
downloadaur-e256b8aeae52a4888bacd05eec9478a0ece13381.tar.gz
Initial commit
-rw-r--r--.SRCINFO27
-rw-r--r--PKGBUILD40
-rw-r--r--moonraker-klipper.cfg7
-rw-r--r--moonraker.conf49
-rw-r--r--moonraker.service15
-rw-r--r--tmpfiles.conf1
6 files changed, 139 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..ba03c633585d
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,27 @@
+pkgbase = moonraker-git
+ pkgdesc = HTTP frontend for Klipper 3D printer firmware
+ pkgver = r396.1f61357
+ pkgrel = 1
+ url = https://github.com/Arksine/moonraker
+ arch = any
+ license = GPLv3
+ depends = klipper
+ depends = python-tornado
+ depends = python-pillow
+ depends = python-pyserial
+ depends = libgpiod
+ provides = moonraker
+ conflicts = moonraker
+ source = git+https://github.com/Arksine/moonraker.git#branch=master
+ source = moonraker.conf
+ source = moonraker.service
+ source = tmpfiles.conf
+ source = moonraker-klipper.cfg
+ sha256sums = SKIP
+ sha256sums = 356dc03a6119adc088f3feacc0a7d7f52d2f569e6189b12263b9baf69a47a1d3
+ sha256sums = 120c85c212ec57c1365e3e94f9d38ba9a5d9bd57e76692733e7cd8fe167afff0
+ sha256sums = d6b0dbe53e9e53d2dc0bb156ac9bf2700f0daae63436e4889749de1f2e111738
+ sha256sums = c532d594c92404820d6cdb8407420a7f9bb65e05d8fdbc2db498f940bb3ffcc3
+
+pkgname = moonraker-git
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..989d3799f32b
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,40 @@
+# Maintainer: Wilhelm Schuster <aur [aT] rot13 dot io>
+pkgname=moonraker-git
+pkgver=r396.1f61357
+pkgrel=1
+pkgdesc="HTTP frontend for Klipper 3D printer firmware"
+arch=(any)
+url="https://github.com/Arksine/moonraker"
+license=('GPLv3')
+depends=(klipper
+ python-tornado
+ python-pillow
+ python-pyserial
+ libgpiod)
+provides=("${pkgname%-git}")
+conflicts=("${pkgname%-git}")
+source=('git+https://github.com/Arksine/moonraker.git#branch=master' 'moonraker.conf' 'moonraker.service' 'tmpfiles.conf' 'moonraker-klipper.cfg')
+sha256sums=('SKIP'
+ '356dc03a6119adc088f3feacc0a7d7f52d2f569e6189b12263b9baf69a47a1d3'
+ '120c85c212ec57c1365e3e94f9d38ba9a5d9bd57e76692733e7cd8fe167afff0'
+ 'd6b0dbe53e9e53d2dc0bb156ac9bf2700f0daae63436e4889749de1f2e111738'
+ 'c532d594c92404820d6cdb8407420a7f9bb65e05d8fdbc2db498f940bb3ffcc3')
+
+pkgver() {
+ cd "$srcdir/${pkgname%-git}"
+
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
+
+package() {
+ cd "$srcdir/${pkgname%-git}"
+
+ install -dm755 "$pkgdir/etc/moonraker"
+ install -Dm644 "$srcdir/moonraker.conf" "$pkgdir/etc/klipper/moonraker.conf"
+ install -Dm644 "$srcdir/moonraker.service" "$pkgdir/usr/lib/systemd/system/moonraker.service"
+ install -Dm644 "$srcdir/tmpfiles.conf" "$pkgdir/usr/lib/tmpfiles.d/moonraker.conf"
+ install -Dm644 "$srcdir/moonraker-klipper.cfg" "$pkgdir/usr/share/doc/moonraker/moonraker-klipper.cfg"
+
+ install -dm755 "$pkgdir/opt/moonraker"
+ GLOBIGNORE=.git cp -r * "$pkgdir/opt/moonraker"
+}
diff --git a/moonraker-klipper.cfg b/moonraker-klipper.cfg
new file mode 100644
index 000000000000..685cf17e0713
--- /dev/null
+++ b/moonraker-klipper.cfg
@@ -0,0 +1,7 @@
+[pause_resume]
+
+[display_status]
+
+[virtual_sdcard]
+path: /var/lib/moonraker/gcode
+
diff --git a/moonraker.conf b/moonraker.conf
new file mode 100644
index 000000000000..9a1d16fd23a1
--- /dev/null
+++ b/moonraker.conf
@@ -0,0 +1,49 @@
+[server]
+# The host address in which to bind the HTTP server.
+host: 127.0.0.1
+# The port the HTTP server will listen on.
+port: 7125
+# The address of Unix Domain Socket used to communicate with Klipper.
+klippy_uds_address: /run/klipper/ud_sock
+# The maximum size allowed for a file upload.
+#max_upload_size: 200
+# When set to True Moonraker will log in verbose mode. During this stage
+# of development the default is True. In the future this will change.
+enable_debug_logging: True
+# The path to a directory where configuration files are located. This
+# directory may contain Klipper config files (printer.cfg) or Moonraker
+# config files (moonraker.conf). Clients may also write their own config
+# files to this directory. Note that this may not be the system root
+# (ie: "/") and moonraker must have read and write access permissions
+# for this directory.
+config_path: /etc/klipper
+# The maximum number of temperature values to store for each sensor. Note
+# that this value also applies to the "target", "power", and "fan_speed"
+# if the sensor reports them. The default is 1200, which is enough to
+# store approximately 20 minutes of data at one value per second.
+#temperature_store_size: 1200
+# The maximum number "gcode lines" to store.
+#gcode_store_size: 1000
+
+[authorization]
+# Enables authorization. When set to true, requests must either contain
+# a valid API key or originate from a trusted client.
+enabled: False
+# Path of the file that stores Moonraker's API key.
+api_key_file: /etc/klipper/moonraker_api_key
+# A list of newline separated ip addresses and/or ip ranges that are
+# trusted. Trusted clients are given full access to the API. Both IPv4
+# and IPv6 addresses and ranges are supported. Ranges must be expressed
+# in CIDR notation (see http://ip.sb/cidr for more info). For example, an
+# entry of 192.168.1.0/24 will authorize IPs in the range of 192.168.1.1 -
+# 192.168.1.254. Note that when specifying IPv4 ranges the last segment
+# of the ip address must be 0. The default is no clients or ranges are
+# trusted.
+#trusted_clients:
+# 192.168.1.30
+# 192.168.1.0/24
+# Enables CORS for the specified domains. One may specify * if they wish
+# to allow all domains.
+#cors_domains:
+# http://klipper-printer.local
+# http://second-printer.local:7125
diff --git a/moonraker.service b/moonraker.service
new file mode 100644
index 000000000000..804df72c5c55
--- /dev/null
+++ b/moonraker.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=Moonraker Klipper HTTP Server
+Requires=klipper.service
+After=network.target klipper.service
+
+[Service]
+Type=simple
+User=klipper
+RemainAfterExit=yes
+ExecStart=/usr/bin/python /opt/moonraker/moonraker/moonraker.py -c /etc/klipper/moonraker.conf -n
+Restart=always
+RestartSec=10
+
+[Install]
+WantedBy=multi-user.target
diff --git a/tmpfiles.conf b/tmpfiles.conf
new file mode 100644
index 000000000000..7143f33d36fb
--- /dev/null
+++ b/tmpfiles.conf
@@ -0,0 +1 @@
+d /var/lib/moonraker/gcode 0644 klipper klipper - -