blob: d5bad270a1b9eb7b17cf6e56b0f79d7babbfbbcd (
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
|
# Created by: rene@FreeBSD.org
# $FreeBSD$
PORTNAME= SpotifyWebsocketAPI
PORTVERSION= 0.2
PORTREVISION= 4
CATEGORIES= multimedia python
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
MAINTAINER= rene@FreeBSD.org
COMMENT= Websocket API and client for Spotify
USE_GITHUB= yes
GH_COMMIT= 08ee326
GH_ACCOUNT= Hexxeh
GH_PROJECT= spotify-websocket-api
GH_TAGNAME= ${GH_COMMIT}
USE_PYTHON= yes # tested with 2.7
USE_PYDISTUTILS= easy_install
OPTIONSFILE= ${PORT_DBDIR}/py-${PORTNAME}/options
OPTIONS_DEFINE= EXAMPLES
PORTEXAMPLES= blocking.py nonblocking.py decode_mercury.py play.py \
serve.py ctype.py gstreamer.py
CLIENTFILES= respotify.py respotify-helper.py
NO_STAGE= yes
.include <bsd.port.options.mk>
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}requests>=1.1.0:${PORTSDIR}/www/py-requests \
${PYTHON_PKGNAMEPREFIX}ws4py>=0.2.4:${PORTSDIR}/www/py-ws4py \
${PYTHON_PKGNAMEPREFIX}protobuf>=2.4.1:${PORTSDIR}/devel/py-protobuf \
${PYTHON_PKGNAMEPREFIX}lxml>=3.1:${PORTSDIR}/devel/py-lxml \
${PYTHON_PKGNAMEPREFIX}mpd2>=0:${PORTSDIR}/audio/py-mpd2
EXAMPLES_LIB_DEPENDS=libao.so:${PORTSDIR}/audio/libao \
libmpg123.so:${PORTSDIR}/audio/mpg123
EXAMPLES_RUN_DEPENDS=${PYTHON_PKGNAMEPREFIX}curl>=0:${PORTSDIR}/ftp/py-curl \
${PYTHON_PKGNAMEPREFIX}gobject>=0:${PORTSDIR}/devel/py-gobject
.if ${PORT_OPTIONS:MEXAMPLES}
USE_GSTREAMER= python
.endif
post-patch:
${REINPLACE_CMD} -e "s|%%PREFIX%%|${PREFIX}|" \
${WRKSRC}/clients/respotify/respotify.py
post-install:
.for f in ${CLIENTFILES}
@${INSTALL_SCRIPT} ${WRKSRC}/clients/respotify/${f} ${PREFIX}/bin
@${PYTHON_CMD} -O -mcompileall ${PREFIX}/bin/${f}
@${PYTHON_CMD} -mcompileall ${PREFIX}/bin/${f}
.endfor
@${LN} -s ${PREFIX}/bin/respotify.py ${PREFIX}/bin/respotify
.if ${PORT_OPTIONS:MEXAMPLES}
@${MKDIR} ${EXAMPLESDIR}
.for f in ${PORTEXAMPLES}
@${INSTALL_SCRIPT} ${WRKSRC}/examples/${f} ${EXAMPLESDIR}
.endfor
.endif
.include <bsd.port.mk>
|