Merge from vendor branch TNF:
[pkgsrc.git] / audio / rplay / Makefile
1 # $NetBSD: Makefile,v 1.15 2000/01/02 03:07:31 wiz Exp $
2 # FreeBSD Id: Makefile,v 1.8 1997/06/13 16:17:01 ache Exp
3 #
4
5 DISTNAME=       rplay-3.3.2
6 CATEGORIES=     audio
7 MASTER_SITES=   ftp://rplay.doit.org/pub/rplay/ \
8                 http://rplay.doit.org/dist/
9
10 MAINTAINER=     packages@netbsd.org
11 HOMEPAGE=       http://rplay.doit.org/
12
13 BUILD_DEPENDS+= ${LOCALBASE}/bin/autoreconf:../../devel/autoconf
14 DEPENDS+=       gsm-1.0.10:../../audio/gsm
15 DEPENDS+=       rx-1.5:../../devel/rx
16
17 USE_LIBTOOL=    yes
18 GNU_CONFIGURE=  yes
19 CONFIGURE_ENV+= RPLAY_TARGET=generic    # XXX generic, or oss, or sun?
20 CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}"
21
22 CPPFLAGS+=      -I${LOCALBASE}/include  # for gsm.h and rxposix.h
23
24 .if !exists(/usr/include/readline.h)
25 DEPENDS+=       readline-4.0:../../devel/readline
26 .endif
27
28 INFO_FILES=     RPLAY.info RPLAY.info librplay.info rplay.info
29
30 pre-configure:
31         cd ${WRKSRC}; ${LOCALBASE}/bin/autoreconf
32         cd ${WRKSRC}/doc; for f in *.[0-9]; do \
33                 ${SED} -e "s,/usr/local,${PREFIX},g" < $$f > $$f.pdone; \
34                 ${MV} -f $$f.pdone $$f; \
35         done
36
37 post-install:
38         ${SED} -e "s,@PREFIX@,${PREFIX},g" \
39                 < ${FILESDIR}/rplayd.sh > ${WRKDIR}/rplayd.sh
40         ${INSTALL_SCRIPT} ${WRKDIR}/rplayd.sh ${PREFIX}/etc/rc.d/rplayd.sh
41         PKG_PREFIX=${PREFIX} ${SH} ${INSTALL_FILE} ${PKGNAME} POST-INSTALL
42
43 .include "../../mk/bsd.pkg.mk"