Skip to content

Commit

Permalink
Add initial Meson support
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
AsavarTzeth committed Aug 25, 2017
1 parent 5358814 commit f8fb842
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 0 deletions.
17 changes: 17 additions & 0 deletions data/meson.build
Original file line number Diff line number Diff line change
@@ -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')
)
21 changes: 21 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
@@ -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')
0 src/gydl.py → src/gydl
100644 → 100755
File renamed without changes.

0 comments on commit f8fb842

Please sign in to comment.