aboutsummaryrefslogtreecommitdiff
path: root/japanese/xjman/Makefile
blob: f066addcd3477b60321f44ab0be08f55a80f8c87 (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: X Japanese man documents
# Date created:		24 Dec 1998
# Based on:		Kiriyama Kazuhiko <kiri@kiri.toba-cmt.ac.jp>'s
#			japanese/man-doc
# Whom:			SADA Kenji <sada@FreeBSD.org>
#
# $FreeBSD$
#

PORTNAME=	xjman
PORTVERSION=	0.5
CATEGORIES=	japanese
MASTER_SITES=	${MASTER_SITE_PORTS_JP} \
		http://xjman.dsl.gr.jp/

MAINTAINER=	sada@FreeBSD.org

NO_MTREE=	yes
PLIST=		${WRKDIR}/PLIST
USE_BZIP2=	yes
WRKSRC=		${WRKDIR}/man/ja_JP.eucJP
SCRIPTS_ENV+=	MANSECS="${MANSECS}"

MANSECS=	1 3 5

post-extract:
.for i in Makefile Makefile.inc
	@${CP} ${FILESDIR}/$i ${WRKSRC}
.endfor

post-build:
	@${RM} -f ${PLIST}
	@for sec in ${MANSECS}; do \
	if [ -d ${WRKSRC}/man$${sec} ]; then \
		cd ${WRKSRC}/man$${sec}; \
		list=`${MAKE} pages-list`; \
		set `${ECHO} $$list " "|${SED} 's/\.\([0-9]\)x /.\1x \1 /g'`; \
		while : ; do \
			case $$# in \
				0) break;; \
				[1]) ${ECHO} "can not happen"; break;; \
			esac; \
			${ECHO} man/ja/man$$2/$$1.gz; shift 2; \
		done; \
	fi; \
	done|sort|uniq >>${PLIST}
	@${ECHO} "@exec ${LN} -sf %D/man/ja %D/man/ja_JP.EUC" >>${PLIST}
	@${ECHO} "@unexec ${RM} -f %D/man/ja_JP.EUC" >>${PLIST}
	@${ECHO} "share/doc/xjman/COPYRIGHT" >>${PLIST}
	@${ECHO} "share/doc/xjman/COPYRIGHT.XJDP" >>${PLIST}
	@${ECHO} "@dirrm share/doc/xjman" >>${PLIST}

pre-install:
.for sec in ${MANSECS}
	@${MKDIR} ${PREFIX}/man/ja/man${sec}
.endfor

post-install:
	@${MKDIR} ${PREFIX}/share/doc/xjman
.for i in COPYRIGHT COPYRIGHT.XJDP
	@${INSTALL_DATA} ${FILESDIR}/$i ${PREFIX}/share/doc/xjman/
.endfor
	@${CAT} ${PKGDIR}/MESSAGE

.include <bsd.port.mk>