Index: head/print/cloud-print-connector/Makefile =================================================================== --- head/print/cloud-print-connector/Makefile (revision 491798) +++ head/print/cloud-print-connector/Makefile (revision 491799) @@ -1,63 +1,65 @@ # $FreeBSD$ PORTNAME= cloud-print-connector PORTVERSION= 1.16 +PORTREVISION= 1 CATEGORIES= print MAINTAINER= swills@FreeBSD.org COMMENT= Share CUPS printers via Google Cloud Print LICENSE= BSD2CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE BUILD_DEPENDS= go:lang/go LIB_DEPENDS= libcups.so:print/cups \ libavahi-client.so:net/avahi-app \ libavahi-common.so:net/avahi-app 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 \ coreos:go-systemd:88bfeed:gosystemd/src/github.com/coreos/go-systemd \ golang:oauth2:ef14785:oauth2/src/golang.org/x/oauth2 \ golang:net:039a425:net/src/golang.org/x/net \ mildred:go-xdg:96b70c9:xdg/src/launchpad.net/go-xdg/v0 BIN_FILES= gcp-connector-util gcp-cups-connector PLIST_FILES= ${BIN_FILES:S/^/bin\//} OPTIONS_DEFINE= DOCS PORTDOCS= CONTRIBUTING.md README.md do-build: .for bin in ${BIN_FILES} @cd ${WRKSRC}/src/github.com/google/cloud-print-connector; ${SETENV} \ ${MAKE_ENV} ${BUILD_ENV} GOPATH=${WRKSRC} go build -o \ ${WRKSRC}/bin/${bin} ./${bin} .endfor do-install: .for bin in ${BIN_FILES} ${INSTALL_PROGRAM} ${WRKSRC}/bin/${bin} \ ${STAGEDIR}${PREFIX}/bin/${bin} .endfor post-install-DOCS-on: ${MKDIR} ${STAGEDIR}${DOCSDIR} .for doc in ${PORTDOCS} ${CP} ${WRKSRC}/${doc} ${STAGEDIR}${DOCSDIR} .endfor .include # golang assumes that if clang is in use, it is called "clang" and not "cc". If # it's called "cc", go may fail .if ${COMPILER_TYPE} == clang BUILD_ENV= CC=clang .endif .include Index: head/print/cloud-print-connector/files/gcp-cups-connectord.in =================================================================== --- head/print/cloud-print-connector/files/gcp-cups-connectord.in (nonexistent) +++ head/print/cloud-print-connector/files/gcp-cups-connectord.in (revision 491799) @@ -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" Property changes on: head/print/cloud-print-connector/files/gcp-cups-connectord.in ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Index: head/print/cloud-print-connector/pkg-message =================================================================== --- head/print/cloud-print-connector/pkg-message (nonexistent) +++ head/print/cloud-print-connector/pkg-message (revision 491799) @@ -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 Property changes on: head/print/cloud-print-connector/pkg-message ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property