diff options
author | dinoex <dinoex@FreeBSD.org> | 2011-03-08 04:43:15 +0800 |
---|---|---|
committer | dinoex <dinoex@FreeBSD.org> | 2011-03-08 04:43:15 +0800 |
commit | 414ac573d4a9ed10ab73d99b557f770bf46ee85d (patch) | |
tree | 13f05e2d541923788b5a35b4081b80ca88a8b1d4 /print | |
parent | 42274efc5da48677cad69a0e91ce1b5b5c91c962 (diff) | |
download | freebsd-ports-gnome-414ac573d4a9ed10ab73d99b557f770bf46ee85d.tar.gz freebsd-ports-gnome-414ac573d4a9ed10ab73d99b557f770bf46ee85d.tar.zst freebsd-ports-gnome-414ac573d4a9ed10ab73d99b557f770bf46ee85d.zip |
- preserve modified etc/pam.d/cups
PR: 155218
Sumbitted by: mm
Diffstat (limited to 'print')
-rw-r--r-- | print/cups-base/Makefile | 6 | ||||
-rw-r--r-- | print/cups-base/files/patch-conf-Makefile | 16 | ||||
-rw-r--r-- | print/cups-base/pkg-plist | 4 |
3 files changed, 25 insertions, 1 deletions
diff --git a/print/cups-base/Makefile b/print/cups-base/Makefile index 80cc315301b9..88e47d3f77d8 100644 --- a/print/cups-base/Makefile +++ b/print/cups-base/Makefile @@ -362,6 +362,12 @@ post-install: ${INSTALL_DATA} ${WRKSRC}/conf/${f} ${CUPS_ETCDIR}/${f}.N cd ${CUPS_ETCDIR}/; if test ! -f ${f}; then ${CP} -p ${f}.N ${f}; fi .endfor +.if defined(WITH_PAM) + @if [ ! -f ${PREFIX}/etc/pam.d/cups ]; then \ + ${CP} -p ${PREFIX}/etc/pam.d/cups.default \ + ${PREFIX}/etc/pam.d/cups ; \ + fi +.endif ${MKDIR} ${EXAMPLESDIR} ${INSTALL_DATA} ${WRKDIR}/ulpt-cupsd.conf ${EXAMPLESDIR}/ ${INSTALL_SCRIPT} ${WRKDIR}/ulpt-cupsd.sh ${PREFIX}/sbin/ diff --git a/print/cups-base/files/patch-conf-Makefile b/print/cups-base/files/patch-conf-Makefile new file mode 100644 index 000000000000..73633ede5244 --- /dev/null +++ b/print/cups-base/files/patch-conf-Makefile @@ -0,0 +1,16 @@ +--- conf/Makefile.orig 2011-03-03 00:19:41.555484014 +0100 ++++ conf/Makefile 2011-03-03 00:20:17.791387420 +0100 +@@ -90,10 +90,10 @@ + done + -if test x$(PAMDIR) != x; then \ + $(INSTALL_DIR) -m 755 $(BUILDROOT)$(PAMDIR); \ +- if test -r $(BUILDROOT)$(PAMDIR)/cups ; then \ +- $(INSTALL_DATA) $(PAMFILE) $(BUILDROOT)$(PAMDIR)/cups.N ; \ ++ if test -r $(BUILDROOT)$(PAMDIR)/cups.default ; then \ ++ $(INSTALL_DATA) $(PAMFILE) $(BUILDROOT)$(PAMDIR)/cups.default.N ; \ + else \ +- $(INSTALL_DATA) $(PAMFILE) $(BUILDROOT)$(PAMDIR)/cups ; \ ++ $(INSTALL_DATA) $(PAMFILE) $(BUILDROOT)$(PAMDIR)/cups.default ; \ + fi ; \ + fi + diff --git a/print/cups-base/pkg-plist b/print/cups-base/pkg-plist index f6deb9be5af0..7c26a5d4c95f 100644 --- a/print/cups-base/pkg-plist +++ b/print/cups-base/pkg-plist @@ -38,7 +38,9 @@ etc/cups/mime.types.N etc/cups/snmp.conf.N @exec if test ! -f %D/etc/cups/snmp.conf; then cp -p %D/etc/cups/snmp.conf.N %D/etc/cups/snmp.conf; fi @exec chgrp cups %D/etc/cups -%%WITH_PAMD%%etc/pam.d/cups +@unexec if cmp -s %D/etc/pam.d/cups.default %D/etc/pam.d/cups; then rm -f %D/etc/pam.d/cups ; fi +%%WITH_PAMD%%etc/pam.d/cups.default +@exec if [ ! -f %D/etc/pam.d/cups ] ; then cp -p %D/%F %B/cups; fi bin/cancel bin/cupstestdsc bin/cupstestppd |