blob: 4fa28607f8837428ae113cad39d923af9892f4c4 (
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
|
# Created by: Michael L. Hostbaek (mich@freebsdcluster.org)
# $FreeBSD$
PORTNAME= lr
PORTVERSION= 2.0
CATEGORIES= misc
MASTER_SITES= SF/lazyread/lazyread/lazyread%20${PORTVERSION}
DISTNAME= lazyread-${PORTVERSION}
MAINTAINER= mich@FreeBSD.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}
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 ${LDFLAGS}
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/lr ${STAGEDIR}${PREFIX}/bin
.if defined(INSTALL_LESSPIPE)
${INSTALL_SCRIPT} ${FILESDIR}/lesspipe.sh ${STAGEDIR}${PREFIX}/bin
.endif
.if !defined(NOPORTDOCS)
@${MKDIR} ${STAGEDIR}${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/README ${STAGEDIR}${DOCSDIR}
.endif
.include <bsd.port.post.mk>
|