summaryrefslogtreecommitdiff
path: root/math/libshorttext/Makefile
blob: 7a0e9e8f5495bf47dc4eaffd956320daaf30eae4 (plain)
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
# $NetBSD: Makefile,v 1.1.1.1 2014/10/29 17:06:40 cheusov Exp $

DISTNAME=	libshorttext-1.1
CATEGORIES=	math textproc
MASTER_SITES=	http://www.csie.ntu.edu.tw/~cjlin/libshorttext/

MAINTAINER=	cheusov@NetBSD.org
HOMEPAGE=	http://www.csie.ntu.edu.tw/~cjlin/libshorttext/
COMMENT=	Library for short-text classification and analysis
LICENSE=	modified-bsd

DEPENDS+=	liblinear-[0-9]*:../../math/liblinear \
		libsvm-[0-9]*:../../math/libsvm

USE_LANGUAGES=	c c++

REPLACE_PYTHON=	*.py demo/*.py ${PYUTILS}
PLIST_SUBST+=	PYSITELIB=${PYSITELIB}
INSTALLATION_DIRS=	bin share/examples/libshorttext/demo \
	share/doc/libshorttext ${ADDITIONAL_FILES:H:S,^,${PYSITELIB}/,:O:u}

PYUTILS+= \
	libshorttext/classifier/classifier_impl.py \
	libshorttext/classifier/learner/learner_impl.py \
	libshorttext/analyzer/analyzer_impl.py \
	libshorttext/analyzer/selector.py \
	libshorttext/classifier/learner/liblinear/python/liblinear.py \
	libshorttext/classifier/learner/liblinear/python/liblinearutil.py \
	libshorttext/converter/converter_impl.py \
	libshorttext/converter/stemmer/porter.py \
	libshorttext/classifier/grid.py

ADDITIONAL_FILES+= \
	${PYUTILS} \
	libshorttext/analyzer/__init__.py \
	libshorttext/converter/stop-words/stoplist-nsp.regex.pickle \
	libshorttext/converter/stop-words/stoplist-nsp.regex \
	libshorttext/converter/stemmer/__init__.py \
	libshorttext/converter/stemmer/porter.so.1 \
	libshorttext/converter/__init__.py \
	libshorttext/__init__.py \
	libshorttext/classifier/__init__.py \
	libshorttext/classifier/learner/liblinear/train \
	libshorttext/classifier/learner/liblinear/predict \
	libshorttext/classifier/learner/liblinear/liblinear.so.1 \
	libshorttext/classifier/learner/__init__.py \
	libshorttext/classifier/learner/util.so.1

do-install:
	set -e; cd ${WRKSRC}; \
	${INSTALL_SCRIPT} text-predict.py text-train.py text2svm.py \
		${DESTDIR}${PREFIX}/bin; \
	${INSTALL_DATA} README \
		${DESTDIR}${PREFIX}/share/doc/${PKGBASE}; \
	${CP} -Rp demo ${DESTDIR}${PREFIX}/share/examples/${PKGBASE}
.for f in ${ADDITIONAL_FILES}
	${CP} -p ${WRKSRC}/${f} ${DESTDIR}${PREFIX}/${PYSITELIB}/${f}
.endfor

.include "../../lang/python/extension.mk"
.include "../../lang/python/application.mk"
.include "../../mk/bsd.pkg.mk"