From f8fb8423b2138a5bca5e0a5617a5e49e4e5b3516 Mon Sep 17 00:00:00 2001 From: AsavarTzeth Date: Fri, 25 Aug 2017 19:19:01 +0200 Subject: [PATCH] Add initial Meson support Building and packaging Gydl is greatly simplified by using Meson. Additionally makes it so much simpler to handle translations if those were to be added. The py extension was removed from the gydl script because I could not find an easy way to install it with a different name. Installing it with the extension would not be proper. --- data/meson.build | 17 +++++++++++++++++ meson.build | 21 +++++++++++++++++++++ src/{gydl.py => gydl} | 0 3 files changed, 38 insertions(+) create mode 100644 data/meson.build create mode 100644 meson.build rename src/{gydl.py => gydl} (100%) mode change 100644 => 100755 diff --git a/data/meson.build b/data/meson.build new file mode 100644 index 0000000..7b0c42b --- /dev/null +++ b/data/meson.build @@ -0,0 +1,17 @@ +menudir = join_paths(get_option('datadir'), 'applications') +install_data( + 'com.github.JannikHv.Gydl.desktop', + install_dir: menudir +) + +metadir = join_paths(get_option('datadir'), 'metainfo') +install_data( + 'com.github.JannikHv.Gydl.appdata.xml', + install_dir: metadir +) + +icondir = join_paths(get_option('datadir'), 'icons/hicolor') +install_data( + 'gydl.svg', + install_dir: join_paths(icondir, 'scalable/apps') +) diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..52c919b --- /dev/null +++ b/meson.build @@ -0,0 +1,21 @@ +project('Gydl', + version: '0.1.0' +) + +py3_mod = import('python3') +i18n_mod = import('i18n') + +message('Checking dependencies') +py3 = py3_mod.find_python() +gtk3 = dependency('gtk+-3.0') +pygo = dependency('pygobject-3.0') +ydl = find_program('youtube-dl') + +message('Getting python install path') +py3_dir = py3_mod.sysconfig_path('purelib') + +message('Installing Gydl') +install_data('src/gydl', install_dir: 'bin') + +message('Installing data files') +subdir('data') diff --git a/src/gydl.py b/src/gydl old mode 100644 new mode 100755 similarity index 100% rename from src/gydl.py rename to src/gydl