Update port: [Maintainer Update]: misc/lr

- Update to latest release.
	(Including use of lesspipe.sh)

PR:		ports/50823
Submitted by:	Michael L. Hostbaek <mich@freebsdcluster.org>
This commit is contained in:
Edwin Groothuis 2003-04-13 10:43:20 +00:00
parent 94a8d21702
commit ac607960f9
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=78866
4 changed files with 45 additions and 4 deletions

View File

@ -7,24 +7,51 @@
#
PORTNAME= lr
PORTVERSION= 1.9
PORTVERSION= 2.0
CATEGORIES= misc
MASTER_SITES= http://www.seekrut.com/rk/
DISTNAME= lazyread-${PORTVERSION}
MAINTAINER= mich@freebsdcluster.org
COMMENT= Lazyread can auto-scroll files on your screen in movie credit fashion
.include <bsd.port.pre.mk>
.if exists(/usr/bin/lesspipe.sh)
LESSPIPE_PATH=/usr/bin/
PLIST_SUB+= LESSPIPE="@comment "
.else
.if exists(${LOCALBASE}/bin/lesspipe.sh)
LESSPIPE_PATH=${LOCALBASE}/bin/
PLIST_SUB+= LESSPIPE="@comment "
.else
INSTALL_LESSPIPE=1
LESSPIPE_PATH=${LOCALBASE}/bin/
PLIST_SUB+= LESSPIPE=""
.endif
.endif
LDFLAGS+= -lncurses
WRKSRC= ${WRKDIR}/${DISTNAME}
USE_REINPLACE= yes
pre-patch:
@${REINPLACE_CMD} -e 's|getenv("LESSOPEN")|"\|${LESSPIPE_PATH}lesspipe.sh"|' ${WRKSRC}/lazyread.c
do-build:
cd ${WRKSRC}; ${CC} ${CFLAGS} -o lr lazyread.c -lncurses
cd ${WRKSRC}; ${CC} ${CFLAGS} -o lr lazyread.c ${LDFLAGS}
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/lr ${PREFIX}/bin
.if defined(INSTALL_LESSPIPE)
${INSTALL_SCRIPT} ${FILESDIR}/lesspipe.sh ${PREFIX}/bin
.endif
.if !defined(NOPORTDOCS)
@${MKDIR} ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
.endif
.include <bsd.port.mk>
.include <bsd.port.post.mk>

View File

@ -1 +1 @@
MD5 (lazyread-1.9.tar.gz) = 4ed53cd11497d23ae895d086d29a0cba
MD5 (lazyread-2.0.tar.gz) = 8776c44ea2439d40cce3b449f1186bf4

13
misc/lr/files/lesspipe.sh Normal file
View File

@ -0,0 +1,13 @@
#! /bin/sh
# ex:ts=8
# $FreeBSD: /tmp/pcvs/ports/misc/lr/files/lesspipe.sh,v 1.1 2003-04-13 10:43:20 edwin Exp $
case "$1" in
*.Z) uncompress -c $1 2>/dev/null
;;
*.gz) gzip -d -c $1 2>/dev/null
;;
*.bz2) bzip2 -d -c $1 2>/dev/null
;;
esac

View File

@ -1,3 +1,4 @@
bin/lr
%%LESSPIPE%%bin/lesspipe.sh
%%PORTDOCS%%share/doc/lr/README
%%PORTDOCS%%@dirrm share/doc/lr