summaryrefslogtreecommitdiffstats
path: root/print
diff options
context:
space:
mode:
authoritetcu <itetcu@FreeBSD.org>2006-06-09 06:18:55 +0000
committeritetcu <itetcu@FreeBSD.org>2006-06-09 06:18:55 +0000
commit610e4f76fedf18e791e6ad61543963f96e65e299 (patch)
tree2159c60de35bdb24128994950c5833991f24a318 /print
parent78901355dc409f8694b8890c7c580a2ecd7dd1f1 (diff)
downloadFreeBSD-ports-610e4f76fedf18e791e6ad61543963f96e65e299.zip
FreeBSD-ports-610e4f76fedf18e791e6ad61543963f96e65e299.tar.gz
- patch cups-pdf.conf instead of header file.
- install cups-pdf.conf and cups-pdf.conf.sample - bump PORTREVISION for plist change - pass maintainership to submitter PR: ports/98408 Submitted by: Simon Olofsson <simon@olofsson.de> Approved by: Mark Reidel <ports@mark.reidel.info> (old maintainer) lawrance (mentor, implicit)
Diffstat (limited to 'print')
-rw-r--r--print/cups-pdf/Makefile28
-rw-r--r--print/cups-pdf/pkg-plist3
2 files changed, 22 insertions, 9 deletions
diff --git a/print/cups-pdf/Makefile b/print/cups-pdf/Makefile
index 6ad39ec..076490d 100644
--- a/print/cups-pdf/Makefile
+++ b/print/cups-pdf/Makefile
@@ -7,6 +7,7 @@
PORTNAME= cups-pdf
PORTVERSION= 2.3.1
+PORTREVISION= 1
CATEGORIES= print
MASTER_SITES= http://www.physik.uni-wuerzburg.de/~vrbehr/cups-pdf/src/
DISTNAME= ${PORTNAME}_${PORTVERSION}
@@ -22,10 +23,10 @@ WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
USE_GHOSTSCRIPT_RUN= yes
-SUBST_CMD= -e "s,/usr/bin/gs,${LOCALBASE}/bin/gs," \
- -e 's,/var/tmp,/tmp,' \
- -e 's,"lp","daemon",' \
- -e 's,/var/spool/cups-pdf/SPOOL,/var/spool/cups-pdf,'
+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,' \
+ -e 's,\#Spool /var/spool/cups-pdf/SPOOL,Spool /var/spool/cups-pdf,'
.ifdef(PDF_VERSION)
.if ${PDF_VERSION} == 1.2
@@ -35,19 +36,19 @@ SUBST_CMD= -e "s,/usr/bin/gs,${LOCALBASE}/bin/gs," \
.else
BROKEN= Unsupported PDF-Version selected: ${PDF_VERSION}
.endif
-SUBST_CMD+= -e 's,CPPDFVER "1.4",CPPDFVER "${PDF_VERSION}",'
+SUBST_CMD+= -e "s,\#PDFVer 1.4,PDFVer ${PDF_VERSION},"
.endif
.ifdef(HOME_SUBDIR)
-SUBST_CMD+= -e 's,CPOUT "/var/spool/cups-pdf",CPOUT "$$HOME",' -e 's,CPHOMESUB "cups-pdf",CPHOMESUB "${HOME_SUBDIR}",'
+SUBST_CMD+= -e "s,\#Out /var/spool/cups-pdf/$${USER},Out $${HOME}/${HOME_SUBDIR},"
.else
.ifdef(OUTPUT_DIRECTORY)
-SUBST_CMD+= -e 's,CPOUT "/var/spool/cups-pdf",CPOUT "${OUTPUT_DIRECTORY}",'
+SUBST_CMD+= -e "s,\#Out /var/spool/cups-pdf/$${USER},Out ${OUTPUT_DIRECTORY},ยจ
.endif
.endif
.ifdef(LOG_DIRECTORY)
-SUBST_CMD+= -e "s,/var/log/cups,${LOG_DIRECTORY},"
+SUBST_CMD+= -e "s,\#Log /var/log/cups,Log ${LOG_DIRECTORY},"
.endif
pre-everything::
@@ -73,7 +74,10 @@ post-extract:
@${GUNZIP_CMD} ${WRKSRC}/extra/PostscriptColor.ppd.gz
post-configure:
- @${REINPLACE_CMD} ${SUBST_CMD} ${WRKSRC}/src/cups-pdf.h
+ @${REINPLACE_CMD} ${SUBST_CMD} ${WRKSRC}/extra/cups-pdf.conf
+ @${REINPLACE_CMD} -e \
+ 's,CPCONFIG "/etc/cups/cups-pdf.conf",CPCONFIG "${LOCALBASE}/etc/cups/cups-pdf.conf",' \
+ ${WRKSRC}/src/cups-pdf.h
do-build:
cd ${WRKSRC}/src; ${CC} ${CFLAGS} -o cups-pdf cups-pdf.c
@@ -84,6 +88,12 @@ do-install:
.if !defined(NOPORTDOCS)
${MKDIR} ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}/
+ ${INSTALL_DATA} ${WRKSRC}/extra/cups-pdf.conf ${LOCALBASE}/etc/cups/cups-pdf.conf.sample
.endif
+post-install:
+ @if [ ! -f ${LOCALBASE}/etc/cups/cups-pdf.conf ]; then \
+ ${CP} -p ${LOCALBASE}/etc/cups/cups-pdf.conf.sample ${LOCALBASE}/etc/cups/cups-pdf.conf ; \
+ fi
+
.include <bsd.port.post.mk>
diff --git a/print/cups-pdf/pkg-plist b/print/cups-pdf/pkg-plist
index 2cf9222..8713f9c 100644
--- a/print/cups-pdf/pkg-plist
+++ b/print/cups-pdf/pkg-plist
@@ -1,4 +1,7 @@
libexec/cups/backend/cups-pdf
share/cups/model/PostscriptColor.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
%%PORTDOCS%%%%DOCSDIR%%/README
%%PORTDOCS%%@dirrm %%DOCSDIR%%
OpenPOWER on IntegriCloud