# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4

PortSystem      1.0

name			mt-daapd
version			0.2.4.2
revision        4
categories		audio net
# GPL and APSL are incompatible
license			GPL-2+ APSL-2 APSL-1.2 Restrictive
maintainers		nomaintainer
description		A multi-threaded DAAP server emulating an iTunes server.
long_description	${description}

homepage		http://web.archive.org/web/20101214025948/http://fireflymediaserver.org/
master_sites	sourceforge:project/mt-daapd/mt-daapd/${version}

checksums           rmd160  918b76ffe3af7b0413be1cbbafdd11274f5d3e9d \
                    sha256  50d89f77bdc3fd0ca408d52cabff528224fcc7319acc3b9456db0e3164a3b6cf

patchfiles		patch-mt-daapd.conf

depends_lib		port:zlib port:gdbm port:libid3tag port:libogg port:libvorbis

configure.args	--enable-mdns --enable-oggvorbis
configure.cflags-append		"-I${prefix}/include"

post-destroot	{
	xinstall -m 755 -d ${destroot}${prefix}/share/doc/${name} \
		${destroot}${prefix}/var/db/mt-daapd/ \
		${destroot}${prefix}/var/log

	xinstall -m 644 ${worksrcpath}/contrib/mt-daapd.conf \
		${destroot}${prefix}/etc/mt-daapd.conf.sample
	reinplace "s|__PREFIX__|${prefix}|g" \
		${destroot}${prefix}/etc/mt-daapd.conf.sample

	xinstall -m 644 ${worksrcpath}/contrib/mt-daapd.playlist \
		${destroot}${prefix}/etc/mt-daapd.playlist.sample
	destroot.keepdirs ${destroot}${prefix}/var/db/mt-daapd
	xinstall -c -m 644 /dev/null ${destroot}${prefix}/var/log/mt-daapd.log
	xinstall -m 644 -W ${worksrcpath} AUTHORS COPYING CREDITS ChangeLog \
		INSTALL NEWS README TODO ${destroot}${prefix}/share/doc/${name}
}
