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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
# New ports collection makefile for: lucene
# Date created: 02 Jan 2008
# Whom: Gerrit Beine <gerrit.beine@gmx.de>
#
# $FreeBSD$
PORTNAME= lucene
PORTVERSION= 2.4.1
CATEGORIES= textproc java devel
MASTER_SITES= ${MASTER_SITE_APACHE:S,%SUBDIR%,lucene/java,}
DISTNAME= lucene-${PORTVERSION}
MAINTAINER= gerrit.beine@gmx.de
COMMENT= A full-text search engine for Java
NO_BUILD= yes
USE_JAVA= yes
JAVA_VERSION= 1.5+
OPTIONS= DOCS "Install docs & examples" on \
CONTRIB "Install contribs" off
PLIST_FILES= %%JAVAJARDIR%%/${PORTNAME}-core-${PORTVERSION}.jar
CONTRIBS= analyzers \
ant \
benchmark \
instantiated \
highlighter \
lucli \
memory \
misc \
queries \
regex \
similarity \
snowball \
spellchecker \
surround \
swing \
wikipedia \
wordnet \
xml-query-parser
.include <bsd.port.pre.mk>
.if defined(WITH_CONTRIB)
.for f in ${CONTRIBS}
PLIST_FILES+=%%JAVAJARDIR%%/${PORTNAME}-${f}-${PORTVERSION}.jar
.endfor
.endif
.if defined(WITHOUT_DOCS) || !defined(WITH_DOCS)
NOPORTDOCS= yes
.endif
.if !defined(NOPORTDOCS)
PORTDOCS= *
.endif
DEMODIR= src/demo/org/apache/lucene/demo
do-install:
@${INSTALL_DATA} ${WRKSRC}/${PORTNAME}-core-${PORTVERSION}.jar ${JAVAJARDIR}
.if defined(WITH_CONTRIB)
@${INSTALL_DATA} \
${CONTRIBS:C,^(.*$,${WRKSRC}/contrib/\1/${PORTNAME}-\1-${PORTVERSION}.jar,} \
${JAVADIR}
.endif
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
@${INSTALL_DATA} ${WRKSRC}/CHANGES.txt ${DOCSDIR}
@${INSTALL_DATA} ${WRKSRC}/LICENSE.txt ${DOCSDIR}
@${INSTALL_DATA} ${WRKSRC}/NOTICE.txt ${DOCSDIR}
@${INSTALL_DATA} ${WRKSRC}/README.txt ${DOCSDIR}
@cd ${WRKSRC}/docs/ \
&& ${FIND} . -type d -exec ${MKDIR} ${DOCSDIR}/{} \; \
&& ${FIND} . -type f -exec ${INSTALL_DATA} {} ${DOCSDIR}/{} \;
@${MKDIR} ${EXAMPLESDIR}
@cd ${WRKSRC}/${DEMODIR} \
&& ${FIND} . -type d -exec ${MKDIR} ${EXAMPLESDIR}/{} \; \
&& ${FIND} . -type f -exec ${INSTALL_DATA} {} ${EXAMPLESDIR}/{} \;
.endif
post-install:
.if !defined(NOPORTDOCS)
@${FIND} -s ${WRKSRC}/${DEMODIR} -not -type d \
| ${SED} -ne 's,^${WRKSRC}/${DEMODIR},${EXAMPLESDIR:S,^${PREFIX}/,,},p' >> ${TMPPLIST}
@${FIND} -s -d ${WRKSRC}/${DEMODIR} -type d \
| ${SED} -ne 's,^${WRKSRC}/${DEMODIR},@dirrm ${EXAMPLESDIR:S,^${PREFIX}/,,},p' >> ${TMPPLIST}
.endif
.include <bsd.port.post.mk>
|