1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
|
#! /usr/bin/env python
# encoding: utf-8
from waflib import Build, Utils
import os
bld.new_task_gen (
features = "subst",
source= "net.launchpad.Diodon.gschema.xml.in.in",
target= "net.launchpad.Diodon.gschema.xml.in",
GETTEXT_PACKAGE = bld.env['GETTEXT_PACKAGE'],
ACTIVE_PLUGINS = bld.env['ACTIVE_PLUGINS'])
bld.new_task_gen (
features = 'intltool_in',
podir = '.', # no translations should get added to gschema file
source = 'net.launchpad.Diodon.gschema.xml.in',
install_path = '', # do not install it
flags = ["-x", "-q", "-u", "-c"])
task = bld.new_task_gen (
features = 'glib2')
task.add_settings_schemas ('net.launchpad.Diodon.gschema.xml')
bld.new_task_gen (
features = 'intltool_in',
podir = '../po',
source = 'diodon.desktop.in',
flags = ["-d", "-q", "-u", "-c"],
install_path = "${DATADIR}/applications")
bld.new_task_gen (source='diodon.pc.in')
bld.install_files('${SYSCONFDIR}/xdg/autostart', 'diodon.desktop')
bld.install_files('${DATADIR}/diodon', 'preferences.ui')
bld.install_files('${MANDIR}/man1', 'diodon.1.gz')
bld.install_files('${DATADIR}/apport/package-hooks', 'apport/source_diodon.py')
bld.install_files('${SYSCONFDIR}/apport/crashdb.conf.d/', 'apport/diodon-crashdb.conf')
# install all icons files into the according directory
icons_path = bld.path.find_dir('../data/icons')
icons = icons_path.ant_glob(incl='**/*')
for icon in icons:
# difference between basedir and given dir
relfile = icon.path_from(icons_path)
pos = relfile.rfind(os.sep)
subpath = ''
if pos > -1:
subpath = relfile[:pos]
# add difference of path to install dir
install_dir = '${DATADIR}/icons/' + subpath
bld.install_files(install_dir, icon)
|