1*4882a593SmuzhiyunSUMMARY = "A UPnP AV media server and renderer"
2*4882a593SmuzhiyunDESCRIPTION = "Rygel is a home media solution (UPnP AV MediaServer) that \
3*4882a593Smuzhiyunallow you to easily share audio, video and pictures to other devices. \
4*4882a593SmuzhiyunAdditionally, media player software may use Rygel to become a MediaRenderer \
5*4882a593Smuzhiyunthat may be controlled remotely by a UPnP or DLNA Controller."
6*4882a593SmuzhiyunHOMEPAGE = "http://live.gnome.org/Rygel"
7*4882a593Smuzhiyun
8*4882a593SmuzhiyunLICENSE = "LGPL-2.1-only"
9*4882a593SmuzhiyunLIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
10*4882a593Smuzhiyun
11*4882a593SmuzhiyunDEPENDS = "libxml2 glib-2.0 gssdp gupnp gupnp-av gupnp-dlna gstreamer1.0 gstreamer1.0-plugins-base libgee libsoup-2.4 libmediaart-2.0 libunistring sqlite3 intltool-native"
12*4882a593SmuzhiyunRDEPENDS:${PN} = "gstreamer1.0-plugins-base-playback shared-mime-info"
13*4882a593SmuzhiyunRRECOMMENDS:${PN} = "rygel-plugin-media-export"
14*4882a593Smuzhiyun
15*4882a593Smuzhiyuninherit gnomebase vala gobject-introspection gettext systemd features_check
16*4882a593Smuzhiyun
17*4882a593Smuzhiyun# gobject-introspection is mandatory for libmediaart-2.0 and cannot be configured
18*4882a593SmuzhiyunREQUIRED_DISTRO_FEATURES = "gobject-introspection-data"
19*4882a593Smuzhiyun
20*4882a593SmuzhiyunSRC_URI[archive.md5sum] = "7f95401903a3f855b464d5152b9d4c07"
21*4882a593SmuzhiyunSRC_URI[archive.sha256sum] = "08c21a577f7bdad26446a75ffa32778b26842c3b1188165f0b19818559747d00"
22*4882a593Smuzhiyun
23*4882a593SmuzhiyunEXTRA_OECONF = "--disable-tracker-plugin --with-media-engine=gstreamer"
24*4882a593Smuzhiyun
25*4882a593SmuzhiyunPACKAGECONFIG ?= "external mpris ruih media-export gst-launch"
26*4882a593Smuzhiyun
27*4882a593SmuzhiyunPACKAGECONFIG:append = "${@bb.utils.contains("DISTRO_FEATURES", "x11", " gtk+3", "", d)}"
28*4882a593Smuzhiyun
29*4882a593SmuzhiyunPACKAGECONFIG[external] = "--enable-external-plugin,--disable-external-plugin"
30*4882a593SmuzhiyunPACKAGECONFIG[mpris] = "--enable-mpris-plugin,--disable-mpris-plugin"
31*4882a593SmuzhiyunPACKAGECONFIG[ruih] = "--enable-ruih-plugin,--disable-ruih-plugin"
32*4882a593SmuzhiyunPACKAGECONFIG[media-export] = "--enable-media-export-plugin,--disable-media-export-plugin"
33*4882a593SmuzhiyunPACKAGECONFIG[gst-launch] = "--enable-gst-launch-plugin,--disable-gst-launch-plugin"
34*4882a593SmuzhiyunPACKAGECONFIG[gtk+3] = ",--without-ui,gtk+3"
35*4882a593SmuzhiyunPACKAGECONFIG[lms] = "--enable-lms-plugin,--disable-lms-plugin"
36*4882a593Smuzhiyun
37*4882a593SmuzhiyunLIBV = "2.6"
38*4882a593Smuzhiyun
39*4882a593Smuzhiyundo_install:append() {
40*4882a593Smuzhiyun       # Remove .la files for loadable modules
41*4882a593Smuzhiyun       rm -f ${D}/${libdir}/rygel-${LIBV}/engines/*.la
42*4882a593Smuzhiyun       rm -f ${D}/${libdir}/rygel-${LIBV}/plugins/*.la
43*4882a593Smuzhiyun       if [ -e ${D}${nonarch_libdir}/systemd/user/rygel.service ]; then
44*4882a593Smuzhiyun               mkdir -p ${D}${systemd_unitdir}/system
45*4882a593Smuzhiyun               mv ${D}${nonarch_libdir}/systemd/user/rygel.service ${D}${systemd_unitdir}/system
46*4882a593Smuzhiyun               rmdir --ignore-fail-on-non-empty ${D}${nonarch_libdir}/systemd/user \
47*4882a593Smuzhiyun               ${D}${nonarch_libdir}/systemd \
48*4882a593Smuzhiyun               ${D}${nonarch_libdir}
49*4882a593Smuzhiyun       fi
50*4882a593Smuzhiyun}
51*4882a593Smuzhiyun
52*4882a593SmuzhiyunFILES:${PN} += "${libdir}/rygel-${LIBV}/engines ${datadir}/dbus-1 ${datadir}/icons"
53*4882a593SmuzhiyunFILES:${PN}-dbg += "${libdir}/rygel-${LIBV}/engines/.debug ${libdir}/rygel-${LIBV}/plugins/.debug"
54*4882a593Smuzhiyun
55*4882a593SmuzhiyunPACKAGES += "${PN}-meta"
56*4882a593SmuzhiyunALLOW_EMPTY:${PN}-meta = "1"
57*4882a593Smuzhiyun
58*4882a593SmuzhiyunPACKAGES_DYNAMIC = "${PN}-plugin-*"
59*4882a593Smuzhiyun
60*4882a593SmuzhiyunSYSTEMD_SERVICE:${PN} = "rygel.service"
61*4882a593Smuzhiyun
62*4882a593Smuzhiyunpython populate_packages:prepend () {
63*4882a593Smuzhiyun    rygel_libdir = d.expand('${libdir}/rygel-${LIBV}')
64*4882a593Smuzhiyun    postinst = d.getVar('plugin_postinst')
65*4882a593Smuzhiyun    pkgs = []
66*4882a593Smuzhiyun
67*4882a593Smuzhiyun    pkgs += do_split_packages(d, oe.path.join(rygel_libdir, "plugins"), r'librygel-(.*)\.so$', d.expand('${PN}-plugin-%s'), 'Rygel plugin for %s', postinst=postinst, extra_depends=d.expand('${PN}'))
68*4882a593Smuzhiyun    pkgs += do_split_packages(d, oe.path.join(rygel_libdir, "plugins"), r'(.*)\.plugin$', d.expand('${PN}-plugin-%s'), 'Rygel plugin for %s', postinst=postinst, extra_depends=d.expand('${PN}'))
69*4882a593Smuzhiyun
70*4882a593Smuzhiyun    metapkg = d.getVar('PN') + '-meta'
71*4882a593Smuzhiyun    d.setVar('RDEPENDS:' + metapkg, ' '.join(pkgs))
72*4882a593Smuzhiyun}
73