From owner-svn-ports-head@freebsd.org Fri Feb 1 12:12:33 2019 Return-Path: Delivered-To: svn-ports-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D942914AEE37; Fri, 1 Feb 2019 12:12:32 +0000 (UTC) (envelope-from swills@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7EB7C8AD72; Fri, 1 Feb 2019 12:12:32 +0000 (UTC) (envelope-from swills@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6F5F01EC4E; Fri, 1 Feb 2019 12:12:32 +0000 (UTC) (envelope-from swills@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id x11CCWhO009758; Fri, 1 Feb 2019 12:12:32 GMT (envelope-from swills@FreeBSD.org) Received: (from swills@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id x11CCVqF009755; Fri, 1 Feb 2019 12:12:31 GMT (envelope-from swills@FreeBSD.org) Message-Id: <201902011212.x11CCVqF009755@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: swills set sender to swills@FreeBSD.org using -f From: Steve Wills Date: Fri, 1 Feb 2019 12:12:31 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r491799 - in head/print/cloud-print-connector: . files X-SVN-Group: ports-head X-SVN-Commit-Author: swills X-SVN-Commit-Paths: in head/print/cloud-print-connector: . files X-SVN-Commit-Revision: 491799 X-SVN-Commit-Repository: ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 7EB7C8AD72 X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.97 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_SHORT(-0.98)[-0.976,0]; ASN(0.00)[asn:11403, ipnet:2610:1c1:1::/48, country:US]; NEURAL_HAM_LONG(-1.00)[-0.999,0] X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Feb 2019 12:12:33 -0000 Author: swills Date: Fri Feb 1 12:12:31 2019 New Revision: 491799 URL: https://svnweb.freebsd.org/changeset/ports/491799 Log: print/cloud-print-connector: Add service/daemon script PR: 235308 Submitted by: Robert James Hernandez (modified slightly) Added: head/print/cloud-print-connector/files/ head/print/cloud-print-connector/files/gcp-cups-connectord.in (contents, props changed) head/print/cloud-print-connector/pkg-message (contents, props changed) Modified: head/print/cloud-print-connector/Makefile (contents, props changed) Modified: head/print/cloud-print-connector/Makefile ============================================================================== --- head/print/cloud-print-connector/Makefile Fri Feb 1 09:53:21 2019 (r491798) +++ head/print/cloud-print-connector/Makefile Fri Feb 1 12:12:31 2019 (r491799) @@ -2,6 +2,7 @@ PORTNAME= cloud-print-connector PORTVERSION= 1.16 +PORTREVISION= 1 CATEGORIES= print MAINTAINER= swills@FreeBSD.org @@ -18,6 +19,7 @@ LIB_DEPENDS= libcups.so:print/cups \ USES= compiler pkgconfig USE_GITHUB= yes +USE_RC_SUBR= gcp-cups-connectord GH_TUPLE= google:cloud-print-connector:7d5f127:DEFAULT/src/github.com/google/cloud-print-connector \ urfave:cli:8e01ec4:cli/src/github.com/urfave/cli \ satori:go.uuid:36e9d2e:gouuid/src/github.com/satori/go.uuid \ Added: head/print/cloud-print-connector/files/gcp-cups-connectord.in ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/print/cloud-print-connector/files/gcp-cups-connectord.in Fri Feb 1 12:12:31 2019 (r491799) @@ -0,0 +1,34 @@ +#!/bin/sh +# +# PROVIDE: gcp_cups_connectord +# REQUIRE: DAEMON NETWORKING +# KEYWORD: shutdown +# +# gcp_cups_connectord_enable (bool): Set to "NO" by default. +# Set it to "YES" to enable +# + +. /etc/rc.subr + +name="gcp_cups_connectord" +rcvar="gcp_cups_connectord_enable" + +load_rc_config $name + +: ${name_enable:=no} + +pidfile="/var/run/${name}.pid" +command="/usr/sbin/daemon" +bin="%%PREFIX%%/bin/gcp-cups-connector" +start_precmd="${name}_prestart" + +gcp_cups_connectord_prestart() { + if [ -z "${rc_flags}" ];then + rc_flags="-P ${pidfile} -f ${bin} -config-filename %%PREFIX%%/etc/gcp-cups-connector.config.json" + else + rc_flags="-P ${pidfile} -f ${bin} ${rc_flags}" + fi + return 0 +} + +run_rc_command "$1" Added: head/print/cloud-print-connector/pkg-message ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/print/cloud-print-connector/pkg-message Fri Feb 1 12:12:31 2019 (r491799) @@ -0,0 +1,6 @@ +Run the following command to create a config file called gcp-cups-connector.config.json before the starting service: + +# gcp-connector-util init --log-file-name "/var/log/cloud-print-connectord" +# mv /root/gcp-cups-connector.config.json /usr/local/etc/gcp-cups-connector.config.json + +More info at: https://github.com/google/cloud-print-connector/wiki/Configuration