diff options
author | Edwin Groothuis <edwin@FreeBSD.org> | 2003-04-13 10:43:20 +0000 |
---|---|---|
committer | Edwin Groothuis <edwin@FreeBSD.org> | 2003-04-13 10:43:20 +0000 |
commit | ac607960f9f0954933bf9944a27bb0da1aa9ccfb (patch) | |
tree | 972cbb4e5a20d8625eee610f54abe7e272994310 /misc/lr | |
parent | 94a8d21702f23a894345f65bf187ab360704e188 (diff) | |
download | ports-ac607960f9f0954933bf9944a27bb0da1aa9ccfb.tar.gz ports-ac607960f9f0954933bf9944a27bb0da1aa9ccfb.zip |
Notes
Diffstat (limited to 'misc/lr')
-rw-r--r-- | misc/lr/Makefile | 33 | ||||
-rw-r--r-- | misc/lr/distinfo | 2 | ||||
-rw-r--r-- | misc/lr/files/lesspipe.sh | 13 | ||||
-rw-r--r-- | misc/lr/pkg-plist | 1 |
4 files changed, 45 insertions, 4 deletions
diff --git a/misc/lr/Makefile b/misc/lr/Makefile index 5ca1473ade54..981be5264e22 100644 --- a/misc/lr/Makefile +++ b/misc/lr/Makefile @@ -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> diff --git a/misc/lr/distinfo b/misc/lr/distinfo index ccca856c7c6f..5af18dc988c4 100644 --- a/misc/lr/distinfo +++ b/misc/lr/distinfo @@ -1 +1 @@ -MD5 (lazyread-1.9.tar.gz) = 4ed53cd11497d23ae895d086d29a0cba +MD5 (lazyread-2.0.tar.gz) = 8776c44ea2439d40cce3b449f1186bf4 diff --git a/misc/lr/files/lesspipe.sh b/misc/lr/files/lesspipe.sh new file mode 100644 index 000000000000..21cf0243cbf0 --- /dev/null +++ b/misc/lr/files/lesspipe.sh @@ -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 diff --git a/misc/lr/pkg-plist b/misc/lr/pkg-plist index f34f426b5693..e14cb20bf0b6 100644 --- a/misc/lr/pkg-plist +++ b/misc/lr/pkg-plist @@ -1,3 +1,4 @@ bin/lr +%%LESSPIPE%%bin/lesspipe.sh %%PORTDOCS%%share/doc/lr/README %%PORTDOCS%%@dirrm share/doc/lr |