aboutsummaryrefslogtreecommitdiff
path: root/audio/owntone/Makefile
blob: 3130d206b33d4d5f020586d26b7ff14e3fc5482c (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
PORTNAME=	owntone
DISTVERSION=	28.5
PORTREVISION=	1
CATEGORIES=	audio
MASTER_SITES=	https://github.com/owntone/owntone-server/releases/download/${DISTVERSION}/

MAINTAINER=	dinoex@FreeBSD.org
COMMENT=	DAAP (iTunes), MPD (Music Player Daemon) and RSP (Roku) media server
WWW=		https://github.com/owntone/owntone-server

LICENSE=	GPLv2
LICENSE_FILE=	${WRKSRC}/COPYING

LIB_DEPENDS=	libavahi-client.so:net/avahi-app \
		libavcodec.so:multimedia/ffmpeg \
		libconfuse.so:devel/libconfuse \
		libcurl.so:ftp/curl \
		libevent_pthreads.so:devel/libevent \
		libgcrypt.so:security/libgcrypt \
		libgnutls.so:security/gnutls \
		libgpg-error.so:security/libgpg-error \
		libjson-c.so:devel/json-c \
		libinotify.so:devel/libinotify \
		libmxml.so:textproc/mxml \
		libplist-2.0.so:devel/libplist \
		libsodium.so:security/libsodium \
		libunistring.so:devel/libunistring \
		libprotobuf-c.so:devel/protobuf-c \
		libuuid.so:misc/e2fsprogs-libuuid

USES=		tar:xz localbase libtool iconv:wchar_t pkgconfig gnome gmake \
		gperf sqlite gnome pathfix
USE_GNOME=	libxml2

GNU_CONFIGURE=	yes
CONFIGURE_ARGS=	--disable-install_systemd \
		--with-owntone-user=${OWNTONE_USER} \
		--with-owntone-group=${OWNTONE_USER}
USE_RC_SUBR=	${PORTNAME}
SUB_FILES=	pkg-message

OWNTONE_USER?=	daapd
USERS?=		daapd
GROUPS?=	daapd

OPTIONS_DEFINE=		ITUNES MPD AIRPLAY2 CHROMECAST WEBINTERFACE \
			ALSA PULSEAUDIO NLS DOCS
OPTIONS_DEFAULT=	ITUNES MPD AIRPLAY2 CHROMECAST WEBINTERFACE \
			ALSA NLS DOCS
NO_OPTIONS_SORT=yes
OPTIONS_SUB=yes

AIRPLAY2_DESC=		Prefer AirPlay 2
ITUNES_DESC=		iTunes XML support
CHROMECAST_DESC=	Chromecast support
MPD_DESC=		Music Player Daemon protocol support
WEBINTERFACE_DESC=	Install web interface

AIRPLAY2_CONFIGURE_ENABLE=	preferairplay2

ALSA_LIB_DEPENDS=	libasound.so:audio/alsa-lib
ALSA_CONFIGURE_WITH=	alsa

ITUNES_CONFIGURE_ENABLE=	itunes

CHROMECAST_CONFIGURE_ENABLE=	chromecast

MPD_CONFIGURE_ENABLE=		mpd

PULSEAUDIO_LIB_DEPENDS=		libpulse.so:audio/pulseaudio
PULSEAUDIO_CONFIGURE_WITH=	pulseaudio

WEBINTERFACE_CONFIGURE_ENABLE=	webinterface
WEBINTERFACE_CONFIGURE_WITH=	libwebsockets
WEBINTERFACE_LIB_DEPENDS=	libwebsockets.so:net/libwebsockets

NLS_USES=			gettext-runtime
NLS_CONFIGURE_ENABLE=		nls

post-install:
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/owntone/owntone-sqlext.so
	${MV} ${STAGEDIR}${PREFIX}/etc/owntone.conf \
		${STAGEDIR}${PREFIX}/etc/owntone.conf.sample

.include <bsd.port.mk>