mirror of
https://git.FreeBSD.org/ports.git
synced 2024-10-29 21:39:24 +00:00
160 lines
4.4 KiB
Makefile
160 lines
4.4 KiB
Makefile
# New ports collection makefile for: edict
|
|
# Version required: 19981007
|
|
# Date created: 18 August 1997
|
|
# Whom: Jonathan Hanna
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
DISTNAME= edict-19990714
|
|
PKGNAME= ja-edict-19990714
|
|
CATEGORIES= japanese
|
|
MASTER_SITES= ftp://ftp.cdrom.com/pub/japanese/monash/ \
|
|
ftp://ftp.sedl.org/pub/mirrors/nihongo/ \
|
|
ftp://ftp.u-aizu.ac.jp/pub/SciEng/nihongo/ftp.cc.monash.edu.au/
|
|
EXTRACT_SUFX=
|
|
DISTFILES= ${DICTFILES} ${SRCFILES} ${DOCFILES}
|
|
|
|
MAINTAINER= jhanna@home.com
|
|
|
|
BUILD_DEPENDS= unzip:${PORTSDIR}/archivers/unzip
|
|
|
|
DIST_SUBDIR= edict
|
|
|
|
DICTFILES= edict.gz edicth enamdict.gz compdic.gz \
|
|
jddict.v02.gz j_places.gz ediclsd3.zip \
|
|
kanjidic.gz kanjd212.gz lawgledt.zip \
|
|
lingdic.zip geodic.gz pandpdic.zip \
|
|
aviation.zip findic.zip mktdic.zip \
|
|
compverb.gz 4jwords.gz concrete.zip
|
|
|
|
SRCFILES= xjdic23.tgz
|
|
|
|
DOCFILES= edict.doc edicth.doc enamdict.doc jddict.doc \
|
|
j_places.inf kanjidic.doc kanjd212.doc ediclsd3.rme \
|
|
lawgldoc.new lingdic.txt geodic.doc aviation.doc \
|
|
findic.doc mktdic.doc compverb.doc 4jwords.doc \
|
|
concrete.doc
|
|
|
|
#
|
|
# These change too often and are not made into executables.
|
|
#
|
|
IGNOREFILES= $(DICTFILES) $(DOCFILES)
|
|
|
|
BINFILES= exjdxgen xjdic_cl xjdic_sa xjdserver xjdxgen
|
|
|
|
# Where to install the data files
|
|
DATADIR= ${PREFIX}/share/dict/edict
|
|
DOCDIR= ${PREFIX}/share/doc/xjdic
|
|
MAN1= xjdic.1
|
|
|
|
NO_WRKSUBDIR= yes
|
|
|
|
do-extract:
|
|
@${RM} -rf ${WRKDIR}
|
|
@${MKDIR} ${WRKDIR}
|
|
@for file in ${SRCFILES}; do \
|
|
if ! (cd ${WRKDIR} && ${EXTRACT_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/$$file ${EXTRACT_AFTER_ARGS});\
|
|
then \
|
|
exit 1; \
|
|
fi \
|
|
done
|
|
|
|
do-install:
|
|
@for file in ${BINFILES}; do \
|
|
if ! ${INSTALL_PROGRAM} ${WRKDIR}/$$file ${PREFIX}/bin ;\
|
|
then \
|
|
exit 1; \
|
|
fi \
|
|
done
|
|
@if [ ! -d ${DATADIR} ] ; \
|
|
then \
|
|
${MKDIR} ${DATADIR} ; \
|
|
fi
|
|
@for file in ${DICTFILES}; do \
|
|
case $$file in \
|
|
*.gz) \
|
|
instfile=`${BASENAME} $$file .gz` ; \
|
|
if ${GZIP_CMD} -cd ${_DISTDIR}/$$file > ${DATADIR}/$$instfile ; \
|
|
then \
|
|
${TRUE} ; \
|
|
else \
|
|
exit 1; \
|
|
fi \
|
|
;; \
|
|
*.Z) \
|
|
instfile=`${BASENAME} $$file .Z` ; \
|
|
if ${GZIP_CMD} -cd ${_DISTDIR}/$$file > ${DATADIR}/$$instfile ; \
|
|
then \
|
|
${TRUE} ; \
|
|
else \
|
|
exit 1; \
|
|
fi \
|
|
;; \
|
|
*.zip) \
|
|
instfile=`${BASENAME} $$file .zip` ; \
|
|
if unzip -o ${_DISTDIR}/$$file $$instfile -d ${DATADIR} ; \
|
|
then \
|
|
${TRUE} ; \
|
|
else \
|
|
exit 1; \
|
|
fi \
|
|
;; \
|
|
*) \
|
|
instfile=`${BASENAME} $$file` ; \
|
|
${CP} ${_DISTDIR}/$$file ${DATADIR} ; \
|
|
;; \
|
|
esac ; \
|
|
( \
|
|
${ECHO} cd ${DATADIR} ; \
|
|
cd ${DATADIR} ; \
|
|
${ECHO} ${PREFIX}/bin/xjdxgen $$instfile ; \
|
|
${PREFIX}/bin/xjdxgen $$instfile ; \
|
|
${CHOWN} ${SHAREOWN}.${SHAREGRP} $$instfile $$instfile.xjdx; \
|
|
${CHMOD} ${SHAREMODE} $$instfile $$instfile.xjdx ; \
|
|
) ; \
|
|
done
|
|
${RM} -f ${PREFIX}/bin/xjdic
|
|
${LN} -s ${PREFIX}/bin/xjdic_sa ${PREFIX}/bin/xjdic
|
|
${INSTALL_DATA} ${WRKDIR}/radicals.tm ${DATADIR} ;
|
|
${INSTALL_DATA} ${WRKDIR}/radkfile ${DATADIR} ;
|
|
${INSTALL_DATA} ${WRKDIR}/kanjstroke ${DATADIR} ;
|
|
${INSTALL_DATA} ${WRKDIR}/romkana.cnv ${DATADIR} ;
|
|
${INSTALL_DATA} ${WRKDIR}/vconj ${DATADIR} ;
|
|
#
|
|
# Only 9 dictionaries can be enabled
|
|
#
|
|
@${ECHO} dicdir ${DATADIR} > ${DATADIR}/.xjdicrc
|
|
@${ECHO} dicfile edict >> ${DATADIR}/.xjdicrc
|
|
@${ECHO} dicfile enamdict >> ${DATADIR}/.xjdicrc
|
|
@${ECHO} dicfile compdic >> ${DATADIR}/.xjdicrc
|
|
@${ECHO} dicfile ediclsd3 >> ${DATADIR}/.xjdicrc
|
|
# @${ECHO} dicfile jddict.v02 >> ${DATADIR}/.xjdicrc
|
|
@${ECHO} dicfile j_places >> ${DATADIR}/.xjdicrc
|
|
# @${ECHO} dicfile lawgledt >> ${DATADIR}/.xjdicrc
|
|
@${ECHO} dicfile geodic >> ${DATADIR}/.xjdicrc
|
|
# @${ECHO} dicfile pandpdic >> ${DATADIR}/.xjdicrc
|
|
@${ECHO} dicfile aviation >> ${DATADIR}/.xjdicrc
|
|
# @${ECHO} dicfile findic >> ${DATADIR}/.xjdicrc
|
|
# @${ECHO} dicfile mktdic >> ${DATADIR}/.xjdicrc
|
|
@${ECHO} dicfile compverb >> ${DATADIR}/.xjdicrc
|
|
@${ECHO} dicfile 4jwords >> ${DATADIR}/.xjdicrc
|
|
# @${ECHO} dicfile concrete.doc >> ${DATADIR}/.xjdicrc
|
|
# @${ECHO} dicfile lingdic >> ${DATADIR}/.xjdicrc
|
|
@${CHOWN} ${SHAREOWN}.${SHAREGRP} ${DATADIR}/.xjdicrc
|
|
@${CHMOD} ${SHAREMODE} ${DATADIR}/.xjdicrc
|
|
${INSTALL_MAN} ${WRKSRC}/xjdic.1 ${PREFIX}/man/man1
|
|
.if !defined(NOPORTDOCS)
|
|
@if [ ! -d ${DOCDIR} ] ; \
|
|
then \
|
|
${MKDIR} ${DOCDIR} ; \
|
|
fi
|
|
${INSTALL_MAN} ${WRKSRC}/xjdic23.inf ${DOCDIR}
|
|
@for docfile in ${DOCFILES} ; do \
|
|
${ECHO} InstalLing ${DOCDIR}/$$docfile ; \
|
|
${INSTALL_MAN} ${_DISTDIR}/$$docfile ${DOCDIR} ; \
|
|
done
|
|
.endif
|
|
|
|
.include <bsd.port.mk>
|