1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-16 03:24:07 +00:00
freebsd-ports/security/nmap-i18n-man/Makefile
Ion-Mihai Tetcu e7686467d4 Translated manual pages for security/nmap. Current list of
translations includes Spanish, French, Croatian, Japanese,
Polish, Portuguese, Romanian, Slovak and Chinese.

WWW: http://www.insecure.org/nmap/

PR:		ports/93598
Submitted by:	Daniel Roethlisberger <daniel@roe.ch>
Approved by:	lawrance (mentor, implicit)
2006-06-05 10:09:41 +00:00

98 lines
2.5 KiB
Makefile

# Ports collection makefile for: nmap-i18n-man
# Date created: 2006-02-19
# Whom: Daniel Roethlisberger <daniel@roe.ch>
#
# $FreeBSD$
#
PORTNAME= nmap-i18n-man
PORTVERSION= 4.01.20060302
CATEGORIES= security ipv6
MASTER_SITES= http://www.insecure.org/nmap/data/man-xlate/ \
http://home.tiscalinet.ch/~roe/distfiles/${DIST_SUBDIR}/
DISTFILES= ${LANG_MAP:C/^/nmap-/:C/=[^=]*$/.1/} # OPTIONS based
DIST_SUBDIR= ${PORTNAME}-${PORTVERSION}
MAINTAINER= daniel@roe.ch
COMMENT= Translated manual pages for nmap
BUILD_DEPENDS= iconv:${PORTSDIR}/converters/libiconv
MAN1= nmap.1
MANLANG= ${LANG_MAP:C/^[^=]*=//} # OPTIONS based
EXTRACT_CMD= ${CP}
EXTRACT_BEFORE_ARGS=
EXTRACT_AFTER_ARGS= ${WRKDIR}
NO_WRKSUBDIR= yes
OPTIONS= MAN_ES "Spanish" On \
MAN_FR "French" On \
MAN_HR "Croatian" On \
MAN_JP "Japanese" On \
MAN_PL "Polish" On \
MAN_PT_BR "Portuguese (Brazil)" On \
MAN_PT_PT "Portuguese (Portugal)" On \
MAN_RO "Romanian" On \
MAN_SK "Slovak" On \
MAN_ZH "Chinese" On
.include <bsd.port.pre.mk>
LANG_MAP=
.if !defined(WITHOUT_MAN_ES)
LANG_MAP+= es=es.ISO8859-1
.endif
.if !defined(WITHOUT_MAN_FR)
LANG_MAP+= fr=fr.ISO8859-1
.endif
.if !defined(WITHOUT_MAN_HR)
LANG_MAP+= hr=hr.ISO8859-2
.endif
.if !defined(WITHOUT_MAN_JP)
LANG_MAP+= jp=jp.eucJP
.endif
.if !defined(WITHOUT_MAN_PL)
LANG_MAP+= pl=pl.ISO8859-2
.endif
.if !defined(WITHOUT_MAN_PT_BR)
LANG_MAP+= pt-br=pt_BR.ISO8859-1
.endif
.if !defined(WITHOUT_MAN_PT_PT)
LANG_MAP+= pt-pt=pt.ISO8859-1
.endif
.if !defined(WITHOUT_MAN_RO)
LANG_MAP+= ro=ro.ISO8859-2
.endif
.if !defined(WITHOUT_MAN_SK)
LANG_MAP+= sk=sk.ISO8859-2
.endif
.if !defined(WITHOUT_MAN_ZH)
LANG_MAP+= zh=zh.Big5
.endif
ICONV?=${LOCALBASE}/bin/iconv
do-build:
@for token in ${LANG_MAP}; do \
lang="`expr $${token} : '\([^=]*\)'`"; \
locale="`expr $${token} : '.*=\([^=]*\)'`"; \
charset="`expr $${locale} : '[^.]*\.\([^.]*\)'`"; \
${ECHO_CMD} Converting nmap-$${lang}.1 from UTF-8 to $${charset}; \
${ICONV} -c -f UTF-8 -t $${charset} ${WRKSRC}/nmap-$${lang}.1 \
> ${WRKSRC}/nmap-$${lang}.1.$${charset} || true; \
done
do-install:
@for token in ${LANG_MAP}; do \
lang="`expr $${token} : '\([^=]*\)'`"; \
locale="`expr $${token} : '.*=\([^=]*\)'`"; \
charset="`expr $${locale} : '[^.]*\.\([^.]*\)'`"; \
${MKDIR} ${DESTDIR}${MAN1PREFIX}/man/$${locale}/man1; \
${ECHO_CMD} Installing man/$${locale}/man1/nmap.1; \
${INSTALL_MAN} ${WRKSRC}/nmap-$${lang}.1.$${charset} \
${DESTDIR}${MAN1PREFIX}/man/$${locale}/man1/nmap.1; \
done
.include <bsd.port.post.mk>