summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErnestas Kulik <ernestask@gnome.org>2018-03-19 13:08:49 +0200
committerErnestas Kulik <ernestask@gnome.org>2018-03-19 13:22:04 +0200
commitb85eb898912737997a3b9c5c9b2bd7ed496a5a9e (patch)
treede178a3b5b4ef915eb61b81e6adef8e3f28f9527
parenta345517222c273005656fef78aa4ba94201be113 (diff)
downloadnautilus-b85eb898912737997a3b9c5c9b2bd7ed496a5a9e.tar.gz
meson.build: Always try to append revision to version
The code falls back to a controlled string, so tarballs builds don’t ruin everything.
-rw-r--r--meson.build47
1 files changed, 18 insertions, 29 deletions
diff --git a/meson.build b/meson.build
index 8f39e36d7..bad49b1f9 100644
--- a/meson.build
+++ b/meson.build
@@ -93,23 +93,19 @@ xml = dependency('libxml-2.0', version: '>= 2.7.8')
conf = configuration_data()
if get_option('profile') == 'development'
- version = '@0@-@VCS_TAG@'.format(meson.project_version())
- conf.set_quoted('NAME_SUFFIX', ' (Development Snapshot)')
profile = 'Devel'
+ name_suffix = ' (Development Snapshot)'
+elif get_option('profile') == 'stable-flatpak'
+ profile = 'StableFlatpak'
+ name_suffix = ' (3.28 Flatpak)'
else
- if get_option('profile') == 'stable-flatpak'
- version = '@0@-flatpak'.format(meson.project_version())
- profile = 'Stable'
- else
- version = meson.project_version()
- profile = ''
- endif
- conf.set_quoted('NAME_SUFFIX', '')
+ profile = ''
+ name_suffix = ''
endif
application_id = 'org.gnome.Nautilus@0@'.format(profile)
-conf.set_quoted('VERSION', version)
+conf.set_quoted('VERSION', '@0@-@VCS_TAG@'.format(meson.project_version()))
conf.set_quoted('PACKAGE_VERSION', meson.project_version())
conf.set_quoted('GETTEXT_PACKAGE', 'nautilus')
conf.set_quoted('LOCALEDIR', join_paths(prefix, get_option('localedir')))
@@ -117,6 +113,7 @@ conf.set_quoted('NAUTILUS_DATADIR', join_paths(datadir, 'nautilus'))
conf.set_quoted('NAUTILUS_EXTENSIONDIR', join_paths(prefix, extensiondir))
conf.set_quoted('APPLICATION_ID', application_id)
conf.set_quoted('PROFILE', profile)
+conf.set_quoted('NAME_SUFFIX', name_suffix)
if get_option('packagekit')
conf.set10('ENABLE_PACKAGEKIT', true)
@@ -128,25 +125,17 @@ if get_option('selinux')
conf.set10('HAVE_SELINUX', true)
endif
-if get_option('profile') == 'development'
- config_h = declare_dependency(
- sources: vcs_tag(
- command: ['git', 'rev-parse', '--short', 'HEAD'],
- fallback: 'devel',
- input: configure_file(
- output: 'config.h.in',
- configuration: conf
- ),
- output: 'config.h'
- )
- )
-else
- configure_file(
- output: 'config.h',
- configuration: conf
+config_h = declare_dependency(
+ sources: vcs_tag(
+ command: ['git', 'rev-parse', '--short', 'HEAD'],
+ fallback: get_option('profile') != 'default'? 'devel' : 'stable',
+ input: configure_file(
+ output: 'config.h.in',
+ configuration: conf
+ ),
+ output: 'config.h'
)
- config_h = dependency('', required: false)
-endif
+)
#
nautilus_include_dirs = include_directories(