2013-09-21 00:43:59 +02:00
|
|
|
# Created by: Mark Reidel <ports@mark.reidel.info>
|
2004-06-17 22:00:24 +02:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= cups-pdf
|
2011-11-30 21:34:19 +01:00
|
|
|
PORTVERSION= 2.6.1
|
2012-06-01 07:26:28 +02:00
|
|
|
PORTREVISION= 1
|
2004-06-17 22:00:24 +02:00
|
|
|
CATEGORIES= print
|
2008-03-27 15:20:46 +01:00
|
|
|
MASTER_SITES= http://www.cups-pdf.de/src/ \
|
|
|
|
http://www.physik.uni-wuerzburg.de/~vrbehr/cups-pdf/src/
|
2005-01-30 14:37:35 +01:00
|
|
|
DISTNAME= ${PORTNAME}_${PORTVERSION}
|
2004-06-17 22:00:24 +02:00
|
|
|
|
2014-05-11 00:06:22 +02:00
|
|
|
MAINTAINER= ports@FreeBSD.org
|
2014-05-12 21:11:26 +02:00
|
|
|
COMMENT= Virtual printer for CUPS to produce PDF files
|
2004-06-17 22:00:24 +02:00
|
|
|
|
2011-03-29 19:53:51 +02:00
|
|
|
LICENSE=GPLv2
|
|
|
|
LICENSE_FILE=${WRKSRC}/COPYING
|
|
|
|
|
2011-11-30 21:34:19 +01:00
|
|
|
RUN_DEPENDS= ${LOCALBASE}/sbin/cupsd:${PORTSDIR}/print/cups-base
|
|
|
|
|
2005-01-30 14:37:35 +01:00
|
|
|
WRKSRC= ${WRKDIR}/${PORTNAME}-${PORTVERSION}
|
2004-06-17 22:00:24 +02:00
|
|
|
|
|
|
|
USE_GHOSTSCRIPT_RUN= yes
|
|
|
|
|
2014-05-12 21:11:26 +02:00
|
|
|
OPTIONS_DEFINE= DOCS
|
|
|
|
OPTIONS_DEFAULT= DOCS
|
|
|
|
|
|
|
|
.include <bsd.port.options.mk>
|
|
|
|
|
2006-06-09 08:18:55 +02:00
|
|
|
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,'
|
2004-06-17 22:00:24 +02:00
|
|
|
|
|
|
|
.ifdef(PDF_VERSION)
|
|
|
|
.if ${PDF_VERSION} == 1.2
|
|
|
|
.elif ${PDF_VERSION} == 1.3
|
|
|
|
.elif ${PDF_VERSION} == 1.4
|
|
|
|
.elif ${PDF_VERSION} == 1.5
|
|
|
|
.else
|
2006-05-19 09:27:32 +02:00
|
|
|
BROKEN= Unsupported PDF-Version selected: ${PDF_VERSION}
|
2004-06-17 22:00:24 +02:00
|
|
|
.endif
|
2006-06-09 08:18:55 +02:00
|
|
|
SUBST_CMD+= -e "s,\#PDFVer 1.4,PDFVer ${PDF_VERSION},"
|
2004-06-17 22:00:24 +02:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.ifdef(HOME_SUBDIR)
|
2006-06-09 23:20:51 +02:00
|
|
|
SUBST_CMD+= -e 's,\#Out /var/spool/cups-pdf/$${USER},Out $${HOME}/${HOME_SUBDIR},'
|
2004-06-17 22:00:24 +02:00
|
|
|
.else
|
|
|
|
.ifdef(OUTPUT_DIRECTORY)
|
2006-06-09 23:20:51 +02:00
|
|
|
SUBST_CMD+= -e 's,\#Out /var/spool/cups-pdf/$${USER},Out ${OUTPUT_DIRECTORY},'
|
2004-06-17 22:00:24 +02:00
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.ifdef(LOG_DIRECTORY)
|
2006-06-09 08:18:55 +02:00
|
|
|
SUBST_CMD+= -e "s,\#Log /var/log/cups,Log ${LOG_DIRECTORY},"
|
2004-06-17 22:00:24 +02:00
|
|
|
.endif
|
|
|
|
|
2006-05-19 09:27:32 +02:00
|
|
|
pre-everything::
|
2006-06-17 12:46:25 +02:00
|
|
|
.if !defined(PDF_VERSION) || !defined(HOME_SUBDIR) || \
|
|
|
|
!defined(OUTPUT_DIRECTORY) || !defined(LOG_DIRECTORY)
|
2004-06-17 22:00:24 +02:00
|
|
|
@${ECHO_MSG} ""
|
|
|
|
@${ECHO_MSG} "You may use the following build options:"
|
|
|
|
@${ECHO_MSG} ""
|
2006-06-17 12:46:25 +02:00
|
|
|
.endif
|
2004-06-17 22:00:24 +02:00
|
|
|
.if !defined(PDF_VERSION)
|
|
|
|
@${ECHO_MSG} "PDF_VERSION=1.2|1.3|1.4|1.5 PDF-version of PDF-files produced"
|
|
|
|
.endif
|
|
|
|
.if !defined(HOME_SUBDIR)
|
|
|
|
@${ECHO_MSG} "HOME_SUBDIR=<subdir> Place produced PDF-files in the"
|
|
|
|
@${ECHO_MSG} " directory ~/<subdir>/"
|
|
|
|
.endif
|
|
|
|
.if !defined(OUTPUT_DIRECTORY)
|
|
|
|
@${ECHO_MSG} "OUTPUT_DIRECTORY=<dir> Place produced PDF-files in the"
|
|
|
|
@${ECHO_MSG} " directory <dir>/"
|
|
|
|
.endif
|
|
|
|
.if !defined(LOG_DIRECTORY)
|
|
|
|
@${ECHO_MSG} "LOG_DIRECTORY=<dir> Place logfile into <dir>/cups-pdf_log"
|
|
|
|
.endif
|
|
|
|
|
|
|
|
post-configure:
|
2006-06-09 08:18:55 +02:00
|
|
|
@${REINPLACE_CMD} ${SUBST_CMD} ${WRKSRC}/extra/cups-pdf.conf
|
|
|
|
@${REINPLACE_CMD} -e \
|
2006-10-04 17:55:10 +02:00
|
|
|
's,CPCONFIG "/etc/cups/cups-pdf.conf",CPCONFIG "${PREFIX}/etc/cups/cups-pdf.conf",' \
|
2006-06-09 08:18:55 +02:00
|
|
|
${WRKSRC}/src/cups-pdf.h
|
2004-06-17 22:00:24 +02:00
|
|
|
|
2005-01-30 14:37:35 +01:00
|
|
|
do-build:
|
2005-03-08 15:27:43 +01:00
|
|
|
cd ${WRKSRC}/src; ${CC} ${CFLAGS} -o cups-pdf cups-pdf.c
|
2005-01-30 14:37:35 +01:00
|
|
|
|
2004-06-17 22:00:24 +02:00
|
|
|
do-install:
|
2014-05-12 21:11:26 +02:00
|
|
|
${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
|
2008-03-27 15:20:46 +01:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/extra/CUPS-PDF.ppd \
|
2014-05-12 21:11:26 +02:00
|
|
|
${STAGEDIR}${PREFIX}/share/cups/model/CUPS-PDF.ppd
|
|
|
|
${MKDIR} ${STAGEDIR}${PREFIX}/etc/cups
|
|
|
|
${MKDIR} ${STAGEDIR}${DOCSDIR}
|
|
|
|
${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR}/
|
2004-06-17 22:00:24 +02:00
|
|
|
|
2006-06-09 08:18:55 +02:00
|
|
|
post-install:
|
2014-05-12 21:11:26 +02:00
|
|
|
${INSTALL_DATA} ${WRKSRC}/extra/cups-pdf.conf \
|
|
|
|
${STAGEDIR}${PREFIX}/etc/cups/cups-pdf.conf.sample
|
2006-06-09 08:18:55 +02:00
|
|
|
|
2008-03-27 15:20:46 +01:00
|
|
|
.include <bsd.port.mk>
|