summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorIñigo Martínez <inigomartinez@gmail.com>2017-06-09 22:38:19 +0200
committerBastien Nocera <hadess@hadess.net>2017-06-23 18:00:40 +0200
commit95256079d3457056fbcdf48e5d618a6e57af0439 (patch)
tree82339e1cce1701f965b65eb49a236f666fe8ec1a /data
parenta1da1b32da5f4c1aa307a170cff80154f210c172 (diff)
downloadtotem-95256079d3457056fbcdf48e5d618a6e57af0439.tar.gz
build: Port to meson build system
With additional testing and patches from Bastien Nocera <hadess@hadess.net> https://bugzilla.gnome.org/show_bug.cgi?id=783205
Diffstat (limited to 'data')
-rw-r--r--data/appdata/meson.build10
-rw-r--r--data/icons/meson.build20
-rw-r--r--data/meson.build163
-rw-r--r--data/org.gnome.Totem.desktop.meson18
-rw-r--r--data/totem.thumbnailer.meson4
5 files changed, 215 insertions, 0 deletions
diff --git a/data/appdata/meson.build b/data/appdata/meson.build
new file mode 100644
index 000000000..e4d6fde0e
--- /dev/null
+++ b/data/appdata/meson.build
@@ -0,0 +1,10 @@
+info_name = 'org.gnome.Totem.metainfo.xml'
+
+custom_target(
+ info_name,
+ input: 'org.gnome.Totem.appdata.xml.in',
+ output: info_name,
+ command: intltool_xml_cmd,
+ install: true,
+ install_dir: join_paths(totem_datadir, 'metainfo')
+)
diff --git a/data/icons/meson.build b/data/icons/meson.build
new file mode 100644
index 000000000..2d8794aa1
--- /dev/null
+++ b/data/icons/meson.build
@@ -0,0 +1,20 @@
+icon_sizes = [
+ '16x16',
+ '22x22',
+ '24x24',
+ '32x32',
+ '48x48',
+ '256x256'
+]
+
+foreach icon_size: icon_sizes
+ install_data(
+ join_paths(icon_size, 'org.gnome.Totem.png'),
+ install_dir: join_paths(totem_datadir, 'icons', 'hicolor', icon_size, 'apps')
+ )
+endforeach
+
+install_data(
+ 'symbolic/org.gnome.Totem-symbolic.svg',
+ install_dir: join_paths(totem_datadir, 'icons', 'hicolor', 'symbolic', 'apps')
+)
diff --git a/data/meson.build b/data/meson.build
new file mode 100644
index 000000000..85bbd32a0
--- /dev/null
+++ b/data/meson.build
@@ -0,0 +1,163 @@
+subdir('appdata')
+subdir('icons')
+
+desktop_sh = find_program('desktop.sh')
+thumbnailer_sh = find_program('thumbnailer.sh')
+mime_type_include_sh = find_program('mime-type-include.sh')
+mime_type_imports_sh = find_program('mime-type-imports.sh')
+uri_scheme_include_sh = find_program('uri-scheme-include.sh')
+
+mime_type_list = files('mime-type-list.txt')
+uri_schemes_list = files('uri-schemes-list.txt')
+
+pod2man = find_program('pod2man', required: false)
+
+if pod2man.found()
+ thumbnailer_name = 'totem-video-thumbnailer'
+ pod2man_opts = [
+ '-c', '""',
+ '-s', '1',
+ '-q', 'none',
+ '-n', thumbnailer_name,
+ '-r', 'GNOME'
+ ]
+
+ custom_target(
+ thumbnailer_name + '.1',
+ input: thumbnailer_name + '.pod',
+ output: thumbnailer_name + '.1',
+ command: [pod2man, pod2man_opts, '@INPUT@', '@OUTPUT@'],
+ install: true,
+ install_dir: join_paths(totem_mandir, 'man1')
+ )
+
+ install_data(
+ 'totem.1',
+ install_dir: join_paths(totem_mandir, 'man1')
+ )
+else
+ message('Man page generation disabled')
+endif
+
+ui_files = files(
+ 'controls.ui',
+ 'playlist.ui',
+ 'preferences.ui',
+ 'properties.ui',
+ 'shortcuts.ui',
+ 'totem.ui',
+ 'uri.ui'
+)
+
+install_data(
+ ui_files,
+ install_dir: totem_pkgdatadir
+)
+
+r = run_command(desktop_sh, mime_type_list, uri_schemes_list)
+
+desktop_conf = configuration_data()
+desktop_conf.set('VERSION', totem_version)
+desktop_conf.set('MIME_TYPE', r.stdout().strip())
+
+desktop = 'org.gnome.Totem.desktop'
+
+desktop_in = configure_file(
+ input: desktop + '.meson',
+ output: desktop + '.in',
+ configuration: desktop_conf
+)
+
+custom_target(
+ desktop,
+ input: desktop_in,
+ output: desktop,
+ command: intltool_desktop_cmd,
+ install: true,
+ install_dir: join_paths(totem_datadir, 'applications')
+)
+
+service_conf = configuration_data()
+service_conf.set('bindir', totem_bindir)
+
+service = 'org.gnome.Totem.service'
+
+configure_file(
+ input: service + '.in',
+ output: service,
+ install: true,
+ install_dir: join_paths(totem_datadir, 'dbus-1', 'services'),
+ configuration: service_conf
+)
+
+r = run_command(thumbnailer_sh, mime_type_list)
+
+thumbnailer_conf = configuration_data()
+thumbnailer_conf.set('BINDIR', totem_bindir)
+thumbnailer_conf.set('MIME_TYPE', r.stdout().strip())
+
+thumbnailer = 'totem.thumbnailer'
+
+configure_file(
+ input: thumbnailer + '.meson',
+ output: thumbnailer,
+ install: true,
+ install_dir: join_paths(totem_datadir, 'thumbnailers'),
+ configuration: thumbnailer_conf
+)
+
+gen_sources = []
+
+totem_mime_header = 'totem-mime-types.h'
+
+gen_sources += custom_target(
+ totem_mime_header,
+ output: totem_mime_header,
+ capture: true,
+ command: [mime_type_include_sh, mime_type_list]
+)
+
+nautilus_mime_header = 'nautilus-video-mime-types.h'
+
+custom_target(
+ nautilus_mime_header,
+ output: nautilus_mime_header,
+ capture: true,
+ command: [mime_type_include_sh, '--nautilus', mime_type_list]
+)
+
+totem_mime_js = 'totemMimeTypes.js'
+
+custom_target(
+ totem_mime_js,
+ output: totem_mime_js,
+ capture: true,
+ command: [mime_type_imports_sh, mime_type_list]
+)
+
+totem_uri_header = 'totem-uri-schemes.h'
+
+gen_sources += custom_target(
+ totem_uri_header,
+ output: totem_uri_header,
+ capture: true,
+ command: [uri_scheme_include_sh, uri_schemes_list],
+)
+
+schema_conf = configuration_data()
+schema_conf.set('GETTEXT_PACKAGE', meson.project_name())
+
+schema = 'org.gnome.totem.gschema.xml'
+
+configure_file(
+ input: schema + '.in',
+ output: schema,
+ install: true,
+ install_dir: totem_schemadir,
+ configuration: schema_conf
+)
+
+install_data(
+ 'totem.convert',
+ install_dir: join_paths(totem_datadir, 'GConf', 'gsettings')
+)
diff --git a/data/org.gnome.Totem.desktop.meson b/data/org.gnome.Totem.desktop.meson
new file mode 100644
index 000000000..04a159926
--- /dev/null
+++ b/data/org.gnome.Totem.desktop.meson
@@ -0,0 +1,18 @@
+[Desktop Entry]
+_Name=Videos
+_Comment=Play movies
+_Keywords=Video;Movie;Film;Clip;Series;Player;DVD;TV;Disc;
+Exec=totem %U
+Icon=org.gnome.Totem
+DBusActivatable=true
+Terminal=false
+Type=Application
+Categories=GTK;GNOME;AudioVideo;Player;Video;
+X-GNOME-DocPath=totem/totem.xml
+X-GNOME-Bugzilla-Bugzilla=GNOME
+X-GNOME-Bugzilla-Product=totem
+X-GNOME-Bugzilla-Component=general
+X-GNOME-Bugzilla-Version=@VERSION@
+X-GNOME-Bugzilla-OtherBinaries=totem-video-thumbnailer;
+StartupNotify=true
+@MIME_TYPE@
diff --git a/data/totem.thumbnailer.meson b/data/totem.thumbnailer.meson
new file mode 100644
index 000000000..650a92696
--- /dev/null
+++ b/data/totem.thumbnailer.meson
@@ -0,0 +1,4 @@
+[Thumbnailer Entry]
+TryExec=@BINDIR@/totem-video-thumbnailer
+Exec=@BINDIR@/totem-video-thumbnailer -s %s %u %o
+@MIME_TYPE@