~cypheon/elfelli

2cc2a48655ff35d7744ae5fb3618b78d0a70079d — Johann Rudloff 14 years ago 366eb2d
Added possibility to install everything in a 'destdir'.
4 files changed, 8 insertions(+), 5 deletions(-)

M SConstruct
M data/SConscript
M po/SConscript
M src/SConscript
M SConstruct => SConstruct +2 -1
@@ 24,6 24,7 @@ opts = Options('elfelli.conf')
opts.Add(BoolOption('debug', 'Set to build debug version', 1))
opts.Add(BoolOption('profiling', 'Set to enable profiling', 0))
opts.Add(('prefix', 'Directory to install elfelli under', '/usr/local'))
opts.Add(('destdir', 'Everything installed will go in this directory', ''))
opts.Update(env)
opts.Save('elfelli.conf', env)



@@ 57,7 58,7 @@ env.Dictionary().update(paths)
env.AppendUnique(CPPDEFINES=[('DATADIR', DefQuote(env['datadir'])),
                             ('LOCALEDIR', DefQuote(env['localedir']))])

env.Alias("install", paths.values())
env.Alias("install", map(lambda path: env['destdir']+path,paths.values()))

Help("""
scons        Build the program.

M data/SConscript => data/SConscript +1 -1
@@ 9,4 9,4 @@ data_files = ['elfelli-logo.svg',
              'positive-plate.svg',
              'ui.xml']

env.Install(env['datadir'], data_files)
env.Install(env['destdir']+env['datadir'], data_files)

M po/SConscript => po/SConscript +3 -1
@@ 7,5 7,7 @@ Import('env')
locales = map(lambda str: str[:-3], glob('*.po'))
for locale in locales:
    env.MO('locale/%s/LC_MESSAGES/elfelli' % locale, locale)
    env.InstallAs('%s/%s/LC_MESSAGES/elfelli.mo' % (env['localedir'], locale),
    env.InstallAs(env['destdir']+'%s/%s/LC_MESSAGES/elfelli.mo' % (env['localedir'], locale),
                  'locale/%s/LC_MESSAGES/elfelli.mo' % locale)

Default('.')

M src/SConscript => src/SConscript +2 -2
@@ 9,5 9,5 @@ elfelli_sources = ['Application.cpp',
                   'Main.cpp']

elfelli = env.Program('elfelli', elfelli_sources)

env.Install(env['bindir'], elfelli)
Default(elfelli)
env.Install(env['destdir']+env['bindir'], elfelli)