aboutsummaryrefslogtreecommitdiff
path: root/multimedia/freevo/Makefile
blob: 37688a6d17c9626f494a57689db7761c322ec0ad (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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# New ports collection makefile for:	freevo
# Date created:		April 10 2004
# Whom:			Lewis Thompson (purple@lewiz.net)
#
# $FreeBSD$
#

PORTNAME=	freevo
PORTVERSION=	1.5.4
PORTREVISION=	2
CATEGORIES=	multimedia
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR=	freevo

MAINTAINER=	netcom@sauber.net
COMMENT=	Open source digital jukebox

NO_BUILD=	yes
SUB_LIST+=	PORTVERSION=${PORTVERSION}
SUB_FILES=	pkg-message

RUN_DEPENDS=	aumix:${PORTSDIR}/audio/aumix \
		${PYTHON_SITELIBDIR}/pyosd/__init__.py:${PORTSDIR}/misc/py-osd \
		${PYTHON_SITELIBDIR}/pygame/__init__.py:${PORTSDIR}/devel/py-game \
		${PYTHON_SITELIBDIR}/PIL/__init__.py:${PORTSDIR}/graphics/py-imaging \
		${PYTHON_SITELIBDIR}/twisted/__init__.py:${PORTSDIR}/devel/py-twisted \
		${PYTHON_SITELIBDIR}/mmpython/__init__.py:${PORTSDIR}/multimedia/mmpython \
		${PYTHON_SITELIBDIR}/_xmlplus/__init__.py:${PORTSDIR}/textproc/py-xml \

USE_PYTHON=	yes
USE_PYDISTUTILS=	yes
USE_REINPLACE=	yes
PKGINSTALL=	pkg-install

DOCSDIR=	${PREFIX}/share/doc/${DISTNAME}
CONF=		${PREFIX}/etc/${PORTNAME}

OPTIONS=	MPLAYER	"Enable mplayer video playback support" On \
		XINE "Enable xine video playback support" On \
		MAME "Enable xmame game support" Off \
		SNES9X "Enable snes9x game support" Off \
		ZSNES "Enable zsnes game support" Off \
		XMLTV "Enable TV guide listings support" On \
		CDPARANOIA "Enable cdparanoia audio extraction support" On \
		LAME "Enable lame MP3 encoding support" On \
		OGG "Enable Ogg Vorbis encoding support" On \
		FLAC "Enable FLAC encoding support" Off \
		LIRC "Enable lirc remote control support" On

.include <bsd.port.pre.mk>

###
# AUTODETECTION
###

.if exists(${X11BASE}/bin/xmame) && !defined(WITHOUT_MAME)
WITH_MAME=	YES
.endif

.if exists(${X11BASE}/bin/snes9x) && !defined(WITHOUT_SNES9X)
WITH_SNES9X=	YES
.endif

.if exists(${X11BASE}/bin/zsnes) && !defined(WITHOUT_ZSNES)
WITH_ZSNES=	YES
.endif

.if exists(${LOCALBASE}/bin/flac) && !defined(WITHOUT_FLAC)
WITH_FLAC=	YES
.endif

###
# CONFIGURE RUN_DEPENDS
###

.if !defined(WITHOUT_MPLAYER)
RUN_DEPENDS+=	mplayer:${PORTSDIR}/multimedia/mplayer
.endif

.if !defined(WITHOUT_XINE)
RUN_DEPENDS+=	xine:${PORTSDIR}/multimedia/xine
.endif

.if defined(WITH_MAME)
RUN_DEPENDS+=	xmame:${PORTSDIR}/emulators/xmame
.endif

.if defined(WITH_SNES9X)
RUN_DEPENDS+=	snes9x:${PORTSDIR}/emulators/snes9x
.endif

.if defined(WITH_ZSNES)
RUN_DEPENDS+=	zsnes:${PORTSDIR}/emulators/zsnes
.endif

.if !defined(WITHOUT_XMLTV)
RUN_DEPENDS+=	tv_cat:${PORTSDIR}/textproc/p5-xmltv
.endif

.if !defined(WITHOUT_CDPARANOIA)
RUN_DEPENDS+=	cdparanoia:${PORTSDIR}/audio/cdparanoia
.endif

.if !defined(WITHOUT_LAME)
RUN_DEPENDS+=	lame:${PORTSDIR}/audio/lame
.endif

.if !defined(WITHOUT_OGG)
RUN_DEPENDS+=	oggenc:${PORTSDIR}/audio/vorbis-tools
.endif

.if defined(WITH_FLAC)
RUN_DEPENDS+=	flac:${PORTSDIR}/audio/flac
.endif

.if !defined(WITHOUT_LIRC)
RUN_DEPENDS+=	${PYTHON_SITELIBDIR}/pylircmodule.so:${PORTSDIR}/comms/py-lirc
.endif

post-patch:
	@${REINPLACE_CMD} -e 's|/etc/freevo|${PREFIX}/etc/freevo|' ${WRKSRC}/freevo_config.py
	@${REINPLACE_CMD} -e 's|/etc/freevo|${PREFIX}/etc/freevo|' ${WRKSRC}/local_conf.py.example

pre-install:
	@BATCH="${BATCH}" ${SH} ${PKGINSTALL} PRE-INSTALL

post-install:
	@${MKDIR} ${CONF} && ${CHMOD} a+rx ${CONF}
	${INSTALL_DATA} ${WRKSRC}/local_conf.py.example ${CONF}
	@${SED} 's|%%PREFIX%%|${PREFIX}|' ${FILESDIR}/freevo.sh.sample > ${WRKDIR}/freevo.sh.sample
	${INSTALL_SCRIPT} ${WRKDIR}/freevo.sh.sample ${PREFIX}/etc/rc.d/
	@${SED} 's|%%PREFIX%%|${PREFIX}|' ${PKGMESSAGE}

.include <bsd.port.post.mk>