aboutsummaryrefslogtreecommitdiff
path: root/www/w3/Makefile
blob: 403bb7e9c746ff3c67e9fc8988ef7008d417f4e8 (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
66
67
68
69
70
71
72
73
74
# New ports collection makefile for: w3 on Emacs
# Version required:	2.2.26	
# Date created:		31 December 1996
# Whom:			MITA Yoshio <mita@ee.t.u-tokyo.ac.jp>
#
# $Id: Makefile,v 1.6 1998/10/10 04:51:50 asami Exp $
#

DISTNAME=	w3-2.2.26
CATEGORIES?=	www elisp
MASTER_SITES=	ftp://ftp.iij.ad.jp/pub/network/WWW/w3/ \
		ftp://ftp.cs.indiana.edu/pub/elisp/w3/

MAINTAINER=	kiri@kiri.toba-cmt.ac.jp

BUILD_DEPENDS?=	emacs-19.34:${PORTSDIR}/editors/emacs
RUN_DEPENDS?=	emacs-19.34:${PORTSDIR}/editors/emacs

WRKSRC=		${WRKDIR}/w3
MAKE_ENV+=	EMACSCMD=${EMACSCMD} ELISPDIR=${ELISPDIR} \
		MKDIR="${MKDIR}" CP=${CP} \
		INFODIR=${INFODIR} \
		INSTALL_DATA="${INSTALL_DATA}"

VERSION=	2.2.26
EMACSCMD?=	emacs-19.34
PORTSDOCDIR=	${PREFIX}/share/doc/w3
SAMPLEDIR=	${PREFIX}/share/examples/w3
ELISPDIR?=	${PREFIX}/share/emacs/site-lisp
INFODIR=	${PREFIX}/info
ADDIR=		${X11BASE}/lib/X11/app-defaults
DIRSECTION=	The Emacs editor and associated tools
INFOFILE=	w3.info

post-build:
.for f in DEINSTALL INSTALL dot.emacs user-install
	@${SED} -e "s,%VERSION%,${VERSION},g" \
 		-e "s,%PREFIX%,${PREFIX},g" \
 		-e "s,%INFODIR%,${INFODIR},g" \
 		-e "s,%ELISPDIR%,${ELISPDIR},g" \
		-e "s,%INFOFILE%,${INFOFILE},g" \
 		-e "s,%ADDIR%,${ADDIR},g" \
		-e "s,%TOUCH%,${TOUCH},g" \
		-e "s,%MKDIR%,${MKDIR},g" \
		-e "s,%SAMPLEDIR%,${SAMPLEDIR},g" \
		-e "s,%DIRSECTION%,${DIRSECTION},g" \
		< ${FILESDIR}/${f}.tmpl > ${FILESDIR}/${f}
.endfor
	@${CP} ${FILESDIR}/DEINSTALL ${FILESDIR}/INSTALL ${PKGDIR}

post-install:
.if !defined(NOPORTDOCS)
	@${MKDIR} ${PORTSDOCDIR}
	@${MKDIR} ${SAMPLEDIR}
.for f in dot.emacs dot.mosaic-hotlist-default 
	@${INSTALL_DATA} ${FILESDIR}/${f} ${SAMPLEDIR}
.endfor
	@${INSTALL_SCRIPT} ${FILESDIR}/user-install ${SAMPLEDIR}
.for f in W3.ad clean-cache Makefile w3.txi
	@${INSTALL_DATA} ${WRKSRC}/${f}  ${PORTSDOCDIR}
.endfor
.endif
	@${SETENV} MKDIR="${MKDIR}" TOUCH=${TOUCH} \
		INFODIR=${INFODIR} INFOFILE=${INFOFILE} \
		ELISPDIR=${ELISPDIR} ADDIR=${ADDIR} \
		DIRSECTION="${DIRSECTION}" \
		${SH} ${PKGDIR}/INSTALL ${PKGNAME} POST-INSTALL  

pre-clean:
	@${RM} -f ${FILESDIR}/DEINSTALL ${FILESDIR}/INSTALL \
		${FILESDIR}/dot.emacs ${FILESDIR}/user-install \
		${PKGDIR}/DEINSTALL ${PKGDIR}/INSTALL 

.include <bsd.port.mk>