aboutsummaryrefslogtreecommitdiff
path: root/print/alignmargins/Makefile
blob: 16ea60b2012a061ced7ab6cb65428fd2baab59ef (plain) (blame)
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
# Created by: Michael Nottebrock <lofi@FreeBSD.org>
# $FreeBSD$

PORTNAME=	alignmargins
PORTVERSION=	1.0
PORTREVISION=	1
CATEGORIES=	print
MASTER_SITES=	${MASTER_SITE_LOCAL} \
		http://www.linuxprinting.org/download/printing/
MASTER_SITE_SUBDIR=lofi
DISTFILES=	alignmargins align.ps

MAINTAINER=	ports@FreeBSD.org
COMMENT=	Utility script to generate custom margins in PPDs for CUPS

NO_BUILD=	yes
USES=		perl5

do-extract:
	@${RM} -rf ${WRKDIR}
	@${MKDIR} ${WRKDIR}
	@${MKDIR} ${WRKSRC}
	@for distfile in ${EXTRACT_ONLY}; do \
		if ! (cd ${WRKDIR} && ${CP} ${_DISTDIR}/$$distfile ${WRKSRC});\
		then \
			exit 1; \
		fi \
	done

post-patch:
	${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \
			-e 's|%%DATADIR%%|${DATADIR}|g' \
		${WRKSRC}/alignmargins

do-install:
	${INSTALL_SCRIPT} ${WRKSRC}/alignmargins ${LOCALBASE}/bin
	${MKDIR} ${DATADIR}
	${INSTALL_DATA} ${WRKSRC}/align.ps ${DATADIR}

.include <bsd.port.mk>