aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoralane <alane@FreeBSD.org>2002-11-18 10:55:54 +0800
committeralane <alane@FreeBSD.org>2002-11-18 10:55:54 +0800
commit315a01558a1912b3f72d1ae1c349afcd8ce1c04b (patch)
tree674af6d3493887468429efb6b7948ba7dff2f1be
parenta275fc83bda78197d07555fa656724634c5111ea (diff)
downloadfreebsd-ports-gnome-315a01558a1912b3f72d1ae1c349afcd8ce1c04b.tar.gz
freebsd-ports-gnome-315a01558a1912b3f72d1ae1c349afcd8ce1c04b.tar.zst
freebsd-ports-gnome-315a01558a1912b3f72d1ae1c349afcd8ce1c04b.zip
PORTREVISION => 1.
Added an excellent tutorial, creating a docs dir. Cleaned up do-install procedure some.
-rw-r--r--editors/leo/Makefile53
-rw-r--r--editors/leo/distinfo3
-rw-r--r--editors/leo/files/leo.in2
3 files changed, 44 insertions, 14 deletions
diff --git a/editors/leo/Makefile b/editors/leo/Makefile
index 5eb29e3117ea..168431693336 100644
--- a/editors/leo/Makefile
+++ b/editors/leo/Makefile
@@ -9,10 +9,12 @@
PORTNAME= leo
PORTVERSION= 3.8
+PORTREVISION= 1
PORTEPOCH= 0
CATEGORIES= editors
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
+DISTFILES= ${DISTNAME} SbooksLeo
MAINTAINER= alane@freebsd.org
@@ -24,30 +26,57 @@ NO_BUILD= yes
.include <bsd.port.pre.mk>
-PLIST=${WRKDIR}/plist
-INSTALL_DIR=${LOCALBASE}/share
+SBOOKNAME= SbooksLeo
+TUTORIALDIR= ${DOCSDIR}/${SBOOKNAME}
+
+PLIST= ${WRKDIR}/plist
+
+DATADIR= ${PREFIX}/share
+PKGDATADIR= ${DATADIR}/${DISTNAME}
+
+DOCS_SUBDIR= ${DOCSDIR:S|^${PREFIX}/||}
+PKGDATA_SUBDIR= ${PKGDATADIR:S|^${PREFIX}/||}
+
+.if defined(NOPORTDOCS)
+ALL_SUBDIRS= ${PKGDATA_SUBDIR}
+.else
+ALL_SUBDIRS= ${PKGDATA_SUBDIR} ${DOCS_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} ${INSTALL_DIR}
- cd ${LOCALBASE}; ${FIND} share/${DISTNAME} -type f \
- | ${XARGS} ${CHMOD} ${LIBMODE}
- cd ${LOCALBASE}; ${FIND} share/${DISTNAME} -type d \
- | ${XARGS} ${CHMOD} ${BINMODE}
- ${SED} -e 's|@DISTNAME@|${DISTNAME}|' \
- -e 's|@LOCALBASE@|${LOCALBASE}|'\
+ | ${CPIO} -pdmv -R ${LIBOWN}:${LIBGRP} ${DATADIR}
+# fix dist perms
+ ${FIND} ${PKGDATADIR} -type f | ${XARGS} ${CHMOD} ${LIBMODE}
+.if !defined(NOPORTDOCS)
+# install tutorial
+ ${MKDIR} ${TUTORIALDIR}
+ cd ${WRKDIR}/${SBOOKNAME}; ${FIND} . \
+ | ${CPIO} -pdmv -R ${DOCOWN}:${DOCGRP} ${TUTORIALDIR}
+# fix docs perms
+ ${FIND} ${DOCSDIR} -type f -print0 | ${XARGS} -0 ${CHMOD} ${DOCMODE}
+.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 >${LOCALBASE}/bin/leo
${CHMOD} ${BINMODE} ${LOCALBASE}/bin/leo
${CHOWN} ${BINOWN}:${BINGRP} ${LOCALBASE}/bin/leo
+# build plist: bin
${ECHO_CMD} "bin/leo" >${PLIST}
- cd ${LOCALBASE}; ${FIND} share/${DISTNAME} -type f \
+# build plist: files
+ cd ${PREFIX}; ${FIND} ${ALL_SUBDIRS} -type f \
| ${SORT} >>${PLIST}
- cd ${LOCALBASE}; ${FIND} share/${DISTNAME} -type d \
+# build plist: dirs
+ cd ${PREFIX}; ${FIND} ${ALL_SUBDIRS} -type d \
| ${SORT} -r | ${SED} -e 's|^|@dirrm |' >>${PLIST}
.include <bsd.port.post.mk>
-
#EOF
diff --git a/editors/leo/distinfo b/editors/leo/distinfo
index f73a2332d745..e911ca48d08e 100644
--- a/editors/leo/distinfo
+++ b/editors/leo/distinfo
@@ -1 +1,2 @@
-MD5 (leo-3.8.zip) = e54e75266c1bc7541f682fbd7e72c39e
+MD5 (leo-3.8) = e54e75266c1bc7541f682fbd7e72c39e
+MD5 (SbooksLeo) = ad62f8cc3bd44c5fbb1fe49a26ad6795
diff --git a/editors/leo/files/leo.in b/editors/leo/files/leo.in
index bccf53d98fd7..e1ec1d851fd5 100644
--- a/editors/leo/files/leo.in
+++ b/editors/leo/files/leo.in
@@ -8,5 +8,5 @@
#
# 2002/11/17 alane@freebsd.org
#
-exec python @LOCALBASE@/share/@DISTNAME@/leo.py ${1:+"$@"}
+exec python @PKGDATADIR@/leo.py ${1:+"$@"}