aboutsummaryrefslogtreecommitdiffstats
path: root/graphics/gimp-manual-html/Makefile
blob: 25e97347755c489cf55289a0871c0948f8e5146b (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
60
61
62
63
64
65
# New ports collection makefile for:    gimp-manual
# Date created:     5 June 1998
# Whom:         Brett Taylor
#
# $FreeBSD$
#

PORTNAME=   GimpUserManual
PORTVERSION=    2
CATEGORIES= graphics
MASTER_SITES=   ftp://manual.gimp.org/pub/manual/
PKGNAMESUFFIX=  -${DOCFORMAT}

MAINTAINER= ports@FreeBSD.org
COMMENT=    The user manual for the GNU Image Manipulation Program (GIMP)

.if !defined(DOCFORMAT)
DOCFORMAT=HTML
.else
.if ${DOCFORMAT} != "HTML" && ${DOCFORMAT} != "PDF"
.BEGIN:
    @${ECHO_MSG} "ERROR: invalid value for DOCFORMAT: \"${DOCFORMAT}\""
    @${ECHO_MSG} "Possible values are:  HTML, PDF."
    @${FALSE}
.endif
.endif

PLIST=      ${PKGDIR}/pkg-plist_${DOCFORMAT}

pre-everything::
    @${ECHO_MSG} "This manual is available in two formats: HTML and PDF."
    @${ECHO_MSG} "Note that the manual is pretty darn big."

PREFIX?=    ${X11BASE}  # This port itself does not require Xlib
EXTRACT_ONLY=   #empty
NO_BUILD=   yes

.if ${DOCFORMAT} == "HTML"
DISTFILES=  GimpUsersManual_SecondEdition-HTML_Color.tar.gz \
        GimpUsersManual_SecondEdition-HTML_Search.tar.gz

do-install:
    @${MKDIR} ${PREFIX}/share/doc/gimp
    for file in ${DISTFILES} ; do \
        cd ${PREFIX}/share/doc/gimp; \
        ${TAR} -zxf ${DISTDIR}/$${file}; \
        ${CHOWN} -R root:wheel ${PREFIX}/share/doc/gimp; \
    done
.endif

.if ${DOCFORMAT} == "PDF"
DISTFILES=  GimpUsersManual_SecondEdition-PDF_Color.pdf \
        GimpUsersManual_SecondEdition-PDF.pdf

EXTRACT_ONLY=   #empty
NO_BUILD=   yes

do-install:
    @${MKDIR} ${PREFIX}/share/doc/gimp
    for file in ${DISTFILES} ; do \
        ${INSTALL_DATA} ${DISTDIR}/$${file} ${PREFIX}/share/doc/gimp/ ; \
    done
.endif

.include <bsd.port.mk>