Browse Source

print/cloudprint: Add port from official FreeBSD portstree

v4l
Bernhard Fröhlich 1 year ago
parent
commit
1fcef89742
Signed by: Bernhard Froehlich <decke@bluelife.at> GPG Key ID: 4DD88C3F9F3B8333

+ 34
- 0
print/cloudprint/Makefile View File

@@ -0,0 +1,34 @@
# Created by: Bernhard Froehlich <decke@FreeBSD.org>
# $FreeBSD: head/print/cloudprint/Makefile 472884 2018-06-20 17:05:41Z mat $

PORTNAME= cloudprint
PORTVERSION= 0.14.0.20170128
CATEGORIES= print

MAINTAINER= decke@FreeBSD.org
COMMENT= Google Cloud Print proxy for local CUPS printers

LICENSE= GPLv3

RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pycups>=0:print/py-pycups@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}configargparse>=0.9.3:devel/py-configargparse@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}daemon>0:devel/py-daemon@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}requests>=2.7.0:www/py-requests@${PY_FLAVOR}

USE_GITHUB= yes
GH_ACCOUNT= armooo
GH_TAGNAME= 108b9f0

NO_ARCH= yes
USES= python
USE_PYTHON= autoplist concurrent distutils optsuffix
USE_RC_SUBR= ${PORTNAME}

USERS= cups
GROUPS= cups

SUB_LIST+= PYTHON_CMD="${PYTHON_CMD}" \
CPUSER="${USERS}" \
CPGROUP="${GROUPS}"

.include <bsd.port.mk>

+ 3
- 0
print/cloudprint/distinfo View File

@@ -0,0 +1,3 @@
TIMESTAMP = 1497263520
SHA256 (armooo-cloudprint-0.14.0.20170128-108b9f0_GH0.tar.gz) = a20351b9892ac950f014f07637033a1387971f82f3c81710949fedfa13e9b9d9
SIZE (armooo-cloudprint-0.14.0.20170128-108b9f0_GH0.tar.gz) = 27507

+ 46
- 0
print/cloudprint/files/cloudprint.in View File

@@ -0,0 +1,46 @@
#!/bin/sh

# $FreeBSD: head/print/cloudprint/files/cloudprint.in 347727 2014-03-10 09:20:06Z decke $
#
# PROVIDE: cloudprint
# REQUIRE: LOGIN cupsd
# KEYWORD: shutdown
#
# Add the following line to /etc/rc.conf[.local] to enable cloudprint
#
# cloudprint_enable (bool): Set to "NO" by default.
# Set it to "YES" to enable cloudprint.
# cloudprint_user (str): User account to run with.
# cloudprint_group (str): Group to run with.
# cloudprint_flags (str): Custom flags for cloudprint.

. /etc/rc.subr

: ${cloudprint_enable="NO"}
: ${cloudprint_user="%%CPUSER%%"}
: ${cloudprint_group="%%CPGROUP%%"}

name=cloudprint
rcvar=cloudprint_enable
piddir="/var/run/${name}"
pidfile="${piddir}/${name}.pid"
confdir="%%PREFIX%%/etc/cloudprint"
command="%%PREFIX%%/bin/cloudprint"
command_args="-d -p ${pidfile} -a ${confdir}/cloudprintauth"
command_interpreter="%%PYTHON_CMD%%"
sig_stop="QUIT"
start_precmd="${name}_prestart"

cloudprint_prestart()
{
if [ ! -d "${piddir}" ]; then
/usr/bin/install -d -o ${cloudprint_user} -g ${cloudprint_group} -m 0755 ${piddir}
fi
if [ ! -d "${confdir}" ]; then
/usr/bin/install -d -o ${cloudprint_user} -g ${cloudprint_group} -m 0755 ${confdir}
fi
}

load_rc_config $name

run_rc_command "$1"

+ 4
- 0
print/cloudprint/pkg-descr View File

@@ -0,0 +1,4 @@
Google cloud print proxy utility for sharing your local
CUPS printers.

WWW: https://github.com/armooo/cloudprint

Loading…
Cancel
Save