aboutsummaryrefslogtreecommitdiffstats
path: root/net-p2p/teknap/Makefile
blob: 2201cc42887f71ed377e7a1d7152da924fd97d95 (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
74
75
76
77
78
# Created by: Carl Johan Madestrand
# $FreeBSD$

PORTNAME=   TekNap
PORTVERSION=    1.3.g
PORTREVISION=   3
CATEGORIES= net-p2p
MASTER_SITES=   http://www.epicsol.org/~brian/got.net-archive/teknap/
DISTNAME=   ${PORTNAME}-${PORTVERSION:S/.g/g/}

MAINTAINER= ports@FreeBSD.org
COMMENT=    Console napster client

.if defined(WITH_MP3)
BUILD_DEPENDS=  mpg123:${PORTSDIR}/audio/mpg123
.endif
.if defined(WITH_XMMS)
BUILD_DEPENDS=  xmms:${PORTSDIR}/multimedia/xmms
.endif

WRKSRC=     ${WRKDIR}/TekNap

PLIST_FILES=    bin/TekNap \
        bin/TekNap-1.3g

USES=   gmake
WANT_GNOME= yes
GNU_CONFIGURE=  yes
DOCSDIR=    ${PREFIX}/share/doc/TekNap
PORTDOCS=   *
CPPFLAGS+=  -I${LOCALBASE}/include
LIBS+=      -L${LOCALBASE}/lib

NO_STAGE=   yes
.include <bsd.port.pre.mk>

.if ${HAVE_GNOME:Mgtk12}!=""
USE_GNOME+= gtk12
CONFIGURE_ARGS+=--with-gtk
PKGNAMESUFFIX=  -gtk
.else
CONFIGURE_ARGS+=--without-gtk
.endif

.if defined(WITH_MP3)
CONFIGURE_ARGS+=--enable-mp3
.endif

.if defined(WITH_XMMS)
CONFIGURE_ARGS+=--enable-xmms
.endif

pre-extract:
    @${ECHO} "Available switches:"
    @${ECHO} "-------------------"
    @${ECHO} "WITH_MP3 - Support MP3 playback"
    @${ECHO} "WITH_XMMS - Support XMMS"

pre-configure:
    @${REINPLACE_CMD} -e "s:-lc_r:${PTHREAD_LIBS}:g" ${WRKSRC}/configure

post-patch:
    @${REINPLACE_CMD} -e '/mkinstalldirs/ s,$$(HELPDIR) $$(NAPLIB),,g' \
        -e "s/-I-//g" \
        ${WRKSRC}/Makefile.in

post-install:
.if !defined(NOPORTDOCS)
    ${MKDIR} ${DOCSDIR}/help
    ${TAR} --directory ${WRKSRC}/teknap-help -cf - . | \
    ${TAR} --directory ${DOCSDIR}/help -xf -
    ${INSTALL_DATA} ${WRKSRC}/README ${DOCSDIR}
    @${ECHO}
    @${CAT} ${PKGMESSAGE} | ${SED} -e "s:%%DOCSDIR%%:${DOCSDIR}:g"
    @${ECHO}
.endif

.include <bsd.port.post.mk>