2019-11-04 20:57:58 +01:00
|
|
|
# $NetBSD: Makefile,v 1.60 2019/11/04 19:57:59 rillig Exp $
|
1998-06-23 23:35:55 +02:00
|
|
|
|
|
|
|
DISTNAME= magicfilter-1.2
|
2013-04-24 12:06:47 +02:00
|
|
|
PKGREVISION= 8
|
1998-06-23 23:35:55 +02:00
|
|
|
CATEGORIES= print
|
1999-04-15 22:39:38 +02:00
|
|
|
MASTER_SITES= ${MASTER_SITE_SUNSITE:=system/printing/}
|
1998-06-23 23:35:55 +02:00
|
|
|
|
2006-03-04 22:28:51 +01:00
|
|
|
MAINTAINER= pkgsrc-users@NetBSD.org
|
2003-07-21 19:10:16 +02:00
|
|
|
COMMENT= Customizable, extensible automatic printer filter
|
2009-09-01 00:16:39 +02:00
|
|
|
LICENSE= gnu-gpl-v2
|
1998-06-23 23:35:55 +02:00
|
|
|
|
2002-05-20 16:04:43 +02:00
|
|
|
# Any version will do:
|
|
|
|
#
|
2001-09-28 01:17:41 +02:00
|
|
|
DEPENDS+= a2ps-[0-9]*:../../print/a2ps
|
2002-05-19 18:29:08 +02:00
|
|
|
DEPENDS+= netpbm-[0-9]*:../../graphics/netpbm
|
2001-09-28 01:17:41 +02:00
|
|
|
DEPENDS+= papersize-[0-9]*:../../print/papersize
|
2009-02-27 11:00:29 +01:00
|
|
|
DEPENDS+= dvipsk-[0-9]*:../../print/dvipsk
|
1998-06-23 23:35:55 +02:00
|
|
|
|
2005-11-28 07:41:20 +01:00
|
|
|
USE_TOOLS+= gmake gs:run gzip
|
1998-06-23 23:35:55 +02:00
|
|
|
GNU_CONFIGURE= yes
|
2005-11-28 07:41:20 +01:00
|
|
|
CONFIGURE_ENV+= GHOSTSCRIPT=${TOOLS_PATH.gs}
|
2019-11-04 20:57:58 +01:00
|
|
|
CONFIGURE_ENV+= GZIP=${TOOLS_GZIP_CMD:Q}
|
1998-06-23 23:35:55 +02:00
|
|
|
|
1998-07-05 12:09:58 +02:00
|
|
|
FILTER_DIR= libexec/magicfilter
|
|
|
|
|
1998-11-11 12:28:02 +01:00
|
|
|
.include "../../mk/bsd.prefs.mk"
|
|
|
|
|
2019-11-04 20:57:58 +01:00
|
|
|
BUILD_DEFS+= PAPERSIZE
|
|
|
|
PAPERSIZE?= A4
|
2006-08-31 10:22:38 +02:00
|
|
|
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}/'
|
|
|
|
|
2008-02-15 16:47:56 +01:00
|
|
|
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} &,'
|
|
|
|
|
2007-03-24 20:21:18 +01:00
|
|
|
INSTALLATION_DIRS+= bin ${FILTER_DIR} ${PKGMANDIR}/man8
|
2006-08-31 10:22:38 +02:00
|
|
|
|
|
|
|
GENERATE_PLIST+= \
|
2009-06-15 00:57:58 +02:00
|
|
|
cd ${WRKSRC}/filters && \
|
2006-08-31 10:22:38 +02:00
|
|
|
for f in *-filter; do \
|
|
|
|
${ECHO} ${FILTER_DIR}/"$$f"; \
|
2009-06-16 17:25:31 +02:00
|
|
|
done;
|
1998-11-11 12:28:02 +01:00
|
|
|
|
2010-02-12 01:13:23 +01:00
|
|
|
do-install:
|
|
|
|
${INSTALL_PROGRAM} ${WRKSRC}/magicfilter ${DESTDIR}${PREFIX}/bin
|
|
|
|
${INSTALL_MAN} ${WRKSRC}/magicfilter.man ${DESTDIR}${PREFIX}/${PKGMANDIR}/man8/magicfilter.8
|
2006-08-31 10:22:38 +02:00
|
|
|
set -e; \
|
|
|
|
cd ${WRKSRC}/filters; \
|
|
|
|
for f in *-filter; do \
|
2010-02-12 01:13:23 +01:00
|
|
|
${ECHO} "Installing $$f as ${DESTDIR}${PREFIX}/${FILTER_DIR}/$$f"; \
|
|
|
|
${INSTALL_SCRIPT} "$$f" ${DESTDIR}${PREFIX}/${FILTER_DIR}/"$$f"; \
|
2006-08-31 10:22:38 +02:00
|
|
|
done
|
1998-06-23 23:35:55 +02:00
|
|
|
|
|
|
|
.include "../../mk/bsd.pkg.mk"
|