aboutsummaryrefslogtreecommitdiffstats
path: root/textproc/docbook-xsl/Makefile
blob: cdae518fd075b92847eb8e6076d9a75fcd517930 (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
# New ports collection makefile for:   docbook-xml
# Date created:        17 January 2002
# Whom:                des
#
# $FreeBSD$
#

PORTNAME=   docbook-xsl
PORTVERSION=    1.69.1
CATEGORIES= textproc
MASTER_SITES=   ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= docbook
DISTFILES=  ${DISTNAME}${EXTRACT_SUFX}

MAINTAINER= des@FreeBSD.org
COMMENT=    XSL DocBook stylesheets

RUN_DEPENDS=    ${XMLDIR}/docbook/4.2/catalog.xml:${PORTSDIR}/textproc/docbook-xml \
        ${XMLDIR}/sdocbook/4.1.2.5/catalog:${PORTSDIR}/textproc/sdocbook-xml

.ifndef NOPORTDOCS
DISTFILES+= ${PORTNAME}-doc-${PORTVERSION}${EXTRACT_SUFX}
.endif

USE_BZIP2=  yes
NO_BUILD=   yes

XMLDIR=     ${LOCALBASE}/share/xml
INSTDIR=    share/xsl/docbook
PINSTDIR=   ${PREFIX}/${INSTDIR}
COPYDIRS=   common fo extensions html htmlhelp images \
        javahelp lib manpages params template xhtml
PKGINSTALL= ${WRKDIR}/pkg-install
PKGDEINSTALL=   ${WRKDIR}/pkg-deinstall

XMLCATMGR=  ${LOCALBASE}/bin/xmlcatmgr
CATALOG_PORTS=  ${XMLDIR}/catalog.ports

post-extract:
    ${FIND} ${WRKSRC} -name '.#*' -delete

post-configure:
    @${SED} -e 's,@INSTDIR@,${INSTDIR},g ; \
        s,@XMLCATMGR@,${XMLCATMGR},g ; \
        s,@CATALOG_PORTS_XML@,${CATALOG_PORTS},g' \
        < ${FILESDIR}/pkg-install.in > ${PKGINSTALL}
    @${SED} -e 's,@XMLCATMGR@,${XMLCATMGR},g ; \
        s,@CATALOG_PORTS_XML@,${CATALOG_PORTS},g' \
        < ${FILESDIR}/pkg-deinstall.in > ${PKGDEINSTALL}
do-install:
.ifndef NOPORTDOCS
    ${MKDIR} ${DOCSDIR}
    (cd ${WRKSRC}/doc && ${TAR} -cf - . |\
        ${TAR} -xf - -C${DOCSDIR})
.endif
    ${MKDIR} ${PINSTDIR}
    (cd ${WRKSRC} && ${TAR} -cf - VERSION ${COPYDIRS} |\
        ${TAR} -xf - -C${PINSTDIR})

post-install:
    @${SETENV} PKG_PREFIX=${PREFIX} \
        ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL

.include <bsd.port.mk>