From a9d1ad8be4dc792ad976aac14a3d12044d5d6c84 Mon Sep 17 00:00:00 2001 From: Wu Xiaotian Date: Fri, 3 May 2019 17:19:03 +0800 Subject: use meson to build --- abstract/meson.build | 24 ++++++++++++++++++++++++ desktop/meson.build | 27 +++++++++++++++++++++++++++ meson.build | 19 +++++++++++++++++++ nature/meson.build | 30 ++++++++++++++++++++++++++++++ po/meson.build | 1 + 5 files changed, 101 insertions(+) create mode 100644 abstract/meson.build create mode 100644 desktop/meson.build create mode 100644 meson.build create mode 100644 nature/meson.build create mode 100644 po/meson.build diff --git a/abstract/meson.build b/abstract/meson.build new file mode 100644 index 0000000..e326d4f --- /dev/null +++ b/abstract/meson.build @@ -0,0 +1,24 @@ +# replace @datadir@ and translate +metadata = 'mate-abstract.xml' +i18n.merge_file(metadata, + input: configure_file( + input: metadata + '.in.in', + output: metadata + '.in', + configuration : conf + ), + output: metadata, + po_dir: '../po', + data_dirs: '..', + install: true, + install_dir: metadatadir + ) + +backgrounds = [ + 'Arc-Colors-Transparent-Wallpaper.png', + 'Flow.png', + 'Gulp.png', + 'Silk.png', + 'Spring.png', + 'Waves.png', + ] +install_data(backgrounds, install_dir: join_paths(backgrounddir, 'abstract')) diff --git a/desktop/meson.build b/desktop/meson.build new file mode 100644 index 0000000..7b9d2fe --- /dev/null +++ b/desktop/meson.build @@ -0,0 +1,27 @@ +# replace @datadir@ and translate +metadata = 'mate-desktop.xml' +i18n.merge_file(metadata, + input: configure_file( + input: metadata + '.in.in', + output: metadata + '.in', + configuration : conf + ), + output: metadata, + po_dir: '../po', + data_dirs: '..', + install: true, + install_dir: metadatadir + ) + +backgrounds = [ + 'Float-into-MATE.png', + 'GreenTraditional.jpg', + 'MATE-Stripes-Dark.png', + 'MATE-Stripes-Light.png', + 'Stripes.png', + 'Ubuntu-Mate-Cold-no-logo.png', + 'Ubuntu-Mate-Dark-no-logo.png', + 'Ubuntu-Mate-Radioactive-no-logo.png', + 'Ubuntu-Mate-Warm-no-logo.png', +] +install_data(backgrounds, install_dir: join_paths(backgrounddir, 'desktop')) diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..943984b --- /dev/null +++ b/meson.build @@ -0,0 +1,19 @@ +project('mate-backgrounds', + version : '1.22.0', + meson_version: '>= 0.41.0' + ) + +i18n = import('i18n') + +prefix = get_option('prefix') +datadir = join_paths(prefix, get_option('datadir')) +backgrounddir = join_paths(datadir, 'backgrounds', 'mate') +metadatadir = join_paths(datadir, 'mate-background-properties') + +conf = configuration_data() +conf.set('datadir', datadir) + +subdir('abstract') +subdir('desktop') +subdir('nature') +subdir('po') diff --git a/nature/meson.build b/nature/meson.build new file mode 100644 index 0000000..47799b4 --- /dev/null +++ b/nature/meson.build @@ -0,0 +1,30 @@ +# replace @datadir@ and translate +metadata = 'mate-nature.xml' +i18n.merge_file(metadata, + input: configure_file( + input: metadata + '.in.in', + output: metadata + '.in', + configuration : conf + ), + output: metadata, + po_dir: '../po', + data_dirs: '..', + install: true, + install_dir: metadatadir + ) + +backgrounds = [ + 'Aqua.jpg', + 'Blinds.jpg', + 'Dune.jpg', + 'FreshFlower.jpg', + 'Garden.jpg', + 'GreenMeadow.jpg', + 'LadyBird.jpg', + 'RainDrops.jpg', + 'Storm.jpg', + 'TwoWings.jpg', + 'Wood.jpg', + 'YellowFlower.jpg', +] +install_data(backgrounds, install_dir: join_paths(backgrounddir, 'nature')) diff --git a/po/meson.build b/po/meson.build new file mode 100644 index 0000000..6309e21 --- /dev/null +++ b/po/meson.build @@ -0,0 +1 @@ +i18n.gettext(meson.project_name(), preset: 'glib', data_dirs: '..') -- cgit v1.2.1