summaryrefslogtreecommitdiff
path: root/multimedia/mediatomb/Makefile
blob: f9d885aec33ee2c93b68c3831acadb5716aea074 (plain)
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
# $NetBSD: Makefile,v 1.25 2011/11/27 08:10:12 sbd Exp $

DISTNAME=	mediatomb-0.12.1
PKGREVISION=	7
CATEGORIES=	multimedia
MASTER_SITES=	${MASTER_SITE_SOURCEFORGE:=mediatomb/}

MAINTAINER=	tron@NetBSD.org
HOMEPAGE=	http://mediatomb.cc/
COMMENT=	UPnP MediaServer with a web user interface
LICENSE=	gnu-gpl-v2

PKG_DESTDIR_SUPPORT=	user-destdir

USE_LANGUAGES=		c c++
USE_TOOLS+=		automake autoconf autoreconf pkg-config
GNU_CONFIGURE=		yes

RCD_SCRIPTS=	mediatomb

.include "../../mk/bsd.prefs.mk"

PKG_GROUPS=			${MEDIATOMB_GROUP}
PKG_USERS=			${MEDIATOMB_USER}:${MEDIATOMB_GROUP}

PKG_GECOS.${MEDIATOMB_USER}=	MediaTomb Server
PKG_HOME.${MEDIATOMB_USER}=	${VARBASE}/mediatomb

PKG_SYSCONFSUBDIR=	mediatomb
EGDIR=			${PREFIX}/share/examples/mediatomb
CONF_FILES_PERMS+=	${EGDIR}/config.xml ${PKG_SYSCONFDIR}/config.xml \
			${MEDIATOMB_USER} ${MEDIATOMB_GROUP} 0640

FILES_SUBST+=		PKG_HOME=${PKG_HOME.${MEDIATOMB_USER}:Q}
FILES_SUBST+=		MEDIATOMB_GROUP=${MEDIATOMB_GROUP}
FILES_SUBST+=		MEDIATOMB_USER=${MEDIATOMB_USER}
FILES_SUBST+=		PKG_SYSCONFDIR=${PKG_SYSCONFDIR}

MEDIATOMB_HOME=		${PKG_HOME.${MEDIATOMB_USER}}

SUBST_CLASSES+=		config
SUBST_FILES.config=	config.xml mediatomb.desktop
SUBST_VARS.config=	MEDIATOMB_HOME PREFIX OPSYS
SUBST_STAGE.config=	post-patch

INSTALLATION_DIRS+=	share/applications share/examples/mediatomb

post-extract:
	${CP} ${FILESDIR}/config.xml.in ${WRKSRC}/config.xml
	${CP} ${FILESDIR}/mediatomb.desktop.in ${WRKSRC}/mediatomb.desktop

pre-configure:
	cd ${WRKSRC} && autoreconf -i

post-install:
	${INSTALL_DATA} ${WRKSRC}/config.xml ${DESTDIR}${EGDIR}/config.xml
	${INSTALL_DATA} ${WRKSRC}/mediatomb.desktop \
		${DESTDIR}${PREFIX}/share/applications/mediatomb.desktop

.include "options.mk"

.include "../../audio/taglib/buildlink3.mk"
.include "../../databases/sqlite3/buildlink3.mk"
.include "../../devel/zlib/buildlink3.mk"
.include "../../graphics/libexif/buildlink3.mk"
.include "../../multimedia/ffmpeg/buildlink3.mk"
.include "../../sysutils/file/buildlink3.mk"
.include "../../textproc/expat/buildlink3.mk"
.include "../../www/curl/buildlink3.mk"

.include "../../sysutils/desktop-file-utils/desktopdb.mk"
.include "../../mk/bsd.pkg.mk"