aboutsummaryrefslogtreecommitdiff
path: root/print/cups-pdf
diff options
context:
space:
mode:
authorIon-Mihai Tetcu <itetcu@FreeBSD.org>2006-06-09 06:18:55 +0000
committerIon-Mihai Tetcu <itetcu@FreeBSD.org>2006-06-09 06:18:55 +0000
commitbc1ac8bd12631989a26faf2d518bfbe9c8ec4d7f (patch)
tree9fb2b663d210841ef38001a3d35ee5ae97edcb0e /print/cups-pdf
parentf2d9d84e35d604c01d7afa1f84a7658aaef68876 (diff)
downloadports-bc1ac8bd12631989a26faf2d518bfbe9c8ec4d7f.tar.gz
ports-bc1ac8bd12631989a26faf2d518bfbe9c8ec4d7f.zip
Notes
Diffstat (limited to 'print/cups-pdf')
-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 6ad39ecd2832..076490dee341 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 2cf9222ba7fc..8713f9c7d659 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%%