Commit 4e2c73b9 authored by ruxandraS's avatar ruxandraS Committed by Robert Roth
parent 37eeb4b2
SUBDIRS = data help po src
EXTRA_DIST = \
**/meson.build \
meson_options.txt \
meson_post_install.py \
$(NULL)
MAINTAINERCLEANFILES = \
$(GITIGNORE_MAINTAINERCLEANFILES_TOPLEVEL) \
$(GITIGNORE_MAINTAINERCLEANFILES_MAKEFILE_IN)
......
# Desktop file
i18n.merge_file(
input: 'five-or-more.desktop.in',
output: 'five-or-more.desktop',
type: 'desktop',
po_dir: po_dir,
install: true,
install_dir: join_paths(pkgdata_dir, 'applications')
)
# Themes
foreach file: ['balls.svg', 'dots.png', 'gumball.png', 'shapes.svg']
install_data (file,
install_dir: join_paths(pkgdata_dir, 'themes')
)
endforeach
# UI files
foreach file: ['five-or-more.ui', 'five-or-more-preferences.ui', 'menu.ui']
install_data (file,
install_dir: join_paths(pkgdata_dir)
)
endforeach
# Icons
install_subdir('icons',
install_dir: join_paths(pkgdata_dir),
exclude_files: [ 'Makefile', 'Makefile.in', 'Makefile.am', 'five-or-more-src.svg' ],
)
# Appdata
i18n.merge_file(
input: 'five-or-more.appdata.xml.in',
output: 'five-or-more.appdata.xml',
type: 'xml',
po_dir: po_dir,
install: true,
install_dir: join_paths(pkgdata_dir, 'meta-info')
)
# Gschema
install_data('org.gnome.five-or-more.gschema.xml',
install_dir: join_paths(pkgdata_dir, 'appdata')
)
# Manpage
install_man(
'five-or-more.6'
)
ca
cs
de
el
en_GB
es
eu
fr
gl
hu
it
ja
oc
pl
pt_BR
ru
sl
sr
sr@latin
sv
tr
zh_CN
five_or_more_help_pages = [
'bug-filing.page',
'change-board-size.page',
'change-theme.page',
'develop.page',
'documentation.page',
'fast-moves.page',
'index.page',
'legal.xml',
'license.page',
'play.page',
'rules.page',
'scores.page',
'shortcuts.page',
'strategy.page',
'translate.page'
]
five_or_more_help_media = [
'figures/color-balls.png',
'figures/color-dots.png',
'figures/color-shapes.png',
'figures/diagonal.png',
'figures/glines-demo.ogv',
'figures/glines-gameover.png',
'figures/horizontal.png',
'figures/large.png',
'figures/logo.png',
'figures/logo32.png',
'figures/medium.png',
'figures/pickcolor.png',
'figures/small.png',
'figures/vertical.png'
]
gnome.yelp(meson.project_name(),
sources: five_or_more_help_pages,
media: five_or_more_help_media
)
project('five-or-more', ['c'],
version: '3.28.0',
meson_version: '>= 0.43.0',
license: 'GPLv2'
)
gnome = import('gnome')
i18n = import('i18n')
locale_dir = join_paths(get_option('prefix'), get_option('localedir'))
po_dir = join_paths(meson.source_root(), 'po')
data_dir = join_paths (get_option ('prefix'), get_option ('datadir'))
pkgdata_dir = join_paths (data_dir, 'five-or-more')
# Dependencies
glib_min_version = '2.32'
librsvg = dependency('librsvg-2.0', version: '>= 2.32.0')
gio = dependency('gio-2.0', version: '>= ' + glib_min_version)
glib = dependency('glib-2.0', version: '>= ' + glib_min_version)
gmodule_export = dependency('gmodule-export-2.0')
gtk = dependency('gtk+-3.0', version: '>= 3.20.0')
# Libraries
cc = meson.get_compiler('c')
libmath = cc.find_library('m')
# Configuration
conf = configuration_data()
conf.set_quoted('GETTEXT_PACKAGE', meson.project_name())
conf.set_quoted('LOCALEDIR', locale_dir)
conf.set_quoted('DATA_DIRECTORY', pkgdata_dir)
conf.set_quoted('VERSION', meson.project_version())
configure_file(output: 'config.h', configuration: conf)
config_h_dir = include_directories('.')
# Extra scripts
meson.add_install_script('meson_post_install.py')
# Subdirs
subdir('data')
subdir('help')
subdir('po')
subdir('src')
#!/usr/bin/env python3
import os
import subprocess
install_prefix = os.environ['MESON_INSTALL_PREFIX']
icondir = os.path.join(install_prefix, 'share', 'icons', 'hicolor')
schemadir = os.path.join(install_prefix, 'share', 'glib-2.0', 'schemas')
if not os.environ.get('DESTDIR'):
print('Update icon cache...')
subprocess.call(['gtk-update-icon-cache', '-f', '-t', icondir])
print('Compiling gsettings schemas...')
subprocess.call(['glib-compile-schemas', schemadir])
i18n.gettext(meson.project_name(),
preset: 'glib'
)
#five-or-more executable
five_or_more_c_sources = [
'five-or-more.c',
'five-or-more.h',
'games-file-list.c',
'games-file-list.h',
'games-gridframe.c',
'games-gridframe.h',
'games-preimage.c',
'games-preimage.h',
'games-score.c',
'games-score.h',
'games-scores-backend.c',
'games-scores-backend.h',
'games-scores-dialog.c',
'games-scores-dialog.h',
'games-scores.c',
'games-scores.h'
]
five_or_more_sources = [
five_or_more_c_sources
]
five_or_more_deps = [
libmath,
librsvg,
glib,
gio,
gtk
]
five_or_more_includes = [
config_h_dir
]
five_or_more_c_flags = [
'-include', 'config.h'
]
executable('five-or-more', five_or_more_sources,
dependencies: five_or_more_deps,
include_directories: five_or_more_includes,
c_args: five_or_more_c_flags,
install: true
)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment