1 # $NetBSD: Makefile,v 1.5 2012/10/08 13:45:36 asau 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
14 DEPENDS+= cups-[0-9]*:../../print/cups
17 REPLACE_PERL+= contrib/cups-pdf-dispatch-0.1/cups-pdf-dispatch
19 SUBST_CLASSES+= fix-paths
20 SUBST_STAGE.fix-paths= pre-configure
21 SUBST_MESSAGE.fix-paths=Fixing absolute paths
22 SUBST_FILES.fix-paths= src/cups-pdf.h extra/cups-pdf.conf
23 SUBST_SED.fix-paths= -e 's,CPCONFIG "/etc/,CPCONFIG "${PREFIX}/etc/,'
24 SUBST_SED.fix-paths+= -e 's,"/usr/bin/gs","${PREFIX}/bin/gs",'
25 SUBST_SED.fix-paths+= -e 's,\#GhostScript /usr/bin/gs,GhostScript ${PREFIX}/bin/gs,'
27 CONF_FILES+= ${PREFIX}/share/examples/cups/cups-pdf.conf \
28 ${PKG_SYSCONFDIR}/cups/cups-pdf.conf
30 INSTALLATION_DIRS+= ${PREFIX}/bin \
31 ${PREFIX}/libexec/cups/backend \
32 ${PREFIX}/share/cups/model \
33 ${PREFIX}/share/examples/cups
37 ${CC} ${CFLAGS} -o src/cups-pdf src/cups-pdf.c
40 # ${SUBST_CMD} ${WRKBUILD}/extra/cups-pdf.conf
43 ${INSTALL_PROGRAM} ${WRKSRC}/src/cups-pdf \
44 ${DESTDIR}${PREFIX}/libexec/cups/backend/cups-pdf
45 ${INSTALL_SCRIPT} ${WRKSRC}/contrib/cups-pdf-dispatch-0.1/cups-pdf-dispatch \
46 ${DESTDIR}${PREFIX}/bin
47 ${INSTALL_DATA} ${WRKSRC}/extra/CUPS-PDF.ppd \
48 ${DESTDIR}${PREFIX}/share/cups/model/
49 ${INSTALL_DATA} ${WRKSRC}/extra/cups-pdf.conf \
50 ${DESTDIR}${PREFIX}/share/examples/cups/
51 ${INSTALL_DATA} ${WRKSRC}/contrib/cups-pdf-dispatch-0.1/cups-pdf-dispatch.conf \
52 ${DESTDIR}${PREFIX}/share/examples/cups/
53 ${INSTALL_DATA} ${WRKSRC}/contrib/cups-pdf-dispatch-0.1/examples/cups-pdf-dispatch-ldap.conf \
54 ${DESTDIR}${PREFIX}/share/examples/cups/
56 .include "../../mk/bsd.pkg.mk"