PORTREVISION => 1.
Added an excellent tutorial, creating a docs dir. Cleaned up do-install procedure some.
This commit is contained in:
parent
78e10f01d3
commit
ba046b2af5
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=70355
3 changed files with 44 additions and 14 deletions
|
@ -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
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
MD5 (leo-3.8.zip) = e54e75266c1bc7541f682fbd7e72c39e
|
||||
MD5 (leo-3.8) = e54e75266c1bc7541f682fbd7e72c39e
|
||||
MD5 (SbooksLeo) = ad62f8cc3bd44c5fbb1fe49a26ad6795
|
||||
|
|
|
@ -8,5 +8,5 @@
|
|||
#
|
||||
# 2002/11/17 alane@freebsd.org
|
||||
#
|
||||
exec python @LOCALBASE@/share/@DISTNAME@/leo.py ${1:+"$@"}
|
||||
exec python @PKGDATADIR@/leo.py ${1:+"$@"}
|
||||
|
||||
|
|
Loading…
Reference in a new issue