diff options
author | wiz <wiz@pkgsrc.org> | 2017-06-22 12:30:25 +0000 |
---|---|---|
committer | wiz <wiz@pkgsrc.org> | 2017-06-22 12:30:25 +0000 |
commit | fc2c574e694db6a3eee69e52fb19021f0fd90f3e (patch) | |
tree | 7e5df06af3d3e6f3beee6170f2c8da9f38223dc5 | |
parent | 95bf5c7dafc60df8069b5fe31b7146043b71a42e (diff) | |
download | pkgsrc-fc2c574e694db6a3eee69e52fb19021f0fd90f3e.tar.gz |
Add cups-browsed start up script, from Edgar Fuß.
Bump PKGREVISION.
-rw-r--r-- | print/cups-filters/Makefile | 21 | ||||
-rw-r--r-- | print/cups-filters/PLIST | 4 | ||||
-rw-r--r-- | print/cups-filters/files/cups-browsed-daemonize.sh | 4 | ||||
-rw-r--r-- | print/cups-filters/files/cups-browsed.sh | 28 |
4 files changed, 49 insertions, 8 deletions
diff --git a/print/cups-filters/Makefile b/print/cups-filters/Makefile index 975c0197e61..d8920bc725c 100644 --- a/print/cups-filters/Makefile +++ b/print/cups-filters/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.72 2017/06/13 14:59:48 wiz Exp $ +# $NetBSD: Makefile,v 1.73 2017/06/22 12:30:25 wiz Exp $ DISTNAME= cups-filters-1.14.0 -PKGREVISION= 1 +PKGREVISION= 2 CATEGORIES= print MASTER_SITES= http://openprinting.org/download/cups-filters/ EXTRACT_SUFX= .tar.xz @@ -40,10 +40,8 @@ CFLAGS+= -framework IOKit BUILD_DEFS+= VARBASE CONFIGURE_ARGS+= --localstatedir=${VARBASE} -.if ${INIT_SYSTEM} == "rc.d" -CONFIGURE_ARGS+= --with-rcdir=${PREFIX}/share/examples/rc.d -CONFIGURE_ARGS+= --with-rclevels="" -.endif +RCD_SCRIPTS= cups-browsed + CONFIGURE_ARGS+= --disable-braille CONFIGURE_ARGS+= --disable-ldap CONFIGURE_ARGS+= --disable-mutool @@ -57,11 +55,22 @@ INSTALL_MAKE_FLAGS+= sysconfdir=${PREFIX}/share/examples/cups-filters CONF_FILES= ${PREFIX}/share/examples/cups-filters/fonts/conf.d/99pdftoopvp.conf ${PKG_SYSCONFDIR}/fontconfig/conf.d/99pdftoopvp.conf CONF_FILES+= ${PREFIX}/share/examples/cups-filters/cups-browsed.conf ${PKG_SYSCONFDIR}/cups/cups-browsed.conf +post-extract: + ${CP} ${FILESDIR}/cups-browsed-daemonize.sh ${WRKSRC} + +SUBST_CLASSES+= daemonize +SUBST_STAGE.daemonize= pre-configure +SUBST_MESSAGE.daemonize= Customizing daemonizing script +SUBST_FILES.daemonize= cups-browsed-daemonize.sh +SUBST_SED.daemonize= -e 's|@PREFIX@|${PREFIX}|g' +SUBST_SED.daemonize+= -e 's|@VARBASE@|${VARBASE}|g' + post-install: ${MV} ${DESTDIR}${PKG_SYSCONFDIR}/cups/cups-browsed.conf ${DESTDIR}${PREFIX}/share/examples/cups-filters/cups-browsed.conf # backends that need root access should not have world read and execute permissions ${CHMOD} go-rwx ${DESTDIR}${PREFIX}/libexec/cups/backend/parallel ${CHMOD} go-rwx ${DESTDIR}${PREFIX}/libexec/cups/backend/serial + ${INSTALL_SCRIPT} ${WRKSRC}/cups-browsed-daemonize.sh ${DESTDIR}${PREFIX}/libexec/cups-browsed .include "../../devel/glib2/buildlink3.mk" .include "../../devel/zlib/buildlink3.mk" diff --git a/print/cups-filters/PLIST b/print/cups-filters/PLIST index 974bf3735cf..a5ddb3277f7 100644 --- a/print/cups-filters/PLIST +++ b/print/cups-filters/PLIST @@ -1,4 +1,4 @@ -@comment $NetBSD: PLIST,v 1.18 2017/05/01 10:13:29 leot Exp $ +@comment $NetBSD: PLIST,v 1.19 2017/06/22 12:30:25 wiz Exp $ bin/driverless bin/foomatic-rip bin/ttfread @@ -17,6 +17,7 @@ lib/libcupsfilters.la lib/libfontembed.la lib/pkgconfig/libcupsfilters.pc lib/pkgconfig/libfontembed.pc +libexec/cups-browsed libexec/cups/backend/beh libexec/cups/backend/driverless libexec/cups/backend/implicitclass @@ -88,7 +89,6 @@ share/doc/cups-filters/NEWS share/doc/cups-filters/README share/examples/cups-filters/cups-browsed.conf share/examples/cups-filters/fonts/conf.d/99pdftoopvp.conf -share/examples/rc.d/cups-browsed share/ppd/cupsfilters/Fuji_Xerox-DocuPrint_CM305_df-PDF.ppd share/ppd/cupsfilters/Generic-PDF_Printer-PDF.ppd share/ppd/cupsfilters/HP-Color_LaserJet_CM3530_MFP-PDF.ppd diff --git a/print/cups-filters/files/cups-browsed-daemonize.sh b/print/cups-filters/files/cups-browsed-daemonize.sh new file mode 100644 index 00000000000..e711952bf87 --- /dev/null +++ b/print/cups-filters/files/cups-browsed-daemonize.sh @@ -0,0 +1,4 @@ +#!/bin/sh + +# cups-browsed itself doesn't daemonize +( cd /; @PREFIX@/sbin/cups-browsed </dev/null >/dev/null 2>&1 & echo $! >@VARBASE@/run/cups-browsed.pid ) & diff --git a/print/cups-filters/files/cups-browsed.sh b/print/cups-filters/files/cups-browsed.sh new file mode 100644 index 00000000000..ee96dd2485b --- /dev/null +++ b/print/cups-filters/files/cups-browsed.sh @@ -0,0 +1,28 @@ +#!@RCD_SCRIPTS_SHELL@ +# +# $NetBSD: cups-browsed.sh,v 1.1 2017/06/22 12:30:25 wiz Exp $ +# +# PROVIDE: cups-browsed +# REQUIRE: cups + +. /etc/rc.subr + +# The program's name is "cups-browsed", but shell varnames can't contain hyphens +# Also, the program itself doesn't daemonize, use a shell wrapper + +name="cups_browsed" # Prefix for various ${name}_XXX variables +cups_browsed_rcname="cups-browsed" # File name in rc.conf.d +rcvar="cups_browsed" # Name of YES/NO rc variable +command=@PREFIX@/libexec/cups-browsed # Daemonizing wrapper +procname="@PREFIX@/sbin/cups-browsed" # Real command that appears in ps(1) output +conf_file="@PKG_SYSCONFDIR@/cups/cups-browsed.conf" +required_files="${conf_file}" +pidfile=@VARBASE@/run/cups-browsed.pid +stop_postcmd=cups_browsed_remove_pidfile + +cups_browsed_remove_pidfile() { + rm -f "${pidfile}" +} + +load_rc_config $cups_browsed_rcname +run_rc_command $1 |