summaryrefslogtreecommitdiff
path: root/audio/spotifyd/Makefile
blob: 7b1aae62d9b3729de5a7fd8900e38ab31c58fb3c (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
PORTNAME=	spotifyd
DISTVERSIONPREFIX=	v
DISTVERSION=	0.3.5
PORTREVISION=	12
CATEGORIES=	audio

MAINTAINER=	rodrigo@FreeBSD.org
COMMENT=	Spotify daemon
WWW=		https://github.com/Spotifyd/spotifyd

LICENSE=	GPLv3
LICENSE_FILE=	${WRKSRC}/cargo-crates/ansi_term-0.12.1/LICENCE

LIB_DEPENDS=	libogg.so:audio/libogg

USES=		cargo ssl:build
USE_GITHUB=	yes
GH_ACCOUNT=	Spotifyd
USE_RC_SUBR=	spotifyd

CARGO_FEATURES=	--no-default-features

PLIST_FILES=	bin/spotifyd \
		"@sample etc/spotifyd.conf.sample"
PORTDOCS=	README.md

OPTIONS_DEFINE=		ALSA DBUS DNS-SD DOCS PORTAUDIO PULSEAUDIO
OPTIONS_DEFAULT=	PORTAUDIO

DBUS_DESC=	D-Bus MPRIS support
DNS-SD_DESC=	Avahi mDNSS support

ALSA_LIB_DEPENDS=	libasound_module_pcm_oss.so:audio/alsa-plugins
ALSA_VARS=		CARGO_FEATURES+=alsa_backend

DBUS_LIB_DEPENDS=	libdbus-1.so:devel/dbus
DBUS_VARS=		CARGO_FEATURES+=dbus_mpris

DNS-SD_LIB_DEPENDS=	libdns_sd.so:net/avahi-libdns
DNS-SD_EXTRA_PATCHES=	${PATCHDIR}/extra-patch.Cargo.toml

PORTAUDIO_LIB_DEPENDS=	libportaudio.so:audio/portaudio
PORTAUDIO_VARS=		CARGO_FEATURES+=portaudio_backend

PULSEAUDIO_LIB_DEPENDS=	libpulse.so:audio/pulseaudio
PULSEAUDIO_VARS=	CARGO_FEATURES+=pulseaudio_backend

post-patch:
	@${REINPLACE_CMD} 's,/etc/,${PREFIX}/etc/,g' ${WRKSRC}/src/config.rs

post-install:
	${INSTALL_DATA} ${FILESDIR}/spotifyd.conf ${STAGEDIR}${PREFIX}/etc/spotifyd.conf.sample

post-install-DOCS-on:
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
	${INSTALL_MAN} ${WRKSRC}/README.md ${STAGEDIR}${DOCSDIR}

.include <bsd.port.mk>