blob: 5f9ecdc3caa2207c5e1a0bd1aa4f6660b799c6f8 (
plain) (
blame)
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
|
# ex:ts=8
#
# New ports collection makefile for: leo
# Date created: 2002/11/17
# Whom: Alan Eldridge <ports@geeksrus.net>
#
# $FreeBSD$
#
PORTNAME= leo
PORTVERSION= 3.9
PORTREVISION= 0
PORTEPOCH= 0
CATEGORIES= editors
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
DISTFILES= ${DISTNAME}.zip ${SBOOKFILE} ${EXAMPLESFILES} ${WEBDOCSFILE}
DIST_SUBDIR= ${PKGNAMEPREFIX}${PORTNAME}
MAINTAINER= alane@freebsd.org
COMMENT= An advanced outline editor
RUN_DEPENDS+= ${PYTHON_SITELIBDIR}/_tkinter.so:${PORTSDIR}/x11-toolkits/py-tkinter
USE_ZIP= yes
USE_PYTHON= yes
NO_BUILD= yes
.include <bsd.port.pre.mk>
ICONSDIR= ${LOCALBASE}/share/icons
DESKTOPDIR= ${LOCALBASE}/share/applnk
SBOOK= SbooksLeo
SBOOKFILE= ${SBOOK}.zip
SBOOKDIR= ${DOCSDIR}/${SBOOK}
EXAMPLES= cweb.leo noweb.leo python.leo tkinter.leo
EXAMPLESFILES= ${EXAMPLES:S|leo$|leo.zip|}
WEBDOCS= LeoWeb
WEBDOCSFILE= leodocs.zip
WEBDOCSDIR= ${DOCSDIR}/${WEBDOCS}
PLIST= ${WRKDIR}/plist
BINDIR= ${PREFIX}/bin
DATADIR= ${PREFIX}/share
ETCDIR= ${PREFIX}/etc
LIBDIR= ${PREFIX}/lib
PKGDATADIR= ${DATADIR}/${DISTNAME}
BIN_SUBDIR= ${BINDIR:S|^${PREFIX}/||}
DATA_SUBDIR= ${DATADIR:S|^${PREFIX}/||}
DOCS_SUBDIR= ${DOCSDIR:S|^${PREFIX}/||}
ETC_SUBDIR= ${ETCDIR:S|^${PREFIX}/||}
EXAMPLES_SUBDIR= ${EXAMPLESDIR:S|^${PREFIX}/||}
LIB_SUBDIR= ${LIBDIR:S|^${PREFIX}/||}
PKGDATA_SUBDIR= ${PKGDATADIR:S|^${PREFIX}/||}
.if defined(NOPORTDOCS)
ALL_SUBDIRS= ${PKGDATA_SUBDIR}
.else
ALL_SUBDIRS= ${PKGDATA_SUBDIR} ${DOCS_SUBDIR} ${EXAMPLES_SUBDIR}
.endif # defined(NOPORTDOCS)
CPIO?= /usr/bin/cpio
SORT?= /usr/bin/sort
do-install:
# install dist
${MKDIR} ${PKGDATADIR}
cd ${WRKDIR}; ${FIND} ${DISTNAME} \
| ${CPIO} -pdmv -R ${LIBOWN}:${LIBGRP} ${DATADIR}
# fix dist perms
${FIND} ${PKGDATADIR} -type f | ${XARGS} ${CHMOD} ${LIBMODE}
.if !defined(NOPORTDOCS)
# install tutorial
${MKDIR} ${SBOOKDIR}
cd ${WRKDIR}/${SBOOK}; ${FIND} . \
| ${CPIO} -pdmv -R ${DOCOWN}:${DOCGRP} ${SBOOKDIR}
# install web docs
${MKDIR} ${WEBDOCSDIR}
cd ${WRKDIR}/${WEBDOCS}; ${FIND} . \
| ${CPIO} -pdmv -R ${DOCOWN}:${DOCGRP} ${WEBDOCSDIR}
# fix docs perms
${FIND} ${DOCSDIR} -type f -print0 | ${XARGS} -0 ${CHMOD} ${DOCMODE}
# install examples
${MKDIR} ${EXAMPLESDIR}
cd ${WRKDIR}; ${INSTALL_DATA} ${EXAMPLES} ${EXAMPLESDIR}
.endif # !defined(NOPORTDOCS)
# fix dir perms
cd ${PREFIX}; ${FIND} ${ALL_SUBDIRS} -type d -print0 \
| ${XARGS} -0 ${CHMOD} ${BINMODE}
# create start script
${SED} -e 's|@PKGDATADIR@|${PKGDATADIR}|' \
<${FILESDIR}/leo.in >${BINDIR}/leo
${CHMOD} ${BINMODE} ${BINDIR}/leo
${CHOWN} ${BINOWN}:${BINGRP} ${BINDIR}/leo
# build plist: bin
${ECHO_CMD} "${BIN_SUBDIR}/leo" >${PLIST}
# build plist: files
cd ${PREFIX}; ${FIND} ${ALL_SUBDIRS} -type f \
| ${SORT} >>${PLIST}
# build plist: dirs
cd ${PREFIX}; ${FIND} ${ALL_SUBDIRS} -type d \
| ${SORT} -r | ${SED} -e 's|^|@dirrm |' >>${PLIST}
.include <bsd.port.post.mk>
#EOF
|