Skip to content

Commit

Permalink
print/ipp-usb: Add port
Browse files Browse the repository at this point in the history
ipp-usb daemon enables driver-less printing and scanning on USB-only
AirPrint-compatible printers and MFPs.  It works by connecting to the device by
USB using IPP-over-USB protocol, and exposing the device to the network,
including DNS-SD (ZeroConf) advertising.  IPP printing, eSCL scanning and web
console are fully supported.

WWW: https://github.com/OpenPrinting/ipp-usb

PR:		271226
  • Loading branch information
cwfoo authored and clausecker committed May 11, 2023
1 parent 33c6ac9 commit c30e441
Show file tree
Hide file tree
Showing 7 changed files with 89 additions and 0 deletions.
1 change: 1 addition & 0 deletions print/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@
SUBDIR += html2ps
SUBDIR += hyperlatex
SUBDIR += indexinfo
SUBDIR += ipp-usb
SUBDIR += kde_poster
SUBDIR += latex-beamer
SUBDIR += latex-biber
Expand Down
37 changes: 37 additions & 0 deletions print/ipp-usb/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
PORTNAME= ipp-usb
DISTVERSION= 0.9.23
CATEGORIES= print

MAINTAINER= chuanwei.foo@hotmail.com
COMMENT= Daemon for IPP over USB printer support
WWW= https://github.com/OpenPrinting/ipp-usb

LICENSE= BSD2CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE

LIB_DEPENDS= libavahi-client.so:net/avahi-app \
libavahi-common.so:net/avahi-app

USES= gmake go:modules pkgconfig

USE_GITHUB= yes
GH_ACCOUNT= OpenPrinting
GH_TUPLE= OpenPrinting:goipp:v1.0.0:openprinting_goipp/vendor/github.com/OpenPrinting/goipp

USE_RC_SUBR= ipp-usb

post-patch:
${REINPLACE_CMD} -e 's|/usr/share/ipp-usb|${DATADIR}|g' \
-e 's|/etc/ipp-usb|${ETCDIR}|g' \
${WRKSRC}/paths.go

do-install:
${INSTALL_PROGRAM} ${GO_WRKDIR_BIN}/ipp-usb ${STAGEDIR}${PREFIX}/sbin/
${MKDIR} ${STAGEDIR}${ETCDIR}/quirks/
${INSTALL_DATA} ${WRKSRC}/ipp-usb.conf \
${STAGEDIR}${ETCDIR}/ipp-usb.conf.sample
${INSTALL_MAN} ${WRKSRC}/ipp-usb.8 ${STAGEDIR}${PREFIX}/man/man8/
(cd ${WRKSRC}/ipp-usb-quirks/ && \
${COPYTREE_SHARE} . ${STAGEDIR}${DATADIR}/quirks/)

.include <bsd.port.mk>
5 changes: 5 additions & 0 deletions print/ipp-usb/distinfo
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
TIMESTAMP = 1683046675
SHA256 (OpenPrinting-ipp-usb-0.9.23_GH0.tar.gz) = 81f325abc45b4d2b8812022d93dfcebc807c2b0688e2a9f7052f0bddfadf5b01
SIZE (OpenPrinting-ipp-usb-0.9.23_GH0.tar.gz) = 73151
SHA256 (OpenPrinting-goipp-v1.0.0_GH0.tar.gz) = b0ffbd093af6407fe4695075d9a022d23948b9762d2a9e39a2fbb7e9bf474b32
SIZE (OpenPrinting-goipp-v1.0.0_GH0.tar.gz) = 31764
25 changes: 25 additions & 0 deletions print/ipp-usb/files/ipp-usb.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/sh

# PROVIDE: ipp_usb
# REQUIRE: DAEMON
# KEYWORD: shutdown
#
# Add these lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# ipp_usb_enable (bool): Set to NO by default.
# Set it to YES to enable ipp-usb.

. /etc/rc.subr

name=ipp_usb
rcvar=ipp_usb_enable

load_rc_config $name

: ${ipp_usb_enable:="NO"}

command=%%PREFIX%%/sbin/ipp-usb
command_args="standalone -bg"

run_rc_command "$1"
8 changes: 8 additions & 0 deletions print/ipp-usb/files/patch-dnssd__avahi.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
--- dnssd_avahi.go.orig 2023-05-01 00:00:00 UTC
+++ dnssd_avahi.go
@@ -1,4 +1,4 @@
-// +build linux
+// +build linux freebsd

/* ipp-usb - HTTP reverse proxy, backed by IPP-over-USB connection to device
*
5 changes: 5 additions & 0 deletions print/ipp-usb/pkg-descr
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
ipp-usb daemon enables driver-less printing and scanning on USB-only
AirPrint-compatible printers and MFPs. It works by connecting to the device by
USB using IPP-over-USB protocol, and exposing the device to the network,
including DNS-SD (ZeroConf) advertising. IPP printing, eSCL scanning and web
console are fully supported.
8 changes: 8 additions & 0 deletions print/ipp-usb/pkg-plist
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
%%ETCDIR%%/ipp-usb.conf.sample
man/man8/ipp-usb.8.gz
sbin/ipp-usb
%%DATADIR%%/quirks/HP.conf
%%DATADIR%%/quirks/README
%%DATADIR%%/quirks/blacklist.conf
%%DATADIR%%/quirks/default.conf
@dir %%ETCDIR%%/quirks

0 comments on commit c30e441

Please sign in to comment.