aboutsummaryrefslogtreecommitdiffstats
path: root/print/fpdf/Makefile
blob: bb51a830e868f915e5e6581e820543f47151469a (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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
# New ports collection makefile for: fpdf
# Date created:     21 March 2005
# Whom:         Thierry Thomas <thierry@pompo.net>
#
# $FreeBSD$
#

PORTNAME=   fpdf
PORTVERSION=    1.53
PORTREVISION=   1
CATEGORIES= print www
MASTER_SITES=   http://www.fpdf.org/fr/
DISTNAME=   ${PORTNAME}${PORTVERSION:S|.||}
EXTRACT_SUFX=   .tgz

MAINTAINER= thierry@FreeBSD.org
COMMENT=    A free PHP class to generate PDF files with pure PHP

USE_PHP=    zlib

FETCH_CMD=  /usr/bin/fetch -ARr -o ${DISTDIR}/${DISTFILES}
NO_BUILD=   yes

FPDF_DIR?=  share/fpdf

SUB_FILES=  pkg-message
SUB_LIST=   FPDF_DIR=${FPDF_DIR}
PLIST_SUB=  FPDF_DIR=${FPDF_DIR}

EXT2CNV=    afm htm php txt
DOCS=       FAQ.htm doc/* fpdf.css histo.htm install.txt tutoriel

do-fetch:
    @${FETCH_CMD} ${FETCH_BEFORE_ARGS}  \
        '${MASTER_SITES}dl.php?v=${PORTVERSION:S|.||}&f=${EXTRACT_SUFX:S|.||}'

pre-patch:
.for ext in ${EXT2CNV}
    @for f in `${FIND} ${WRKSRC} -type f -name "*.${ext}"` ; do \
        ${TR} -d '\r' < $$f > $$f.dos &&            \
        ${MV} $$f.dos $$f ; done
.endfor
    @${FIND} ${WRKSRC} -type f | ${XARGS} ${CHMOD} ${SHAREMODE}

do-install:
    ${MKDIR} ${PREFIX}/${FPDF_DIR}
    ${INSTALL_DATA} ${WRKSRC}/fpdf.php ${PREFIX}/${FPDF_DIR}
    ${CP} -R ${WRKSRC}/font ${PREFIX}/${FPDF_DIR}
.if !defined(NOPORTDOCS)
    ${MKDIR} ${DOCSDIR}
    ${CP} -R ${DOCS:S|^|${WRKSRC}/|} ${DOCSDIR}
.endif

post-install:
    @${ECHO_MSG}
    @${CAT} ${PKGMESSAGE}
    @${ECHO_MSG}

.include <bsd.port.mk>