summaryrefslogtreecommitdiff
blob: e6d9eb631d1e2cc24a15bcdf19e19f6c34ea2a96 (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
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/net-www/mod_mp3/mod_mp3-0.35-r2.ebuild,v 1.12 2005/07/10 00:54:34 swegener Exp $

IUSE="mysql"

DESCRIPTION="Module for turning Apache into an MP3 or Ogg streaming server"
HOMEPAGE="http://media.tangent.org/"
KEYWORDS="x86"

SRC_URI="http://software.tangent.org/download/${P}.tar.gz"

DEPEND="virtual/libc =net-www/apache-1* dev-lang/perl
	mysql? ( >=dev-db/mysql-3.23.26 )"
RDEPEND=""

LICENSE="as-is"
SLOT="0"

src_compile() {
	local myconf
	use mysql && myconf="${myconf} --with-mysql"
	./configure ${myconf} || die
	make clean
	make || die "compile problem"
}

src_install() {
	exeinto /usr/lib/apache-extramodules
	doexe src/mod_mp3.so

	dodoc CONTRIBUTORS MANIFEST TODO ChangeLog LICENSE README VERSION
	dodoc support/{faq.pod,mp3_with_mysql.conf,mysql_schema,pgsql_schema}
	dohtml faq.html

	insinto /etc/apache/conf/addon-modules
	doins ${FILESDIR}/mod_mp3.conf
}

pkg_postinst() {
	einfo
	einfo "Execute \"ebuild /var/db/pkg/net-www/${PF}/${PF}.ebuild config\""
	einfo "to have your apache.conf auto-updated for use with this module."
	einfo "You should then edit your /etc/conf.d/apache file to suit."
	einfo
}

pkg_config() {
	${ROOT}/usr/sbin/apacheaddmod \
		${ROOT}/etc/apache/conf/apache.conf \
		extramodules/mod_mp3.so mod_mp3.c mp3_module \
		define=MP3 addconf=conf/addon-modules/mod_mp3.conf
	:;
}