1 # $NetBSD: Makefile,v 1.2 2011/11/02 21:13:35 dholland Exp $
3 COMMENT= PDF backend for CUPS
5 DISTNAME= cups-pdf-2.6.1
9 HOMEPAGE= http://www.cups-pdf.de/
10 MASTER_SITES= ${HOMEPAGE}src/
11 DISTFILES= ${DISTNAME:S/pdf-/pdf_/}.tar.gz
13 PKG_DESTDIR_SUPPORT= user-destdir
15 DEPENDS+= cups-[0-9]*:../../print/cups
18 REPLACE_PERL+= contrib/cups-pdf-dispatch-0.1/cups-pdf-dispatch
20 SUBST_CLASSES+= fix-paths
21 SUBST_STAGE.fix-paths= pre-configure
22 SUBST_MESSAGE.fix-paths=Fixing absolute paths
23 SUBST_FILES.fix-paths= src/cups-pdf.h extra/cups-pdf.conf
24 SUBST_SED.fix-paths= -e 's,CPCONFIG "/etc/,CPCONFIG "${PREFIX}/etc/,'
25 SUBST_SED.fix-paths+= -e 's,"/usr/bin/gs","${PREFIX}/bin/gs",'
26 SUBST_SED.fix-paths+= -e 's,\#GhostScript /usr/bin/gs,GhostScript ${PREFIX}/bin/gs,'
28 CONF_FILES+= ${PREFIX}/share/examples/cups/cups-pdf.conf \
29 ${PKG_SYSCONFDIR}/cups/cups-pdf.conf
31 INSTALLATION_DIRS+= ${PREFIX}/bin \
32 ${PREFIX}/libexec/cups/backend \
33 ${PREFIX}/share/cups/model \
34 ${PREFIX}/share/examples/cups
38 ${CC} ${CFLAGS} -o src/cups-pdf src/cups-pdf.c
41 # ${SUBST_CMD} ${WRKBUILD}/extra/cups-pdf.conf
44 ${INSTALL_PROGRAM} ${WRKSRC}/src/cups-pdf \
45 ${DESTDIR}${PREFIX}/libexec/cups/backend/cups-pdf
46 ${INSTALL_SCRIPT} ${WRKSRC}/contrib/cups-pdf-dispatch-0.1/cups-pdf-dispatch \
47 ${DESTDIR}${PREFIX}/bin
48 ${INSTALL_DATA} ${WRKSRC}/extra/CUPS-PDF.ppd \
49 ${DESTDIR}${PREFIX}/share/cups/model/
50 ${INSTALL_DATA} ${WRKSRC}/extra/cups-pdf.conf \
51 ${DESTDIR}${PREFIX}/share/examples/cups/
52 ${INSTALL_DATA} ${WRKSRC}/contrib/cups-pdf-dispatch-0.1/cups-pdf-dispatch.conf \
53 ${DESTDIR}${PREFIX}/share/examples/cups/
54 ${INSTALL_DATA} ${WRKSRC}/contrib/cups-pdf-dispatch-0.1/examples/cups-pdf-dispatch-ldap.conf \
55 ${DESTDIR}${PREFIX}/share/examples/cups/
57 .include "../../mk/bsd.pkg.mk"