summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorJens Georg <mail@jensge.org>2018-11-28 19:39:06 +0000
committerJens Georg <mail@jensge.org>2018-11-28 19:39:06 +0000
commit86bfaaddc3288f301565093278c58c5d595049ec (patch)
tree07371b988003c9bddfd784630443b91a58c7a3a3 /data
parent502ed4cb90c77df1407b6619e6a2cc307586403f (diff)
downloadrygel-86bfaaddc3288f301565093278c58c5d595049ec.tar.gz
Port build system to meson
Diffstat (limited to 'data')
-rw-r--r--data/meson.build63
-rw-r--r--data/presets/meson.build12
-rw-r--r--data/xml/meson.build132
-rwxr-xr-xdata/xml/process-xml.py8
4 files changed, 215 insertions, 0 deletions
diff --git a/data/meson.build b/data/meson.build
new file mode 100644
index 00000000..f686c1ce
--- /dev/null
+++ b/data/meson.build
@@ -0,0 +1,63 @@
+install_data('rygel.conf', install_dir : rygel_sysconfdir)
+install_data(join_paths('icons', '128x128', 'rygel.png'), install_dir : join_paths(rygel_icondir, '128x128', 'apps'))
+install_data(join_paths('icons', '120x120', 'rygel.png'), install_dir : rygel_bigicondir)
+install_data(join_paths('icons', '120x120', 'rygel.jpg'), install_dir : rygel_bigicondir)
+install_data(join_paths('icons', '48x48', 'rygel.png'), install_dir : rygel_smallicondir)
+install_data(join_paths('icons', '48x48', 'rygel.jpg'), install_dir : rygel_smallicondir)
+install_data(join_paths('icons', '32x32', 'rygel.png'), install_dir : join_paths(rygel_icondir, '32x32', 'apps'))
+install_data(join_paths('icons', '48x48', 'rygel.png'), install_dir : join_paths(rygel_icondir, '48x48', 'apps'))
+install_data(join_paths('icons', 'scalable', 'rygel.svg'), install_dir : join_paths(rygel_icondir, 'scalable', 'apps'))
+install_data(join_paths('icons', 'scalable', 'rygel-full.svg'), install_dir : join_paths(rygel_icondir, 'scalable', 'apps'))
+
+install_data('rygel-preferences.ui', install_dir : join_paths(rygel_datadir, 'rygel'))
+
+data_conf = configuration_data()
+data_conf.set('bindir', join_paths(get_option('prefix'), get_option('bindir')))
+data_conf.set('VERSION', meson.project_version())
+
+configure_file(input: 'org.gnome.Rygel1.service.in',
+ output: 'org.gnome.Rygel1.service',
+ configuration: data_conf,
+ install_dir : join_paths(rygel_datadir, 'dbus-1', 'services'))
+
+systemd = dependency('systemd', required : false)
+systemd_user_unit_dir = join_paths(get_option('prefix'), 'lib/systemd/user/')
+if systemd.found()
+ systemd_user_unit_dir = systemd.get_pkgconfig_variable('systemduserunitdir')
+endif
+
+if not (get_option('systemd-user-units-dir') == 'off')
+ if not (get_option('systemd-user-units-dir') == 'auto')
+ systemd_user_unit_dir = get_option('systemd-user-units-dir')
+ endif
+
+ configure_file(input: 'rygel.service.in',
+ output: 'rygel.service',
+ configuration: data_conf,
+ install_dir : systemd_user_unit_dir)
+endif
+
+rygel_desktop_preferences_in = configure_file(input: 'rygel-preferences.desktop.in.in',
+ output : 'rygel-preferences.desktop.in',
+ configuration : data_conf)
+
+rygel_desktop_in = configure_file(input: 'rygel.desktop.in.in',
+ output : 'rygel.desktop.in',
+ configuration : data_conf)
+
+i18n.merge_file(input: rygel_desktop_in,
+ output: 'rygel.desktop',
+ po_dir : join_paths('..','po'),
+ type: 'desktop',
+ install : true,
+ install_dir: join_paths(get_option('datadir'), 'applications'))
+
+i18n.merge_file(input: rygel_desktop_preferences_in,
+ output: 'rygel-preferences.desktop',
+ po_dir : join_paths('..','po'),
+ type: 'desktop',
+ install : true,
+ install_dir: join_paths(get_option('datadir'), 'applications'))
+
+subdir('presets')
+subdir('xml')
diff --git a/data/presets/meson.build b/data/presets/meson.build
new file mode 100644
index 00000000..d2088d9d
--- /dev/null
+++ b/data/presets/meson.build
@@ -0,0 +1,12 @@
+install_data(
+ ['avenc_aac.prs',
+ 'avenc_mp2.prs',
+ 'avenc_mpeg2video.prs',
+ 'avenc_wmav1.prs',
+ 'avenc_wmv1.prs',
+ 'GstFaac.prs',
+ 'GstLameMP3Enc.prs',
+ 'GstMP4Mux.prs',
+ 'GstTwoLame.prs',
+ 'GstX264Enc.prs'],
+ install_dir : rygel_presetdir)
diff --git a/data/xml/meson.build b/data/xml/meson.build
new file mode 100644
index 00000000..85c0d740
--- /dev/null
+++ b/data/xml/meson.build
@@ -0,0 +1,132 @@
+xml_processor = find_program('process-xml.py')
+xml_dir = join_paths(rygel_datadir, 'rygel', 'xml')
+
+server_xml = configure_file(input: 'MediaServer3.xml.in.in',
+ output: 'MediaServer3.xml.in',
+ configuration: plugin_config)
+
+renderer_xml = configure_file(input: 'MediaRenderer2.xml.in.in',
+ output: 'MediaRenderer2.xml.in',
+ configuration: plugin_config)
+
+ruih_xml = configure_file(input: 'RuihServer2.xml.in.in',
+ output: 'RuihServer2.xml.in',
+ configuration: plugin_config)
+
+
+# Fixme: How to install this...
+#xml_files = xml_processor.process(['EnergyManagement.xml.in',
+# 'ContentDirectory.xml.in',
+# 'ContentDirectory-NoTrack.xml.in',
+# 'ConnectionManager.xml.in',
+# 'RemoteUIServerService.xml.in',
+# 'AVTransport2.xml.in',
+# 'RenderingControl2.xml.in',
+# 'UIList.xml.in',
+# 'BasicManagement2.xml.in',
+# 'X_MS_MediaReceiverRegistrar1.xml.in'],
+# install: true,
+# install_dir : xml_dir)
+
+custom_target('EnergyManagement.xml',
+ input: 'EnergyManagement.xml.in',
+ output: 'EnergyManagement.xml',
+ capture: true,
+ command : [xml_processor, '@INPUT@'],
+ install: true,
+ install_dir : xml_dir)
+
+custom_target('MediaServer3.xml',
+ input: server_xml,
+ output: 'MediaServer3.xml',
+ capture: true,
+ command : [xml_processor, '@INPUT@'],
+ install: true,
+ install_dir : xml_dir)
+
+custom_target('MediaRenderer2.xml',
+ input: renderer_xml,
+ output: 'MediaRenderer2.xml',
+ capture: true,
+ command : [xml_processor, '@INPUT@'],
+ install: true,
+ install_dir : xml_dir)
+
+custom_target('ContentDirectory.xml',
+ input: 'ContentDirectory.xml.in',
+ output: 'ContentDirectory.xml',
+ capture: true,
+ command : [xml_processor, '@INPUT@'],
+ install: true,
+ install_dir : xml_dir)
+
+custom_target('RuihServer2.xml',
+ input: ruih_xml,
+ output: 'RuihServer2.xml',
+ capture: true,
+ command : [xml_processor, '@INPUT@'],
+ install: true,
+ install_dir : xml_dir)
+
+custom_target('ContentDirectory-NoTrack.xml',
+ input: 'ContentDirectory-NoTrack.xml.in',
+ output: 'ContentDirectory-NoTrack.xml',
+ capture: true,
+ command : [xml_processor, '@INPUT@'],
+ install: true,
+ install_dir : xml_dir)
+
+custom_target('ConnectionManager.xml',
+ input: 'ConnectionManager.xml.in',
+ output: 'ConnectionManager.xml',
+ capture: true,
+ command : [xml_processor, '@INPUT@'],
+ install: true,
+ install_dir : xml_dir)
+
+custom_target('RemoteUIServerService.xml',
+ input: 'RemoteUIServerService.xml.in',
+ output: 'RemoteUIServerService.xml',
+ capture: true,
+ command : [xml_processor, '@INPUT@'],
+ install: true,
+ install_dir : xml_dir)
+custom_target('AVTransport2.xml',
+ input: 'AVTransport2.xml.in',
+ output: 'AVTransport2.xml',
+ capture: true,
+ command : [xml_processor, '@INPUT@'],
+ install: true,
+ install_dir : xml_dir)
+
+custom_target('RenderingControl2.xml',
+ input: 'RenderingControl2.xml.in',
+ output: 'RenderingControl2.xml',
+ capture: true,
+ command : [xml_processor, '@INPUT@'],
+ install: true,
+ install_dir : xml_dir)
+
+custom_target('UIList.xml',
+ input: 'UIList.xml.in',
+ output: 'UIList.xml',
+ capture: true,
+ command : [xml_processor, '@INPUT@'],
+ install: true,
+ install_dir : xml_dir)
+
+custom_target('BasicManagement2.xml',
+ input: 'BasicManagement2.xml.in',
+ output: 'BasicManagement2.xml',
+ capture: true,
+ command : [xml_processor, '@INPUT@'],
+ install: true,
+ install_dir : xml_dir)
+
+custom_target('X_MS_MediaReceiverRegistrar1.xml',
+ input: 'X_MS_MediaReceiverRegistrar1.xml.in',
+ output: 'X_MS_MediaReceiverRegistrar1.xml',
+ capture: true,
+ command : [xml_processor, '@INPUT@'],
+ install: true,
+ install_dir : xml_dir)
diff --git a/data/xml/process-xml.py b/data/xml/process-xml.py
new file mode 100755
index 00000000..8d53e048
--- /dev/null
+++ b/data/xml/process-xml.py
@@ -0,0 +1,8 @@
+#!/usr/bin/env python3
+
+import sys
+import re
+
+with open(sys.argv[1], 'r') as f:
+ for data in f:
+ print(data.strip(), end='')