1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-12-01 01:17:02 +00:00
freebsd-ports/science/libsvm/Makefile
2007-12-12 02:04:56 +00:00

96 lines
2.1 KiB
Makefile

# New ports collection Makefile for: libsvm
# Date created: Oct 28 2001
# Whom: Chia-Hsing Yu <me@davidyu.org>
#
# $FreeBSD$
#
PORTNAME= libsvm
PORTVERSION= 2.85
PORTEPOCH= 1
CATEGORIES= science math
MASTER_SITES= http://www.csie.ntu.edu.tw/~cjlin/libsvm/ \
http://www.csie.ntu.edu.tw/~cjlin/libsvm/oldfiles/
MAINTAINER= rafan@FreeBSD.org
COMMENT= A library for Support Vector Machines
USE_ZIP= yes
.if defined(PKGNAMESUFFIX) && ${PKGNAMESUFFIX} == "-python"
CATEGORIES+= python
USE_PYTHON= yes
MAKE_ARGS= PYTHON_INCLUDEDIR=${PYTHON_INCLUDEDIR}
PYEXAMPLES= python/cross_validation.py \
python/svm_test.py \
python/test_cross_validation.py
TXT_DOCS= README.python
BUILD_WRKSRC= ${WRKSRC}/python
.else
TXT_DOCS= COPYRIGHT README FAQ.html README.tools
TOOLS= tools/checkdata.py tools/easy.py tools/grid.py tools/subset.py
SUB_FILES= pkg-message
SUB_LIST= DATADIR=${DATADIR}
.endif
.if !defined(NOPORTDOCS)
PORTDOCS= ${TXT_DOCS}
.endif
.include <bsd.port.pre.mk>
post-patch:
post-extract:
.if defined(PKGNAMESUFFIX) && ${PKGNAMESUFFIX} == "-python"
@${CP} ${WRKSRC}/python/README ${WRKSRC}/README.python
.else
@${CP} ${WRKSRC}/tools/README ${WRKSRC}/README.tools
.endif
.if defined(PKGNAMESUFFIX) && ${PKGNAMESUFFIX} == "-python"
do-install:
${INSTALL_SCRIPT} ${WRKSRC}/python/svm.py ${PYTHON_SITELIBDIR}/
${INSTALL_PROGRAM} ${WRKSRC}/python/svmc.so ${PYTHON_SITELIBDIR}/
${MKDIR} ${EXAMPLESDIR}
for f in ${PYEXAMPLES}; do \
${INSTALL_DATA} ${WRKSRC}/$$f ${EXAMPLESDIR}; \
done
.else
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/svm-train ${PREFIX}/bin/
${INSTALL_PROGRAM} ${WRKSRC}/svm-predict ${PREFIX}/bin/
${INSTALL_PROGRAM} ${WRKSRC}/svm-scale ${PREFIX}/bin/
${MKDIR} ${DATADIR}
for f in ${TOOLS}; do \
${INSTALL_DATA} ${WRKSRC}/$$f ${DATADIR}; \
done
.endif
post-install:
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
for f in ${TXT_DOCS}; do \
${INSTALL_DATA} ${WRKSRC}/$$f ${DOCSDIR}; \
done
.endif
.if defined(PKGNAMESUFFIX) && ${PKGNAMESUFFIX} != "-python"
@${ECHO_MSG} ""
@${CAT} ${PKGMESSAGE}
@${ECHO_MSG} ""
.endif
.include <bsd.port.post.mk>