Fixup fromcvs/togit conversion
[pkgsrcv2.git] / print / cups-pdf / Makefile
1 # $NetBSD: Makefile,v 1.5 2012/10/08 13:45:36 asau Exp $
2
3 COMMENT=                PDF backend for CUPS
4
5 DISTNAME=               cups-pdf-2.6.1
6 PKGREVISION=            3
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
14 DEPENDS+=               cups-[0-9]*:../../print/cups
15
16 USE_TOOLS+=             perl:run
17 REPLACE_PERL+=          contrib/cups-pdf-dispatch-0.1/cups-pdf-dispatch
18
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,'
26
27 CONF_FILES+=            ${PREFIX}/share/examples/cups/cups-pdf.conf \
28                         ${PKG_SYSCONFDIR}/cups/cups-pdf.conf
29
30 INSTALLATION_DIRS+=     ${PREFIX}/bin \
31                         ${PREFIX}/libexec/cups/backend \
32                         ${PREFIX}/share/cups/model \
33                         ${PREFIX}/share/examples/cups
34
35 do-build:
36         cd ${WRKSRC} && \
37         ${CC} ${CFLAGS} -o src/cups-pdf src/cups-pdf.c
38
39 #pre-install:
40 #       ${SUBST_CMD} ${WRKBUILD}/extra/cups-pdf.conf
41
42 do-install:
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/
55
56 .include "../../mk/bsd.pkg.mk"