mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-27 05:10:36 +00:00
85a94a6d3d
is mostly ready for 4.6-RELEASE. Submitted by: horikawa
70 lines
1.6 KiB
Makefile
70 lines
1.6 KiB
Makefile
# New ports collection makefile for: Japanese man documents
|
|
# Date created: 6 January 1997
|
|
# Whom: Kiriyama Kazuhiko <kiri@kiri.toba-cmt.ac.jp>
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
PORTNAME= man-doc
|
|
PORTVERSION= 4.6
|
|
CATEGORIES= japanese
|
|
DISTFILES= # none
|
|
|
|
MAINTAINER= horikawa@FreeBSD.org
|
|
|
|
PREFIX?= /usr
|
|
NO_CHECKSUM= yes
|
|
NO_MTREE= yes
|
|
WRKSRC= ${WRKDIR}/man
|
|
PLIST= ${WRKDIR}/PLIST
|
|
|
|
MANSECS= 1 2 5 6 7 8 9
|
|
JAMANDIR?= /usr/opt/doc/ja_JP.eucJP/man
|
|
|
|
do-extract:
|
|
@if [ ! -d ${JAMANDIR} ]; then \
|
|
${ECHO} "You need the Japanese manual source in"; \
|
|
${ECHO} "\"${JAMANDIR}\""; \
|
|
${ECHO} "in order to build this port."; \
|
|
exit 1; \
|
|
fi
|
|
@${RM} -rf ${WRKDIR}
|
|
@${MKDIR} ${WRKSRC}
|
|
@(cd ${JAMANDIR}; ${CP} Makefile Makefile.inc ${WRKSRC})
|
|
.for sec in ${MANSECS}
|
|
@if [ -d ${JAMANDIR}/man${sec} ]; then \
|
|
${CP} -R ${JAMANDIR}/man${sec} ${WRKSRC}/ ; \
|
|
${ECHO_CMD} >>${WRKSRC}/man${sec}/Makefile; \
|
|
${ECHO_CMD} pages-list: >>${WRKSRC}/man${sec}/Makefile; \
|
|
${ECHO_CMD} " @echo \$${MAN${sec}} \$${MLINKS}" \
|
|
>>${WRKSRC}/man${sec}/Makefile; \
|
|
fi
|
|
.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_CMD} $$list " "|${SED} 's/\.\([^.]*\) /.\1 \1 /g'`; \
|
|
while : ; do \
|
|
case $$# in \
|
|
0) break;; \
|
|
[1]) ${ECHO_CMD} "can not happen"; break;; \
|
|
esac; \
|
|
${ECHO_CMD} share/man/ja/man$$2/$$1.gz; shift 2; \
|
|
done; \
|
|
fi; \
|
|
done|sort|uniq >>${PLIST}
|
|
|
|
pre-install:
|
|
.for sec in ${MANSECS}
|
|
@${MKDIR} ${PREFIX}/share/man/ja/man${sec}
|
|
.endfor
|
|
|
|
post-install:
|
|
@${CAT} ${PKGMESSAGE}
|
|
|
|
.include <bsd.port.mk>
|