Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 May 2014 19:11:27 +0000 (UTC)
From:      Rene Ladan <rene@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r353887 - head/print/cups-pdf
Message-ID:  <201405121911.s4CJBRHJ003400@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rene
Date: Mon May 12 19:11:26 2014
New Revision: 353887
URL: http://svnweb.freebsd.org/changeset/ports/353887
QAT: https://qat.redports.org/buildarchive/r353887/

Log:
  - Add stage support [1]
  - Add option support [1]
  - Trim COMMENT
  - Strip binary
  - Use @sample keyword in pkg-plist
  - Do not try to remove etc/cups owned by dependency
  
  PR:		ports/189682 [1]
  Submitted by:	Matthieu Volat <mazhe@alkumuna.eu>

Modified:
  head/print/cups-pdf/Makefile
  head/print/cups-pdf/pkg-plist

Modified: head/print/cups-pdf/Makefile
==============================================================================
--- head/print/cups-pdf/Makefile	Mon May 12 18:15:08 2014	(r353886)
+++ head/print/cups-pdf/Makefile	Mon May 12 19:11:26 2014	(r353887)
@@ -10,7 +10,7 @@ MASTER_SITES=	http://www.cups-pdf.de/src
 DISTNAME=	${PORTNAME}_${PORTVERSION}
 
 MAINTAINER=	ports@FreeBSD.org
-COMMENT=	A virtual printer for CUPS to produce PDF files
+COMMENT=	Virtual printer for CUPS to produce PDF files
 
 LICENSE=GPLv2
 LICENSE_FILE=${WRKSRC}/COPYING
@@ -21,6 +21,11 @@ WRKSRC=		${WRKDIR}/${PORTNAME}-${PORTVER
 
 USE_GHOSTSCRIPT_RUN=	yes
 
+OPTIONS_DEFINE=		DOCS
+OPTIONS_DEFAULT=	DOCS
+
+.include <bsd.port.options.mk>
+
 SUBST_CMD=		-e "s,\#GhostScript /usr/bin/gs,GhostScript ${LOCALBASE}/bin/gs," \
 			-e 's,\#GSTmp /var/tmp,GSTmp /tmp,' \
 			-e 's,\#Grp lp,Grp daemon,' \
@@ -49,7 +54,6 @@ SUBST_CMD+=	-e 's,\#Out /var/spool/cups-
 SUBST_CMD+=	-e "s,\#Log /var/log/cups,Log ${LOG_DIRECTORY},"
 .endif
 
-NO_STAGE=	yes
 pre-everything::
 .if !defined(PDF_VERSION) || !defined(HOME_SUBDIR) || \
 !defined(OUTPUT_DIRECTORY) || !defined(LOG_DIRECTORY)
@@ -82,23 +86,18 @@ do-build:
 	cd ${WRKSRC}/src; ${CC} ${CFLAGS} -o cups-pdf cups-pdf.c
 
 do-install:
-	${MKDIR} ${PREFIX}/libexec/cups/backend
-	${INSTALL} -o root -g wheel -m 0700 ${WRKSRC}/src/cups-pdf ${PREFIX}/libexec/cups/backend
-	${MKDIR} ${PREFIX}/share/cups/model
+	${MKDIR} ${STAGEDIR}${PREFIX}/libexec/cups/backend
+	${INSTALL} ${WRKSRC}/src/cups-pdf ${STAGEDIR}${PREFIX}/libexec/cups/backend
+	${STRIP_CMD} ${STAGEDIR}${PREFIX}/libexec/cups/backend/cups-pdf
+	${MKDIR} ${STAGEDIR}${PREFIX}/share/cups/model
 	${INSTALL_DATA} ${WRKSRC}/extra/CUPS-PDF.ppd \
-	${PREFIX}/share/cups/model/CUPS-PDF.ppd
-	${MKDIR} ${PREFIX}/etc/cups
-	${INSTALL_DATA} ${WRKSRC}/extra/cups-pdf.conf \
-	${PREFIX}/etc/cups/cups-pdf.conf.sample
-.if !defined(NOPORTDOCS)
-	${MKDIR} ${DOCSDIR}
-	${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}/
-.endif
+		${STAGEDIR}${PREFIX}/share/cups/model/CUPS-PDF.ppd
+	${MKDIR} ${STAGEDIR}${PREFIX}/etc/cups
+	${MKDIR} ${STAGEDIR}${DOCSDIR}
+	${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR}/
 
 post-install:
-	@if [ ! -f ${PREFIX}/etc/cups/cups-pdf.conf ]; then \
-	${CP} -p ${PREFIX}/etc/cups/cups-pdf.conf.sample \
-	${PREFIX}/etc/cups/cups-pdf.conf ; \
-	fi
+	${INSTALL_DATA} ${WRKSRC}/extra/cups-pdf.conf \
+		${STAGEDIR}${PREFIX}/etc/cups/cups-pdf.conf.sample
 
 .include <bsd.port.mk>

Modified: head/print/cups-pdf/pkg-plist
==============================================================================
--- head/print/cups-pdf/pkg-plist	Mon May 12 18:15:08 2014	(r353886)
+++ head/print/cups-pdf/pkg-plist	Mon May 12 19:11:26 2014	(r353887)
@@ -1,11 +1,10 @@
+@mode 0700
 libexec/cups/backend/cups-pdf
+@mode
 share/cups/model/CUPS-PDF.ppd
-@unexec if cmp -s %D/etc/cups/cups-pdf.conf.sample %D/etc/cups/cups-pdf.conf; then rm -f %D/etc/cups/cups-pdf.conf; fi
-etc/cups/cups-pdf.conf.sample
-@exec if [ ! -f %D/etc/cups/cups-pdf.conf ] ; then cp -p %D/%F %B/cups-pdf.conf; fi
+@sample etc/cups/cups-pdf.conf.sample
 %%PORTDOCS%%%%DOCSDIR%%/README
 %%PORTDOCS%%@dirrm %%DOCSDIR%%
 @dirrmtry libexec/cups/backend
 @dirrmtry libexec/cups
 @dirrmtry share/cups
-@dirrmtry etc/cups



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405121911.s4CJBRHJ003400>