blob: 8bc8767d8f99108605b33ecbfd5128222a2599a6 [file] [log] [blame]
Patrick Williams92b42cb2022-09-03 06:53:57 -05001SUMMARY = "A UPnP AV media server and renderer"
2DESCRIPTION = "Rygel is a home media solution (UPnP AV MediaServer) that \
3allow you to easily share audio, video and pictures to other devices. \
4Additionally, media player software may use Rygel to become a MediaRenderer \
5that may be controlled remotely by a UPnP or DLNA Controller."
6HOMEPAGE = "http://live.gnome.org/Rygel"
7
8LICENSE = "LGPL-2.1-only"
9LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
10
11DEPENDS = "libxml2 glib-2.0 gssdp gupnp gupnp-av gupnp-dlna gstreamer1.0 \
12 gstreamer1.0-plugins-base libgee libsoup-2.4 libmediaart-2.0 \
13 libunistring sqlite3 intltool-native gst-editing-services"
14
15RDEPENDS:${PN} = "gstreamer1.0-plugins-base-playback shared-mime-info"
16RRECOMMENDS:${PN} = "rygel-plugin-media-export"
17
18inherit gnomebase features_check vala gobject-introspection gettext systemd meson
19
20# gobject-introspection is mandatory for libmediaart-2.0 and cannot be configured
21REQUIRED_DISTRO_FEATURES = "gobject-introspection-data"
22
23SRC_URI[archive.sha256sum] = "736d8adbe8615f6cbc8fcfff9845dc985fd10e16629da236b4b52dbedf0a348b"
24
25GNOMEBASEBUILDCLASS = "meson"
26GIR_MESON_ENABLE_FLAG = 'enabled'
27GIR_MESON_DISABLE_FLAG = 'disabled'
28
29EXTRA_OEMESON = "-Dengines=gstreamer -Dplugins=${@strip_comma('${RYGEL_PLUGINS}')}"
30PACKAGECONFIG:append = "${@bb.utils.contains("DISTRO_FEATURES", "x11", " gtk+3", "", d)}"
31
32PACKAGECONFIG ?= "external mpris ruih media-export gst-launch"
33
34PACKAGECONFIG[external] = ""
35PACKAGECONFIG[mpris] = ""
36PACKAGECONFIG[ruih] = ""
37PACKAGECONFIG[media-export] = ""
38PACKAGECONFIG[gst-launch] = ""
39PACKAGECONFIG[lms] = ""
40PACKAGECONFIG[tracker3] = ""
41PACKAGECONFIG[gtk+3] = ",-Dgtk=false,gtk+3"
42
43RYGEL_PLUGINS = ""
44RYGEL_PLUGINS:append ="${@bb.utils.contains('PACKAGECONFIG', 'external', ',external', '', d)}"
45RYGEL_PLUGINS:append ="${@bb.utils.contains('PACKAGECONFIG', 'mpris', ',mpris', '', d)}"
46RYGEL_PLUGINS:append ="${@bb.utils.contains('PACKAGECONFIG', 'ruih', ',ruih', '', d)}"
47RYGEL_PLUGINS:append ="${@bb.utils.contains('PACKAGECONFIG', 'gst-launch', ',gst-launch', '', d)}"
48RYGEL_PLUGINS:append ="${@bb.utils.contains('PACKAGECONFIG', 'lms', ',lms', '', d)}"
49RYGEL_PLUGINS:append ="${@bb.utils.contains('PACKAGECONFIG', 'media-export', ',media-export', '', d)}"
50RYGEL_PLUGINS:append ="${@bb.utils.contains('PACKAGECONFIG', 'tracker3', ',tracker3', '', d)}"
51RYGEL_PLUGINS:append ="${@bb.utils.contains('PACKAGECONFIG', 'playbin', ',playbin', '', d)}"
52
53LIBV = "2.6"
54
55CFLAGS:append:toolchain-clang = " -Wno-error=int-conversion"
56
57def strip_comma(s):
58 return s.strip(',')
59
60do_install:append() {
61 # Remove .la files for loadable modules
62 rm -f ${D}/${libdir}/rygel-${LIBV}/engines/*.la
63 rm -f ${D}/${libdir}/rygel-${LIBV}/plugins/*.la
64 if [ -e ${D}${nonarch_libdir}/systemd/user/rygel.service ]; then
65 mkdir -p ${D}${systemd_unitdir}/system
66 mv ${D}${nonarch_libdir}/systemd/user/rygel.service ${D}${systemd_unitdir}/system
67 rmdir --ignore-fail-on-non-empty ${D}${nonarch_libdir}/systemd/user \
68 ${D}${nonarch_libdir}/systemd \
69 ${D}${nonarch_libdir}
70 fi
71}
72
73FILES:${PN} += "${libdir}/rygel-${LIBV}/engines ${datadir}/dbus-1 ${datadir}/icons"
74FILES:${PN}-dbg += "${libdir}/rygel-${LIBV}/engines/.debug ${libdir}/rygel-${LIBV}/plugins/.debug"
75
76PACKAGES += "${PN}-meta"
77ALLOW_EMPTY:${PN}-meta = "1"
78
79PACKAGES_DYNAMIC = "${PN}-plugin-*"
80
81SYSTEMD_SERVICE:${PN} = "rygel.service"
82
83python populate_packages:prepend () {
84 rygel_libdir = d.expand('${libdir}/rygel-${LIBV}')
85 postinst = d.getVar('plugin_postinst')
86 pkgs = []
87
88 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}'))
89 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}'))
90
91 metapkg = d.getVar('PN') + '-meta'
92 d.setVar('RDEPENDS:' + metapkg, ' '.join(pkgs))
93}