diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2017-05-12 14:56:53 +0200 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2017-05-12 14:56:53 +0200 |
commit | edc89367fee8abcc8104e27b1d7171e0872393b3 (patch) | |
tree | 181cc7ead48da85087cf98054970921dfbfb59ac | |
parent | 2bdc01293d9bcb81c464e4ecfdd264e49f4ec1b9 (diff) | |
download | fbida-edc89367fee8abcc8104e27b1d7171e0872393b3.tar.gz |
meson: install app defaults file
-rw-r--r-- | meson.build | 3 | ||||
-rwxr-xr-x | scripts/x11resdir.sh | 15 |
2 files changed, 18 insertions, 0 deletions
diff --git a/meson.build b/meson.build index dab8151..a6aa1de 100644 --- a/meson.build +++ b/meson.build @@ -8,6 +8,8 @@ add_global_arguments('-Wno-pointer-sign', language : 'c') config = configuration_data() version = run_command('cat', 'VERSION') config.set_quoted('VERSION', version.stdout().strip()) +x11resrun = run_command('scripts/x11resdir.sh', get_option('prefix')) +x11resdir = x11resrun.stdout().strip() # pkg-config deps freetype_dep = dependency('freetype2') @@ -155,3 +157,4 @@ executable('ida', include_directories : trans_inc, install : true) install_man('man/ida.1') +install_data('Ida.ad', install_dir : x11resdir) diff --git a/scripts/x11resdir.sh b/scripts/x11resdir.sh new file mode 100755 index 0000000..1a00ab8 --- /dev/null +++ b/scripts/x11resdir.sh @@ -0,0 +1,15 @@ +#!/bin/sh +prefix="$1" + +for dir in \ + $prefix/*/X11/app-defaults \ + $prefix/X11R*/*/X11/app-defaults \ + /usr/*/X11/app-defaults \ + /etc/app-defaults \ +; do + if test -d "$dir"; then + echo "$dir" + exit 0 + fi +done +exit 1 |