aboutsummaryrefslogtreecommitdiffstats
path: root/recipes-multimedia/mediatomb/mediatomb_0.12.1.bb
blob: 4bd9917d280d17ecf0a097f4fa73361fec190b79 (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
73
74
75
76
77
78
79
DESCRIPTION = "MediaTomb - UPnP AV MediaServer for Linux"
HOMEPAGE = "http://mediatomb.cc/"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=0b609ee7722218aa600220f779cb5035 \
                    file://src/main.cc;beginline=14;endline=25;md5=ba9c4cf20a63e18b1626c4c9d794635a"
DEPENDS = "expat libav sqlite3 libexif js zlib file taglib ffmpegthumbnailer curl"
PR = "r4"

SRC_URI = "${SOURCEFORGE_MIRROR}/mediatomb/mediatomb-${PV}.tar.gz \
	   file://youtube_warning.patch \
	   file://size_t_header.patch \
	   file://libav_0.7_support.patch \
	   file://init \
	   file://default \
	   file://config.xml \
	   "

inherit autotools pkgconfig update-rc.d

INITSCRIPT_NAME = "mediatomb"
INITSCRIPT_PARAMS = "defaults 90"

EXTRA_OECONF = "--disable-mysql \
		--disable-rpl-malloc \
		--enable-sqlite3 \
		--enable-libjs \
		--enable-libmagic \
		--enable-taglib \
		--enable-libexif \
		--enable-inotify \
		--enable-db-autocreate \
		--disable-largefile \
		--with-sqlite3-h=${STAGING_INCDIR} \
		--with-sqlite3-libs=${STAGING_LIBDIR} \
		--with-magic-h=${STAGING_INCDIR} \
		--with-magic-libs=${STAGING_LIBDIR} \
		--with-exif-h=${STAGING_INCDIR} \
		--with-exif-libs=${STAGING_LIBDIR} \
		--with-zlib-h=${STAGING_INCDIR} \
		--with-zlib-libs=${STAGING_LIBDIR} \
		--with-js-h=${STAGING_INCDIR}/js \
		--with-js-libs=${STAGING_LIBDIR} \
		--with-taglib-h=${STAGING_INCDIR} \
		--with-taglib-libs=${STAGING_LIBDIR} \
		--with-ffmpeg-h=${STAGING_INCDIR} \
		--with-ffmpeg-libs=${STAGING_LIBDIR} \
                --with-search=${STAGING_DIR_HOST}${prefix}/local \
		ac_cv_header_sys_inotify_h=yes"

SRC_URI[md5sum] = "e927dd5dc52d3cfcebd8ca1af6f0d3c2"
SRC_URI[sha256sum] = "31163c34a7b9d1c9735181737cb31306f29f1f2a0335fb4f53ecccf8f62f11cd"

do_install() {
	autotools_do_install

	# install the daemonizing bits manually
	install -d ${D}${sysconfdir} \
		   ${D}${sysconfdir}/init.d \
		   ${D}${sysconfdir}/default \
		   ${D}${sysconfdir}/mediatomb \
		   ${D}${localstatedir}/lib/mediatomb
	
	cp ${WORKDIR}/default ${D}${sysconfdir}/default/mediatomb

	cat ${WORKDIR}/init | \
	    sed -e 's,/etc,${sysconfdir},g' \
		-e 's,/usr/sbin,${sbindir},g' \
		-e 's,/var,${localstatedir},g' \
		-e 's,/usr/bin,${bindir},g' \
		-e 's,/usr,${prefix},g' > ${D}${sysconfdir}/init.d/mediatomb
	chmod 755 ${D}${sysconfdir}/init.d/mediatomb

	cat ${WORKDIR}/config.xml | \
	    sed -e 's,/etc,${sysconfdir},g' \
		-e 's,/usr/sbin,${sbindir},g' \
		-e 's,/var,${localstatedir},g' \
		-e 's,/usr/bin,${bindir},g' \
		-e 's,/usr,${prefix},g' > ${D}${sysconfdir}/mediatomb/config.xml
}