blob: cc754dc01d11b28156005a76c04ebc13bac185cf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
# $NetBSD: Makefile,v 1.57 2010/02/12 00:18:29 joerg Exp $
DISTNAME= magicfilter-1.2
PKGREVISION= 7
CATEGORIES= print
MASTER_SITES= ${MASTER_SITE_SUNSITE:=system/printing/}
MAINTAINER= pkgsrc-users@NetBSD.org
COMMENT= Customizable, extensible automatic printer filter
LICENSE= gnu-gpl-v2
PKG_DESTDIR_SUPPORT= user-destdir
# Any version will do:
#
DEPENDS+= a2ps-[0-9]*:../../print/a2ps
DEPENDS+= netpbm-[0-9]*:../../graphics/netpbm
DEPENDS+= papersize-[0-9]*:../../print/papersize
DEPENDS+= dvipsk-[0-9]*:../../print/dvipsk
USE_TOOLS+= gmake gs:run gzip
GNU_CONFIGURE= yes
CONFIGURE_ENV+= GHOSTSCRIPT=${TOOLS_PATH.gs}
CONFIGURE_ENV+= GZIP=${TOOLS_GZIP_CMD:Q}
FILTER_DIR= libexec/magicfilter
.include "../../mk/bsd.prefs.mk"
BUILD_DEFS+= PAPERSIZE
PAPERSIZE?= A4
LOWER_PAPERSIZE_cmd= ${ECHO} ${PAPERSIZE} | ${TR} "[A-Z]" "[a-z]"
LOWER_PAPERSIZE= ${LOWER_PAPERSIZE_cmd:sh}
SUBST_CLASSES+= mf
SUBST_STAGE.mf= post-build
SUBST_MESSAGE.mf= Adjusting paper size in filters.
SUBST_FILES.mf= filters/*-filter
SUBST_SED.mf= -e 's/-sOutputFile=-/& -sPAPERSIZE=${LOWER_PAPERSIZE:Q:Q}/'
SUBST_CLASSES+= gs
SUBST_STAGE.gs= post-configure
SUBST_MESSAGE.gs= Adjusting ghostscript temporary directory.
SUBST_FILES.gs= filters/filters2.h
SUBST_SED.gs= -e 's,${PREFIX}/bin/gs,${SETENV} TEMP=$${TMPDIR:-/tmp} &,'
INSTALLATION_DIRS+= bin ${FILTER_DIR} ${PKGMANDIR}/man8
GENERATE_PLIST+= \
cd ${WRKSRC}/filters && \
for f in *-filter; do \
${ECHO} ${FILTER_DIR}/"$$f"; \
done;
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/magicfilter ${DESTDIR}${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/magicfilter.man ${DESTDIR}${PREFIX}/${PKGMANDIR}/man8/magicfilter.8
set -e; \
cd ${WRKSRC}/filters; \
for f in *-filter; do \
${ECHO} "Installing $$f as ${DESTDIR}${PREFIX}/${FILTER_DIR}/$$f"; \
${INSTALL_SCRIPT} "$$f" ${DESTDIR}${PREFIX}/${FILTER_DIR}/"$$f"; \
done
.include "../../mk/bsd.pkg.mk"
|