Makefile 2.65 KB
Newer Older
1
2
3
4
# $FreeBSD$

PORTNAME=	gerbera
DISTVERSIONPREFIX=	v
nc's avatar
nc committed
5
DISTVERSION=	1.7.0
rhurlin's avatar
rhurlin committed
6
PORTREVISION=	1
7
8
9
10
11
12
CATEGORIES=	net multimedia

MAINTAINER=	daniel.engberg.lists@pyret.net
COMMENT=	Media server compatible with DLNA and UPnP

LICENSE=	GPLv2
nc's avatar
nc committed
13
LICENSE_FILE=	${WRKSRC}/LICENSE.md
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

LIB_DEPENDS=	libfmt.so:devel/libfmt \
		libspdlog.so:devel/spdlog \
		libpugixml.so:textproc/pugixml \
		libinotify.so:devel/libinotify

USES=		cmake compiler:c++17-lang iconv localbase:ldflags \
		pkgconfig sqlite

USE_GITHUB=	yes
USE_RC_SUBR=	gerbera

TEST_TARGET=	test

CMAKE_OFF=	WITH_EXIF WITH_LASTFM WITH_MYSQL WITH_SYSTEMD

USERS=		gerbera
GROUPS=		gerbera
SUB_LIST=	USER=${USERS} GROUP=${GROUPS}
PLIST_SUB=	USER=${USERS} GROUP=${GROUPS}
SUB_FILES=	pkg-message

OPTIONS_DEFINE=		CURL DEBUG DUKTAPE EXIV2 FFMPEG FFMPEGTHUMBNAILER \
			LIBMAGIC MATROSKA TAGLIB TEST
OPTIONS_DEFAULT=	CURL DUKTAPE EXIV2 FFMPEG LIBMAGIC TAGLIB LIBNPUPNP

OPTIONS_SINGLE=		UPNPLIB
OPTIONS_SINGLE_UPNPLIB=	LIBNPUPNP LIBUPNP

CURL_DESC=		Support for online services via cURL
DUKTAPE_DESC=		Javascript support for custom import scripts
FFMPEGTHUMBNAILER_DESC=	Support for thumbnail generation
LIBNPUPNP_DESC=		Use high performance libnpupnp library
LIBMAGIC_DESC=		Identify file mime types via libmagic
LIBUPNP_DESC=		Use libupnp library
MATROSKA_DESC=		Extract video/mkv metadata via libmatroska
TAGLIB_DESC=		Extract audio file metadata via taglib

CURL_LIB_DEPENDS=	libcurl.so:ftp/curl
CURL_CMAKE_BOOL=	WITH_CURL

DEBUG_CMAKE_BOOL=	WITH_DEBUG

DUKTAPE_LIB_DEPENDS=	libduktape.so:lang/duktape-lib
DUKTAPE_CMAKE_BOOL=	WITH_JS

EXIV2_LIB_DEPENDS=	libexiv2.so:graphics/exiv2
EXIV2_CMAKE_BOOL=	WITH_EXIV2

FFMPEG_LIB_DEPENDS=	libavformat.so:multimedia/ffmpeg \
			libavutil.so:multimedia/ffmpeg
FFMPEG_CMAKE_BOOL=	WITH_AVCODEC

FFMPEGTHUMBNAILER_LIB_DEPENDS=	libffmpegthumbnailer.so:multimedia/ffmpegthumbnailer
FFMPEGTHUMBNAILER_CMAKE_BOOL=	WITH_FFMPEGTHUMBNAILER
FFMPEGTHUMBNAILER_IMPLIES=	FFMPEG

LIBMAGIC_LIB_DEPENDS=	libmagic.so:sysutils/file
LIBMAGIC_CMAKE_BOOL=	WITH_MAGIC

LIBNPUPNP_LIB_DEPENDS=	libnpupnp.so:net/libnpupnp
LIBNPUPNP_CMAKE_BOOL=	WITH_NPUPNP

LIBUPNP_LIB_DEPENDS=	libupnp.so:devel/upnp

MATROSKA_LIB_DEPENDS=	libmatroska.so:multimedia/libmatroska
MATROSKA_CMAKE_BOOL=	WITH_MATROSKA

TAGLIB_LIB_DEPENDS=	libtag.so:audio/taglib
TAGLIB_CMAKE_BOOL=	WITH_TAGLIB

TEST_BUILD_DEPENDS=	googletest>=0:devel/googletest
TEST_CMAKE_BOOL=	WITH_TESTS
TEST_IMPLIES=		CURL DUKTAPE

post-install:
	${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/gerbera
	@${MKDIR} ${STAGEDIR}/var/db/gerbera
	@${MKDIR} ${STAGEDIR}/var/log/gerbera
	@${STAGEDIR}${PREFIX}/bin/gerbera -f /var/db/gerbera --create-config > ${STAGEDIR}${PREFIX}/etc/gerbera-config.xml.sample

.include <bsd.port.mk>