diff options
author | dinoex <dinoex@FreeBSD.org> | 2007-06-12 22:14:35 +0800 |
---|---|---|
committer | dinoex <dinoex@FreeBSD.org> | 2007-06-12 22:14:35 +0800 |
commit | 0cea7acf9a2d26072c10241764eb561de1584b26 (patch) | |
tree | 3e430974e3947a31e8e25ec9229fed5b453cc3f0 /print/cups-base | |
parent | 8d4e031ad7e2370338f5d3604009d6c4e1d6bdd0 (diff) | |
download | freebsd-ports-gnome-0cea7acf9a2d26072c10241764eb561de1584b26.tar.gz freebsd-ports-gnome-0cea7acf9a2d26072c10241764eb561de1584b26.tar.zst freebsd-ports-gnome-0cea7acf9a2d26072c10241764eb561de1584b26.zip |
- drop pkg-install
as this cases problems for upgrading users
PR: 113613
Diffstat (limited to 'print/cups-base')
-rw-r--r-- | print/cups-base/Makefile | 19 | ||||
-rw-r--r-- | print/cups-base/pkg-install | 20 | ||||
-rw-r--r-- | print/cups-base/pkg-plist | 5 |
3 files changed, 19 insertions, 25 deletions
diff --git a/print/cups-base/Makefile b/print/cups-base/Makefile index 8c92934970ed..1e3552b1aedb 100644 --- a/print/cups-base/Makefile +++ b/print/cups-base/Makefile @@ -7,6 +7,7 @@ PORTNAME= cups PORTVERSION= 1.2.11 +PORTREVISION= 1 DISTVERSIONSUFFIX= -source CATEGORIES= print MASTER_SITES= EASYSW/${PORTNAME}/${DISTVERSION} @@ -59,6 +60,12 @@ CUPSSYSGRP= wheel .include <bsd.port.pre.mk> +.if defined(CUPS_OVERWRITE_BASE) +PLIST_SUB+= OVERWRITE="" +.else +PLIST_SUB+= OVERWRITE="@comment " +.endif + .if !defined(WITHOUT_GNUTLS) CONFIGURE_ARGS+= --enable-gnutls --disable-openssl LIB_DEPENDS+= gnutls-openssl.15:${PORTSDIR}/security/gnutls @@ -146,14 +153,16 @@ pre-install: if ! pw groupshow ${CUPSGRP}; then pw groupadd ${CUPSGRP} -g 193; fi if ! pw usershow ${CUPSOWN}; then pw useradd ${CUPSOWN} -g ${CUPSGRP} -u 193 \ -h - -d ${NONEXISTENT} -s /usr/sbin/nologin -c "CUPS Owner"; fi +.if defined(CUPS_OVERWRITE_BASE) + if test -e /usr/bin/lp; then chmod -h 0 /usr/bin/lp; fi + if test -e /usr/bin/lpq; then chmod -h 0 /usr/bin/lpq; fi + if test -e /usr/bin/lpr; then chmod -h 0 /usr/bin/lpr; fi + if test -e /usr/bin/lprm; then chmod -h 0 /usr/bin/lprm; fi + if test -e /usr/sbin/lpc; then chmod -h 0 /usr/sbin/lpc; fi +.endif post-install: ${INSTALL} -d ${CUPS_ETCDIR}/ -.if defined(CUPS_OVERWRITE_BASE) - ${SH} ${PKGINSTALL} placeholder POST-INSTALL overwrite -.else - ${SH} ${PKGINSTALL} placeholder POST-INSTALL -.endif .for f in cupsd.conf mime.convs mime.types ${INSTALL_DATA} ${WRKSRC}/conf/${f} ${CUPS_ETCDIR}/${f}.N cd ${CUPS_ETCDIR}/; if test ! -f ${f}; then ${CP} -p ${f}.N ${f}; fi diff --git a/print/cups-base/pkg-install b/print/cups-base/pkg-install deleted file mode 100644 index 3e25b7ae4082..000000000000 --- a/print/cups-base/pkg-install +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh -PATH=/bin:/usr/sbin - -REPLACES_BINARIES="/usr/bin/lpr - /usr/bin/lp - /usr/bin/lpq - /usr/bin/lprm - /usr/bin/lpstat - /usr/sbin/lpc" - -case $2 in -POST-INSTALL) - # Unshade binaries - if [ "${3}" = "overwrite" ]; then - for FILE in ${REPLACES_BINARIES}; do - [ -e "${FILE}" ] && chmod -h 0 "${FILE}" - done - fi - ;; -esac diff --git a/print/cups-base/pkg-plist b/print/cups-base/pkg-plist index fec1783ccb08..cbba8a9f9583 100644 --- a/print/cups-base/pkg-plist +++ b/print/cups-base/pkg-plist @@ -15,6 +15,11 @@ @unexec rmdir /var/log/cups 2>/dev/null || true @unexec rmdir /var/run/cups/certs 2>/dev/null || true @unexec rmdir /var/run/cups 2>/dev/null || true +%%OVERWRITE%%@exec if test -e /usr/bin/lp; then chmod -h 0 /usr/bin/lp; fi +%%OVERWRITE%%@exec if test -e /usr/bin/lpq; then chmod -h 0 /usr/bin/lpq; fi +%%OVERWRITE%%@exec if test -e /usr/bin/lpr; then chmod -h 0 /usr/bin/lpr; fi +%%OVERWRITE%%@exec if test -e /usr/bin/lprm; then chmod -h 0 /usr/bin/lprm; fi +%%OVERWRITE%%@exec if test -e /usr/sbin/lpc; then chmod -h 0 /usr/sbin/lpc; fi @unexec if cmp -s %D/etc/cups/cupsd.conf.N %D/etc/cups/cupsd.conf; then rm -f %D/etc/cups/cupsd.conf; fi etc/cups/cupsd.conf.N @exec if test ! -f %D/etc/cups/cupsd.conf; then cp -p %D/etc/cups/cupsd.conf.N %D/etc/cups/cupsd.conf; fi |