summaryrefslogtreecommitdiff
path: root/audio/teknap/Makefile
blob: 7959f730ac3408b68c667275fd96b66a9d257aa4 (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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
# New ports collection makefile for:	TekNap napster client
# Date created:				6 Jul 2000
# Whom:					Carl Johan Madestrand
#
# $FreeBSD$
#

PORTNAME=	TekNap
PORTVERSION=	1.2
CATEGORIES=	audio
MASTER_SITES=	ftp://ftp.teknap.com/pub/TekNap/ \
		ftp://ftp.bitchx.com/pub/TekNap/

MAINTAINER=	cj@vallcom.net

.if defined(WITH_GTK)
LIB_DEPENDS=	gtk12.2:${PORTSDIR}/x11-toolkits/gtk12
.endif
.if defined(WITH_MP3)
BUILD_DEPENDS=	mpg123:${PORTSDIR}/audio/mpg123
.endif
.if defined(WITH_XMMS)
BUILD_DEPENDS=	xmms:${PORTSDIR}/audio/xmms
.endif

GLIB_CONFIG?=	${LOCALBASE}/bin/glib12-config
GTK_CONFIG?=	${X11BASE}/bin/gtk12-config
WRKSRC=		${WRKDIR}/TekNap
GNU_CONFIGURE=	yes
USE_GMAKE=	yes

.if defined(WITH_GTK)
CONFIGURE_ARGS+= 	--with-gtk
.endif
.if defined(WITH_MP3)
CONFIGURE_ARGS+=	--enable-mp3
.endif
.if defined(WITH_XMMS)
CONFIGURE_ARGS+=	--enable-xmms
.endif
CONFIGURE_ARGS+=	--exec-prefix="${PREFIX}/share" \
			--bindir="${PREFIX}/bin" \
			--datadir="${PREFIX}/share" \
			--libdir="${PREFIX}/share"

CONFIGURE_ENV=	CPPFLAGS="-I${LOCALBASE}/include" \
		GLIB_CONFIG="${GLIB_CONFIG}" \
		GTK_CONFIG="${GTK_CONFIG}"
MAKE_ENV+=	INSTALL_PROGRAM="${INSTALL_PROGRAM}" \
		INSTALL_DATA="${INSTALL_DATA}"
PLIST_SUB+=	PORTVERSION="${PORTVERSION}"

pre-extract:
	@${ECHO} "Available switches:"
	@${ECHO} "-------------------"
	@${ECHO} "WITH_GTK - Add GTK support"
	@${ECHO} "WITH_MP3 - Support MP3 playback"
	@${ECHO} "WITH_XMMS - Support XMMS"
pre-configure:
	${PERL} -pi -e "s:-lc_r:-pthread:g" ${WRKSRC}/configure

post-install:
.if !defined(NOPORTDOCS)
	${MKDIR} ${PREFIX}/share/doc/TekNap
	${TAR} --directory ${WRKSRC}/teknap-help -cf - . --exclude CVS | \
	${TAR} --directory ${PREFIX}/share/TekNap/help -xf -
	${INSTALL_DATA} ${WRKSRC}/README ${PREFIX}/share/doc/TekNap
	@${ECHO}
	@${CAT} ${PKGDIR}/MESSAGE | ${SED} -e "s:%%PREFIX%%:${PREFIX}:g"
	@${ECHO}
.endif

.include <bsd.port.mk>