diff options
-rw-r--r-- | .SRCINFO | 45 | ||||
-rw-r--r-- | PKGBUILD | 63 | ||||
-rwxr-xr-x | octoprint.install | 22 | ||||
-rw-r--r-- | octoprint.service | 13 | ||||
-rw-r--r-- | pipFix.patch | 11 |
5 files changed, 154 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO new file mode 100644 index 000000000000..8eccd693a5d6 --- /dev/null +++ b/.SRCINFO @@ -0,0 +1,45 @@ +pkgbase = octoprint-devel-git + pkgdesc = OctoPrint provides a responsive web interface for controlling a 3D printer (RepRap, Ultimaker, ...) + pkgver = 1.1.2.r793.g106b21f + pkgrel = 1 + url = https://github.com/foosel/OctoPrint + install = octoprint.install + arch = i686 + arch = x86_64 + arch = armv6 + arch = armv6h + license = GPL + makedepends = git + depends = python2-flask + depends = python2-werkzeug + depends = python2-tornado + depends = python2-sockjs-tornado-git + depends = python2-yaml + depends = python2-flask-login + depends = python2-flask-principal + depends = python2-flask-babel + depends = python2-pyserial + depends = python2-netaddr + depends = python2-watchdog + depends = python2-sarge + depends = python2-netifaces + depends = python2-pylru + depends = python2-rsa + depends = python2-pkginfo + depends = python2-requests + depends = python2-semantic-version + optdepends = ffmpeg: timelapse support + optdepends = mjpg-streamer: stream images from webcam + optdepends = v4l-mjpg-stream: stream images from a Video4Linux capable camera + optdepends = python2-pip: automatic plugin installation + provides = octoprint + conflicts = octoprint + source = octoprint-devel-git::git+https://github.com/foosel/OctoPrint.git#branch=devel + source = octoprint.service + source = pipFix.patch + md5sums = SKIP + md5sums = ec5e51f876bb5fb223801bf28850908a + md5sums = af3a1ada9348312803ef38593b77d7ef + +pkgname = octoprint-devel-git + diff --git a/PKGBUILD b/PKGBUILD new file mode 100644 index 000000000000..8ab713d64b84 --- /dev/null +++ b/PKGBUILD @@ -0,0 +1,63 @@ +# Maintainer: Doug Richardson <dougie.richardson@gmail.com> +# Contributor: feilen <feilen1000@gmail.com> +# Contributor: Thermionix <thermionix@gmail.com> + +pkgname=octoprint-devel-git +pkgver=1.1.2.r793.g106b21f +pkgrel=1 +pkgdesc="OctoPrint provides a responsive web interface for controlling a 3D printer (RepRap, Ultimaker, ...)" +arch=('i686' 'x86_64' 'armv6' 'armv6h') +url="https://github.com/foosel/OctoPrint" +license=('GPL') +depends=('python2-flask' + 'python2-werkzeug' + 'python2-tornado' + 'python2-sockjs-tornado-git' + 'python2-yaml' + 'python2-flask-login' + 'python2-flask-principal' + 'python2-flask-babel' + 'python2-pyserial' + 'python2-netaddr' + 'python2-watchdog' + 'python2-sarge' + 'python2-netifaces' + 'python2-pylru' + 'python2-rsa' + 'python2-pkginfo' + 'python2-requests' + 'python2-semantic-version') +makedepends=( 'git' ) +optdepends=( + 'ffmpeg: timelapse support' + 'mjpg-streamer: stream images from webcam' + 'v4l-mjpg-stream: stream images from a Video4Linux capable camera' + 'python2-pip: automatic plugin installation' +) +provides=( 'octoprint' ) +conflicts=( 'octoprint' ) +install="octoprint.install" +source=( "$pkgname"::'git+https://github.com/foosel/OctoPrint.git#branch=devel' + octoprint.service + pipFix.patch) +md5sums=('SKIP' + 'ec5e51f876bb5fb223801bf28850908a' + 'af3a1ada9348312803ef38593b77d7ef') + +pkgver() { + cd "$srcdir/$pkgname" + git describe --long --tags | sed -E 's/([^-]*-g)/r\1/;s/-/./g' +} + +prepare() { + cd "$srcdir/$pkgname" + patch -p0 < "$srcdir/pipFix.patch" +} + +package() { + cd ${srcdir}/${pkgname} + + python2 setup.py install --root="$pkgdir/" --optimize=1 + + install -D -m644 ${srcdir}/octoprint.service ${pkgdir}/usr/lib/systemd/system/octoprint.service +} diff --git a/octoprint.install b/octoprint.install new file mode 100755 index 000000000000..cdb6d888c8b7 --- /dev/null +++ b/octoprint.install @@ -0,0 +1,22 @@ +post_install() { + local HOMEDIR=/var/lib/octoprint + getent group octoprint > /dev/null || groupadd octoprint + getent passwd octoprint > /dev/null || useradd -d $HOMEDIR -g octoprint -s /usr/bin/nologin octoprint + usermod -a -G octoprint,network,uucp,tty octoprint + mkdir -p $HOMEDIR + chmod 700 $HOMEDIR + chown -R octoprint:octoprint $HOMEDIR + + echo "To start octoprint, run: systemctl start octoprint" + echo "To enable octoprint at boot, run: systemctl enable octoprint" +} + +post_upgrade() { + post_install $1 +} + +post_remove() { + echo "To stop octoprint, run: systemctl stop octoprint" + echo "To disable octoprint at boot, run: systemctl disable octoprint" + echo "You may want to remove octoprint user and group" +} diff --git a/octoprint.service b/octoprint.service new file mode 100644 index 000000000000..b064adab9fcd --- /dev/null +++ b/octoprint.service @@ -0,0 +1,13 @@ +[Unit] +Description=Octoprint 3d Printing Web Server +After=network.target + +[Service] +User=octoprint +Group=octoprint +Type=simple +ExecStart=/usr/bin/octoprint +Restart=on-failure + +[Install] +WantedBy=multi-user.target diff --git a/pipFix.patch b/pipFix.patch new file mode 100644 index 000000000000..5965bf612881 --- /dev/null +++ b/pipFix.patch @@ -0,0 +1,11 @@ +--- src/octoprint/plugins/pluginmanager/__init__.py 2015-06-01 14:59:02.157864655 +0000 ++++ src/octoprint/plugins/pluginmanager/__init__.py 2015-06-01 14:58:45.348420799 +0000 +@@ -339,7 +339,7 @@ + python_command = sys.executable + binary_dir = os.path.dirname(python_command) + +- pip_command = os.path.join(binary_dir, "pip") ++ pip_command = os.path.join(binary_dir, "pip2") + if sys.platform == "win32": + # Windows is a bit special... first of all the file will be called pip.exe, not just pip, and secondly + # for a non-virtualenv install (e.g. global install) the pip binary will not be located in the |