Fixup fromcvs/togit conversion
[pkgsrcv2.git] / print / cups-pdf / Makefile
1 # $NetBSD: Makefile,v 1.2 2011/11/02 21:13:35 dholland Exp $
2
3 COMMENT=                PDF backend for CUPS
4
5 DISTNAME=               cups-pdf-2.6.1
6 PKGREVISION=            1
7 CATEGORIES=             print
8
9 HOMEPAGE=               http://www.cups-pdf.de/
10 MASTER_SITES=           ${HOMEPAGE}src/
11 DISTFILES=              ${DISTNAME:S/pdf-/pdf_/}.tar.gz
12 LICENSE=                gnu-gpl-v2
13 PKG_DESTDIR_SUPPORT=    user-destdir
14
15 DEPENDS+=               cups-[0-9]*:../../print/cups
16
17 USE_TOOLS+=             perl:run
18 REPLACE_PERL+=          contrib/cups-pdf-dispatch-0.1/cups-pdf-dispatch
19
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,'
27
28 CONF_FILES+=            ${PREFIX}/share/examples/cups/cups-pdf.conf \
29                         ${PKG_SYSCONFDIR}/cups/cups-pdf.conf
30
31 INSTALLATION_DIRS+=     ${PREFIX}/bin \
32                         ${PREFIX}/libexec/cups/backend \
33                         ${PREFIX}/share/cups/model \
34                         ${PREFIX}/share/examples/cups
35
36 do-build:
37         cd ${WRKSRC} && \
38         ${CC} ${CFLAGS} -o src/cups-pdf src/cups-pdf.c
39
40 #pre-install:
41 #       ${SUBST_CMD} ${WRKBUILD}/extra/cups-pdf.conf
42
43 do-install:
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/
56
57 .include "../../mk/bsd.pkg.mk"