aboutsummaryrefslogtreecommitdiff
path: root/print
diff options
context:
space:
mode:
authorSteve Wills <swills@FreeBSD.org>2019-02-01 12:12:31 +0000
committerSteve Wills <swills@FreeBSD.org>2019-02-01 12:12:31 +0000
commit41b11d7c993e5435fb991d6aa91f8026fc3de9ed (patch)
tree0e90f7000f5d350c7e0551168080b1723f3663a8 /print
parent436f1fdfe558352077662a0a90709da7a506b5ba (diff)
downloadports-41b11d7c993e5435fb991d6aa91f8026fc3de9ed.tar.gz
ports-41b11d7c993e5435fb991d6aa91f8026fc3de9ed.zip
Notes
Diffstat (limited to 'print')
-rw-r--r--print/cloud-print-connector/Makefile2
-rw-r--r--print/cloud-print-connector/files/gcp-cups-connectord.in34
-rw-r--r--print/cloud-print-connector/pkg-message6
3 files changed, 42 insertions, 0 deletions
diff --git a/print/cloud-print-connector/Makefile b/print/cloud-print-connector/Makefile
index f049edfe1a0c..51fdf13b8bdc 100644
--- a/print/cloud-print-connector/Makefile
+++ b/print/cloud-print-connector/Makefile
@@ -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 \
diff --git a/print/cloud-print-connector/files/gcp-cups-connectord.in b/print/cloud-print-connector/files/gcp-cups-connectord.in
new file mode 100644
index 000000000000..dd8db77ae7fe
--- /dev/null
+++ b/print/cloud-print-connector/files/gcp-cups-connectord.in
@@ -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"
diff --git a/print/cloud-print-connector/pkg-message b/print/cloud-print-connector/pkg-message
new file mode 100644
index 000000000000..86f1a9c18d46
--- /dev/null
+++ b/print/cloud-print-connector/pkg-message
@@ -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