aboutsummaryrefslogtreecommitdiffstats
path: root/devel/glib20-reference/bsd.gnome-reference.mk
blob: 9335fc3b6e4b3658cb731a7f2c3a60d358b697e1 (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
# $FreeBSD$

PARENTDIR?= ${.CURDIR:S|-reference$||}
REFERENCE_PORT= ${PKGORIGIN:S|-reference$||}

.include "${PARENTDIR}/Makefile"

.if defined(NOPORTDOCS)
IGNORE=     This port installs documents, but you have selected NOPORTDOCS
.endif

.if !defined(DOCSDIR)
DOCSDIR:=   ${PREFIX}/share/doc/${PORTNAME}
.endif
.if !defined(EXAMPLESDIR)
EXAMPLESDIR:=   ${PREFIX}/share/examples/${PORTNAME}
.endif
.if defined(DISTNAME)
DISTNAME:=  ${DISTNAME}
.else
DISTNAME:=  ${PORTNAME}-${DISTVERSIONPREFIX}${DISTVERSION}${DISTVERSIONSUFFIX}
.endif
.if defined(MASTER_SITE_SUBDIR)
MASTER_SITE_SUBDIR:=    ${MASTER_SITE_SUBDIR}
.endif
PKGNAMESUFFIX:= ${PKGNAMESUFFIX}-reference
.if defined(LATEST_LINK)
LATEST_LINK:=   ${LATEST_LINK}-reference
.endif

COMMENT=    Programming reference for ${REFERENCE_PORT}

DISTINFO_FILE=  ${PARENTDIR}/distinfo

REFERENCE_SRC?= ${WRKSRC}/docs/reference
BOOKS?=     .

PORTDOCS?=  *

.if !target(do-build)
do-build:
    @${DO_NADA}
.endif

make-descr:
    @${ECHO_CMD} "This port contains the programming reference for ${REFERENCE_PORT}." > ${DESCR}
    @www=`${GREP} "^WWW:" ${PARENTDIR}/pkg-descr` || ${TRUE}; \
    if [ -n "$$www" ]; then \
        ${ECHO_CMD} "" >> ${DESCR}; \
        ${ECHO_CMD} "$$www" >> ${DESCR}; \
    fi

.if !target(do-install)
do-install:
.    for d in ${BOOKS}
    if [ -d ${REFERENCE_SRC}/${d}/html ]; then \
        ${MKDIR} ${DOCSDIR}/${d}; \
        cd ${REFERENCE_SRC}/${d}/html && \
        ${FIND} * -type d ! -empty -exec ${MKDIR} "${DOCSDIR}/${d}/{}" \; && \
        ${FIND} * -type f -exec ${INSTALL_DATA} "{}" "${DOCSDIR}/${d}/{}" \; ; \
    fi
.    endfor
.endif

.include <bsd.port.mk>