diff options
author | swills <swills@FreeBSD.org> | 2016-03-13 03:31:35 +0800 |
---|---|---|
committer | swills <swills@FreeBSD.org> | 2016-03-13 03:31:35 +0800 |
commit | 5736dce7cc5d6ad699adaf8e80a2929b4481548d (patch) | |
tree | 791f4fb145340a930c30b89597ed6afa38e0c71b /print | |
parent | 5a20a81e8118cf8945dd22c98e8ac87ffeeae8dd (diff) | |
download | freebsd-ports-gnome-5736dce7cc5d6ad699adaf8e80a2929b4481548d.tar.gz freebsd-ports-gnome-5736dce7cc5d6ad699adaf8e80a2929b4481548d.tar.zst freebsd-ports-gnome-5736dce7cc5d6ad699adaf8e80a2929b4481548d.zip |
cups-connector: create port
Share printers from your computer with ChromeOS and Android devices, using the
Cloud Print Connector. The Connector is a purpose-built system process. It can
share hundreds of printers on a powerful server, or one printer on a Raspberry
Pi.
WWW: https://github.com/google/cups-connector
Diffstat (limited to 'print')
-rw-r--r-- | print/Makefile | 1 | ||||
-rw-r--r-- | print/cups-connector/Makefile | 79 | ||||
-rw-r--r-- | print/cups-connector/distinfo | 12 | ||||
-rw-r--r-- | print/cups-connector/files/patch-cups_core.go | 13 | ||||
-rw-r--r-- | print/cups-connector/files/patch-privet_avahi.go | 13 | ||||
-rw-r--r-- | print/cups-connector/pkg-descr | 6 |
6 files changed, 124 insertions, 0 deletions
diff --git a/print/Makefile b/print/Makefile index 9fec9fb8c67f..5e64e364a07d 100644 --- a/print/Makefile +++ b/print/Makefile @@ -26,6 +26,7 @@ SUBDIR += cups SUBDIR += cups-bjnp SUBDIR += cups-cloud-print + SUBDIR += cups-connector SUBDIR += cups-filters SUBDIR += cups-fxlinuxprint SUBDIR += cups-pdf diff --git a/print/cups-connector/Makefile b/print/cups-connector/Makefile new file mode 100644 index 000000000000..24a39f982812 --- /dev/null +++ b/print/cups-connector/Makefile @@ -0,0 +1,79 @@ +# $FreeBSD$ + +PORTNAME= cups-connector +PORTVERSION= 0.0.0.2016.03.09 +CATEGORIES= print + +MAINTAINER= swills@FreeBSD.org +COMMENT= Share CUPS printers via Google Cloud Print + +LICENSE= BSD2CLAUSE +LICENSE_FILE= ${WRKSRC}/LICENSE + +BUILD_DEPENDS= go:${PORTSDIR}/lang/go \ + cups>=0:${PORTSDIR}/print/cups \ + avahi-app>=0:${PORTSDIR}/net/avahi-app + +USES= compiler pkgconfig +USE_GITHUB= yes +GH_ACCOUNT= google:DEFAULT codegangsta:cli coreos:gosystemd \ + golang:oauth2,net mildred:xdg +GH_PROJECT= cli:cli go-systemd:gosystemd oauth2:oauth2 net:net \ + go-xdg:xdg +GH_TAGNAME= 1fdc26d:DEFAULT a294348:cli 7b2428f:gosystemd \ + 2cd4472:oauth2 6acef71:net 875014b:xdg + +BIN_FILES= gcp-connector-util gcp-cups-connector +PLIST_FILES= ${BIN_FILES:S/^/bin\//} + +OPTIONS_DEFINE= DOCS + +PORTDOCS= CONTRIBUTING.md README.md + +post-patch: + @${REINPLACE_CMD} -e "s@%%PREFIX%%@${PREFIX}@g" \ + ${WRKSRC}/cups/core.go ${WRKSRC}/privet/avahi.go + @${MKDIR} ${WRKSRC}/src/github.com/google/cups-connector +.for src in cdd cups gcp gcp-connector-util gcp-cups-connector \ + gcp-windows-connector lib log manager monitor privet winspool xmpp + @${MV} ${WRKSRC}/${src} \ + ${WRKSRC}/src/github.com/google/cups-connector +.endfor + @${MKDIR} ${WRKSRC}/src/github.com/codegangsta + @${MKDIR} ${WRKSRC}/src/github.com/coreos + @${MKDIR} ${WRKSRC}/src/golang.org/x + @${MKDIR} ${WRKSRC}/src/launchpad.net/go-xdg + @${MV} ${WRKSRC_cli} ${WRKSRC}/src/github.com/codegangsta/cli + @${MV} ${WRKSRC_gosystemd} ${WRKSRC}/src/github.com/coreos/go-systemd + @${MV} ${WRKSRC_oauth2} ${WRKSRC}/src/golang.org/x/oauth2 + @${MV} ${WRKSRC_net} ${WRKSRC}/src/golang.org/x/net + @${MV} ${WRKSRC_xdg} ${WRKSRC}/src/launchpad.net/go-xdg/v0 + +do-build: +.for bin in ${BIN_FILES} + @cd ${WRKSRC}/src/github.com/google/cups-connector; ${SETENV} \ + ${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 <bsd.port.pre.mk> + +# 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 <bsd.port.post.mk> diff --git a/print/cups-connector/distinfo b/print/cups-connector/distinfo new file mode 100644 index 000000000000..82f17b21aad5 --- /dev/null +++ b/print/cups-connector/distinfo @@ -0,0 +1,12 @@ +SHA256 (google-cups-connector-0.0.0.2016.03.09-1fdc26d_GH0.tar.gz) = bd3e0aad70c4be1ffd6a22aa79d3f1f81697f1bfc61ea7726dc0fb330a5a5720 +SIZE (google-cups-connector-0.0.0.2016.03.09-1fdc26d_GH0.tar.gz) = 110516 +SHA256 (codegangsta-cli-a294348_GH0.tar.gz) = 163aa4f713f8c5bc5095f6c5d42bdd6b5149df97d02f24dc6de3a86dc1c3c79c +SIZE (codegangsta-cli-a294348_GH0.tar.gz) = 22095 +SHA256 (coreos-go-systemd-7b2428f_GH0.tar.gz) = 25df932ed355c1c113eb8d78b09c3cfa9ff49325e5cf8dceb10178405fddb2eb +SIZE (coreos-go-systemd-7b2428f_GH0.tar.gz) = 40633 +SHA256 (golang-oauth2-2cd4472_GH0.tar.gz) = 2d75dfd24a870026be49f867be02af4088587773e7265a259bcd1bcad4a09bb7 +SIZE (golang-oauth2-2cd4472_GH0.tar.gz) = 34560 +SHA256 (golang-net-6acef71_GH0.tar.gz) = aeea3d55a6e2f29329dfac8330817ccd449ffcb930b496fec0a47f011fa53f19 +SIZE (golang-net-6acef71_GH0.tar.gz) = 741883 +SHA256 (mildred-go-xdg-875014b_GH0.tar.gz) = 45c4688e8bc8e60202a0b2c11ff266dce1afcbd5438b285e267413ffe37a4b7b +SIZE (mildred-go-xdg-875014b_GH0.tar.gz) = 3894 diff --git a/print/cups-connector/files/patch-cups_core.go b/print/cups-connector/files/patch-cups_core.go new file mode 100644 index 000000000000..d96409767576 --- /dev/null +++ b/print/cups-connector/files/patch-cups_core.go @@ -0,0 +1,13 @@ +--- cups/core.go.orig 2016-03-12 14:17:25 UTC ++++ cups/core.go +@@ -9,8 +9,8 @@ + package cups + + /* +-#cgo freebsd CFLAGS: -I/usr/local/include +-#cgo freebsd LDFLAGS: -L/usr/local/lib ++#cgo freebsd CFLAGS: -I%%PREFIX%%/include ++#cgo freebsd LDFLAGS: -L%%PREFIX%%/lib + #include "cups.h" + */ + import "C" diff --git a/print/cups-connector/files/patch-privet_avahi.go b/print/cups-connector/files/patch-privet_avahi.go new file mode 100644 index 000000000000..db2cf0a229be --- /dev/null +++ b/print/cups-connector/files/patch-privet_avahi.go @@ -0,0 +1,13 @@ +--- privet/avahi.go.orig 2016-03-12 14:17:35 UTC ++++ privet/avahi.go +@@ -9,8 +9,8 @@ + package privet + + // #cgo linux LDFLAGS: -lavahi-client -lavahi-common +-// #cgo freebsd CFLAGS: -I/usr/local/include +-// #cgo freebsd LDFLAGS: -L/usr/local/lib -lavahi-client -lavahi-common ++// #cgo freebsd CFLAGS: -I%%PREFIX%%/include ++// #cgo freebsd LDFLAGS: -L%%PREFIX%%/lib -lavahi-client -lavahi-common + // #include "avahi.h" + import "C" + import ( diff --git a/print/cups-connector/pkg-descr b/print/cups-connector/pkg-descr new file mode 100644 index 000000000000..1191716278e9 --- /dev/null +++ b/print/cups-connector/pkg-descr @@ -0,0 +1,6 @@ +Share printers from your computer with ChromeOS and Android devices, using the +Cloud Print Connector. The Connector is a purpose-built system process. It can +share hundreds of printers on a powerful server, or one printer on a Raspberry +Pi. + +WWW: https://github.com/google/cups-connector |