From 6d9bd4f954a79652f730047b62002bcefeea23b8 Mon Sep 17 00:00:00 2001 From: Mark Felder Date: Thu, 20 Oct 2016 19:14:45 +0000 Subject: [PATCH] Snappy web interface for your 3D printer. OctoPrint allows full remote control and monitoring, it's compatible and extendable, and it's 100% open source. WWW: http://octoprint.org/ PR: 213327 Submitted by: bsdports@kyle-evans.net --- www/Makefile | 1 + www/py-octoprint/Makefile | 63 +++++++++++++++++++++++++++ www/py-octoprint/distinfo | 3 ++ www/py-octoprint/files/octoprint.in | 43 ++++++++++++++++++ www/py-octoprint/files/patch-setup.py | 33 ++++++++++++++ www/py-octoprint/pkg-descr | 5 +++ www/py-octoprint/pkg-plist | 4 ++ 7 files changed, 152 insertions(+) create mode 100644 www/py-octoprint/Makefile create mode 100644 www/py-octoprint/distinfo create mode 100644 www/py-octoprint/files/octoprint.in create mode 100644 www/py-octoprint/files/patch-setup.py create mode 100644 www/py-octoprint/pkg-descr create mode 100644 www/py-octoprint/pkg-plist diff --git a/www/Makefile b/www/Makefile index dcc70c9a082c..4e8ebfb96a9a 100644 --- a/www/Makefile +++ b/www/Makefile @@ -1656,6 +1656,7 @@ SUBDIR += py-meld3 SUBDIR += py-mt SUBDIR += py-nevow + SUBDIR += py-octoprint SUBDIR += py-pafy SUBDIR += py-paste SUBDIR += py-pastedeploy diff --git a/www/py-octoprint/Makefile b/www/py-octoprint/Makefile new file mode 100644 index 000000000000..2e9d3bb42ebe --- /dev/null +++ b/www/py-octoprint/Makefile @@ -0,0 +1,63 @@ +# $FreeBSD$ + +PORTNAME= octoprint +PORTVERSION= 1.3.0.a +CATEGORIES= www python +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +MAINTAINER= bsdports@kyle-evans.net +COMMENT= Web interface for controlling a 3D printer + +LICENSE= AGPLv3 +LICENSE_FILE= ${WRKSRC}/LICENSE + +RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}Flask>=0.11.1:www/py-flask \ + ${PYTHON_PKGNAMEPREFIX}werkzeug>=0.11.1:www/py-werkzeug \ + ${PYTHON_PKGNAMEPREFIX}tornado>=4.4.2:www/py-tornado \ + ${PYTHON_PKGNAMEPREFIX}sockjs-tornado>=1.0.2:www/py-sockjs-tornado \ + ${PYTHON_PKGNAMEPREFIX}yaml>0:devel/py-yaml \ + ${PYTHON_PKGNAMEPREFIX}Flask-Login>=0.3.2:www/py-flask-login \ + ${PYTHON_PKGNAMEPREFIX}Flask-Principal>=0.4:www/py-flask-principal \ + ${PYTHON_PKGNAMEPREFIX}Flask-Babel>=0.11.1:devel/py-flask-babel \ + ${PYTHON_PKGNAMEPREFIX}Flask-Assets>=0.12:www/py-flask-assets \ + ${PYTHON_PKGNAMEPREFIX}markdown>=2.6.4:textproc/py-markdown \ + ${PYTHON_PKGNAMEPREFIX}serial>=2.7:comms/py-serial \ + ${PYTHON_PKGNAMEPREFIX}netaddr>=0.7.17:net/py-netaddr \ + ${PYTHON_PKGNAMEPREFIX}watchdog>=0.8.2:devel/py-watchdog \ + ${PYTHON_PKGNAMEPREFIX}sarge>=0.1.4:devel/py-sarge \ + ${PYTHON_PKGNAMEPREFIX}netifaces>=0.10:net/py-netifaces \ + ${PYTHON_PKGNAMEPREFIX}pylru>=1.0.9:devel/py-pylru \ + ${PYTHON_PKGNAMEPREFIX}rsa>=3.3:security/py-rsa \ + ${PYTHON_PKGNAMEPREFIX}pkginfo>=1.2.1:sysutils/py-pkginfo \ + ${PYTHON_PKGNAMEPREFIX}requests>=2.11.1:www/py-requests \ + ${PYTHON_PKGNAMEPREFIX}semantic_version>=2.4.2:devel/py-semantic_version \ + ${PYTHON_PKGNAMEPREFIX}psutil>=4.3.0:sysutils/py-psutil \ + ${PYTHON_PKGNAMEPREFIX}click>=6.6:devel/py-click \ + ${PYTHON_PKGNAMEPREFIX}awesome-slugify>=1.6.5:textproc/py-awesome-slugify \ + ${PYTHON_PKGNAMEPREFIX}feedparser>=5.2.1:textproc/py-feedparser \ + ${PYTHON_PKGNAMEPREFIX}chainmap>=1.0.2:devel/py-chainmap \ + ${PYTHON_PKGNAMEPREFIX}future>=0.15.2:devel/py-future \ + ${PYTHON_PKGNAMEPREFIX}scandir>=1.3:sysutils/py-scandir + +USES= python + +USE_PYTHON= autoplist distutils + +USE_GITHUB= yes +GH_ACCOUNT= kevans91 +GH_TAGNAME= 37f51ef +GH_PROJECT= OctoPrint + +USE_RC_SUBR= octoprint +SUB_LIST+= PYTHON=${PYTHON_CMD} \ + HOME=${PREFIX}/octoprint + +USERS= octoprint +GROUPS= octoprint + +NO_ARCH= yes + +post-patch: + ${RM} -rf ${WRKSRC}/src/octoprint/plugins/softwareupdate + +.include diff --git a/www/py-octoprint/distinfo b/www/py-octoprint/distinfo new file mode 100644 index 000000000000..e8669f6eacc4 --- /dev/null +++ b/www/py-octoprint/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1475908249 +SHA256 (kevans91-OctoPrint-1.3.0.a-37f51ef_GH0.tar.gz) = 2b15c15e7c4c1ce550c76a90fedbdb4e996f7c0297bc6eb7a67c8478d8b65e15 +SIZE (kevans91-OctoPrint-1.3.0.a-37f51ef_GH0.tar.gz) = 3282128 diff --git a/www/py-octoprint/files/octoprint.in b/www/py-octoprint/files/octoprint.in new file mode 100644 index 000000000000..de5adb364074 --- /dev/null +++ b/www/py-octoprint/files/octoprint.in @@ -0,0 +1,43 @@ +#!/bin/sh + +# $FreeBSD$ +# +# PROVIDE: octoprint +# REQUIRE: LOGIN +# KEYWORD: shutdown +# + +. /etc/rc.subr + +name=octoprint +rcvar=octoprint_enable +desc="OctoPrint 3D printer control daemon" + +load_rc_config $name + +: ${octoprint_enable:=NO} +: ${octoprint_host=0.0.0.0} +: ${octoprint_port=5000} +: ${octoprint_flags="--basedir %%HOME%% --host $octoprint_host --port $octoprint_port"} +: ${octoprint_user=octoprint} +: ${octoprint_group=octoprint} + +octoprint_env=PYTHON_EGG_CACHE=%%HOME%% + +command=%%PREFIX%%/bin/$name +pidfile=/var/run/$name/$name.pid +command_args="daemon $octoprint_flags --pid $pidfile start" +command_interpreter=%%PYTHON%% +start_precmd=octo_prestart + +octo_prestart() +{ + # octoprint_flags gets appended when we don't want it to. + rc_flags="" + + if [ ! -d /var/run/$name ]; then + install -d -o ${octoprint_user} -g ${octoprint_group} -m 755 /var/run/$name + fi +} + +run_rc_command "$1" diff --git a/www/py-octoprint/files/patch-setup.py b/www/py-octoprint/files/patch-setup.py new file mode 100644 index 000000000000..547e43ff8c4d --- /dev/null +++ b/www/py-octoprint/files/patch-setup.py @@ -0,0 +1,33 @@ +--- setup.py.orig 2016-10-08 19:12:49 UTC ++++ setup.py +@@ -18,7 +18,7 @@ INSTALL_REQUIRES = [ + "werkzeug>=0.11.1,<0.12", + "tornado>=4.4.2,<4.5", + "sockjs-tornado>=1.0.2,<1.1", +- "PyYAML>=3.12,<3.13", ++ "PyYAML>=3.11,<3.13", + "Flask-Login>=0.3,<0.4", + "Flask-Principal>=0.4,<0.5", + "Flask-Babel>=0.11,<0.12", +@@ -26,15 +26,15 @@ INSTALL_REQUIRES = [ + "markdown>=2.6.4,<2.7", +- "pyserial>=3.1.1,<3.2", ++ "pyserial>=2.7,<3.2", + "netaddr>=0.7.17,<0.8", +- "watchdog>=0.8.3,<0.9", ++ "watchdog>=0.8.2,<0.9", + "sarge>=0.1.4,<0.2", + "netifaces>=0.10,<0.11", + "pylru>=1.0.9,<1.1", +- "rsa>=3.4,<3.5", ++ "rsa>=3.3,<3.5", +- "pkginfo>=1.3.2,<1.4", ++ "pkginfo>=1.2.1,<1.4", + "requests>=2.11.1,<2.12", +- "semantic_version>=2.6.0,<2.7", +- "psutil>=4.3.1,<4.4", ++ "semantic_version>=2.4.2,<2.7", ++ "psutil>=4.3.0,<4.4", + "Click>=6.6,<6.7", + "awesome-slugify>=1.6.5,<1.7", + "feedparser>=5.2.1,<5.3", diff --git a/www/py-octoprint/pkg-descr b/www/py-octoprint/pkg-descr new file mode 100644 index 000000000000..9bdedd6b6a26 --- /dev/null +++ b/www/py-octoprint/pkg-descr @@ -0,0 +1,5 @@ +Snappy web interface for your 3D printer. OctoPrint allows full remote +control and monitoring, it's compatible and extendable, and it's 100% +open source. + +WWW: http://octoprint.org/ diff --git a/www/py-octoprint/pkg-plist b/www/py-octoprint/pkg-plist new file mode 100644 index 000000000000..e752d97cd7f9 --- /dev/null +++ b/www/py-octoprint/pkg-plist @@ -0,0 +1,4 @@ +%%PYTHON_SITELIBDIR%%/octoprint/templates/_data/AUTHORS.md +%%PYTHON_SITELIBDIR%%/octoprint/templates/_data/CHANGELOG.md +%%PYTHON_SITELIBDIR%%/octoprint/templates/_data/SUPPORTERS.md +%%PYTHON_SITELIBDIR%%/octoprint/templates/_data/THIRDPARTYLICENSES.md