aboutsummaryrefslogtreecommitdiffstats
path: root/multimedia/castpodder/Makefile
blob: ca9e7273da39d70a5833ac29b19b0ac2d80ea42b (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
# New ports collection makefile for:    py-castpodder
# Date created:     2006-04-30
# Whom:         Nicola Vitale   <nivit@email.it>
#
# $FreeBSD$
#

PORTNAME=   castpodder
PORTVERSION=    5.1
PORTREVISION=   4
CATEGORIES= multimedia
MASTER_SITES=   http://nivi.interfree.it/distfiles/${PORTNAME}/
DISTNAME=   CastPodder-${PORTVERSION}

MAINTAINER= nivit@FreeBSD.org
COMMENT=    A podcast receiver written in Python

RUN_DEPENDS=    ${PYTHON_SITELIBDIR}/xmms/__init__.py:${PORTSDIR}/audio/py-xmms \
        ${PYTHON_SITELIBDIR}/bmp/__init__.py:${PORTSDIR}/multimedia/py-pybmp \
        ${PYTHON_SITELIBDIR}/${WX_PYTHON_DIR}/wxPython/_wx.py:${PORTSDIR}/x11-toolkits/py-wxPython26-unicode \
        ${PYTHON_SITELIBDIR}/_bsddb.so:${PORTSDIR}/databases/py-bsddb
.if !defined(WITH_BMP)
RUN_DEPENDS+=   xmms:${PORTSDIR}/multimedia/xmms
.else
RUN_DEPENDS+=   bmpx:${PORTSDIR}/multimedia/bmpx
.endif

NO_BUILD=   yes
USE_BZIP2=  yes
USE_PYTHON= yes

WRKSRC= ${WRKDIR}/${PORTNAME}
WX_PYTHON_DIR=  wx-2.6-gtk2-unicode

FIND_DIRS=  -type d
FIND_DATA=  -type f -not -name "${CASTPOD_SCRIPT}"

CASTPOD_SCRIPT= CastPodder.sh
PORTNAME2=  CastPodder
PORTNAME3=  iPodder
RM_FILES=   AUTHORS COPY CREDITS INSTALL KNOWN-ISSUES LICENSE NOTES README THANKS TODO gpl.txt install.sh make-distribution.sh

LN_OPTS=    -sf
RM_OPTS=    -rf

post-patch:
    cd ${WRKSRC} && ${REINPLACE_CMD} -e 's|%%DATADIR%%|${DATADIR}|g' -e "s|ensureMinimal('2.6')|select('${WX_PYTHON_DIR:S/^wx-//g}')|g" CastPodderGui.py ${CASTPOD_SCRIPT}
    cd ${WRKSRC} && ${RM} ${RM_OPTS} *.bak *.orig

do-install:
    ${MKDIR} ${DATADIR}
    ${INSTALL_SCRIPT} ${WRKSRC}/${CASTPOD_SCRIPT} ${DATADIR}/${CASTPOST_SCRIPT}
    cd ${WRKSRC} && ${FIND} . ${FIND_DIRS} -exec ${MKDIR} ${DATADIR}/{} ";"
    cd ${WRKSRC} && ${FIND} . ${FIND_DATA} -exec ${INSTALL_DATA} {} ${DATADIR}/{} ";"
    cd ${DATADIR} && ${FIND} ${RM_FILES} -delete
.if !defined(NOPORTDOCS)
    ${MV} ${DATADIR}/docs ${DOCSDIR}
.else
    ${RM} ${RM_OPTS} ${DATADIR}/docs
.endif
    ${LN} ${LN_OPTS} ${DATADIR}/${CASTPOD_SCRIPT} ${PREFIX}/bin/${PORTNAME}
    ${LN} ${LN_OPTS} ${DATADIR}/${CASTPOD_SCRIPT} ${PREFIX}/bin/${PORTNAME2}
    ${LN} ${LN_OPTS} ${DATADIR}/${CASTPOD_SCRIPT} ${PREFIX}/bin/${PORTNAME3}

.include <bsd.port.mk>