pkgsrc/print/psutils/Makefile

51 lines
1.4 KiB
Makefile
Raw Normal View History

2008-06-12 04:14:13 +02:00
# $NetBSD: Makefile,v 1.38 2008/06/12 02:14:43 joerg Exp $
DISTNAME= psutils-p17
PKGNAME= psutils-1.17
PKGREVISION= 2
CATEGORIES= print
MASTER_SITES= http://gd.tuwien.ac.at/publishing/tex/tex-utils/psutils/
2003-11-03 01:36:02 +01:00
MAINTAINER= dillo@NetBSD.org
HOMEPAGE= http://www.go.dlr.de/wt/dv/ig/pdinfo_dv/psutils.html
COMMENT= Utilities for manipulating PostScript documents
2008-06-12 04:14:13 +02:00
PKG_DESTDIR_SUPPORT= user-destdir
WRKSRC= ${WRKDIR}/psutils
USE_TOOLS+= perl:run
.include "../../mk/bsd.prefs.mk"
BUILD_DEFS+= PAPERSIZE
.if !defined(PAPERSIZE)
PKG_FAIL_REASON+= "PAPERSIZE must be defined by the pkgsrc user."
.else
. if ${PAPERSIZE} != "A4" && ${PAPERSIZE} != "Letter"
PKG_FAIL_REASON+= "Invalid PAPERSIZE (${PAPERSIZE}). Choose one of A4 or Letter."
. endif
.endif
MAKE_ENV+= PERL5=${PERL5:Q}
MAKE_FLAGS+= PAPER=`${ECHO} ${PAPERSIZE} | ${TR} '[A-Z]' '[a-z]'`
2008-06-12 04:14:13 +02:00
MAKE_FLAGS+= MANDIR=${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
2006-09-09 04:41:53 +02:00
MAKE_FILE= Makefile.unix
1999-10-05 15:59:57 +02:00
EGDIR= ${PREFIX}/share/examples/psutils
CONF_FILES= ${EGDIR}/psutils.cfg ${PKG_SYSCONFDIR}/psutils.cfg
SUBST_CLASSES+= psu
SUBST_STAGE.psu= pre-configure
SUBST_MESSAGE.psu= Adjusting the installation prefix.
SUBST_FILES.psu= psutil.c
SUBST_SED.psu= -e "s|@prefix@|${PREFIX}|g"
2008-06-12 04:14:13 +02:00
INSTALLATION_DIRS= ${EGDIR}
INSTALL_MAKE_FLAGS= PREFIX=${DESTDIR}${PREFIX}
post-install:
low=`${ECHO} ${PAPERSIZE} | ${TR} '[A-Z]' '[a-z]'` \
2008-06-12 04:14:13 +02:00
&& ${ECHO} "PAPERSIZE=$$low" > ${DESTDIR}${EGDIR}/psutils.cfg
.include "../../mk/bsd.pkg.mk"