$NetBSD$ --- SConstruct.orig 2010-01-23 17:12:22.000000000 +0000 +++ SConstruct @@ -39,7 +39,7 @@ opts.AddOptions( BoolOption('OLDFONTS', 'Old school font sizes', 0), BoolOption('DEBUG', 'Set to build with debugging information and no optimizations', 0), BoolOption('STL_DEBUG', 'Set to build with Standard Template Library Debugging', 0), - PathOption('DESTDIR', 'Set the intermediate install "prefix"', '/'), + PathOption('DESTDIR', 'Set the intermediate install "prefix"', '/', PathOption.PathAccept), EnumOption('DIST_TARGET', 'Build target for cross compiling packagers', 'auto', allowed_values=('auto', 'i386', 'i686', 'x86_64', 'powerpc', 'tiger', 'panther', 'leopard', 'none' ), ignorecase=2), BoolOption('DMALLOC', 'Compile and link using the dmalloc library', 0), BoolOption('EXTRA_WARN', 'Compile with -Wextra, -ansi, and -pedantic. Might break compilation. For pedants', 0), @@ -49,6 +49,8 @@ opts.AddOptions( BoolOption('LIBLO', 'Compile with support for liblo library', 1), BoolOption('NLS', 'Set to turn on i18n support', 1), PathOption('PREFIX', 'Set the install "prefix"', '/usr/local'), + PathOption('SYSCONFDIR', '(where to find config files)', None, PathOption.PathAccept), + PathOption('SYSCONFEXDIR', '(where to install example config files)', None, PathOption.PathAccept), BoolOption('SURFACES', 'Build support for control surfaces', 1), BoolOption('WIIMOTE', 'Build the wiimote control surface', 0), ('DIST_LIBDIR', 'Explicitly set library dir. If not set, Fedora-style defaults are used (typically lib or lib64)', ''), @@ -1240,12 +1242,21 @@ subst_dict['%INSTALL_PREFIX%'] = install subst_dict['%FINAL_PREFIX%'] = final_prefix; subst_dict['%PREFIX%'] = final_prefix; -if env['PREFIX'] == '/usr': - final_config_prefix = '/etc' +if env['SYSCONFDIR']: + final_config_prefix = env['SYSCONFDIR'] else: - final_config_prefix = env['PREFIX'] + '/etc' + final_config_prefix = env['PREFIX'] + '/etc/ardour2' -config_prefix = '$DESTDIR' + final_config_prefix +if env['SYSCONFEXDIR']: + if env['DESTDIR']: + config_prefix = '$DESTDIR' + env['SYSCONFEXDIR'] + else: + config_prefix = env['SYSCONFEXDIR'] +else: + if env['DESTDIR']: + config_prefix = '$DESTDIR' + env['PREFIX'] + '/share/examples/ardour' + else: + config_prefix = env['PREFIX'] + '/share/examples/ardour' # # everybody needs this @@ -1349,7 +1360,7 @@ remove_ardour = env.Command ('frobnicato Delete ('$PREFIX/share/ardour2')]) env.Alias('revision', the_revision) -env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour_system.rc')) +env.Alias('install', env.Install(config_prefix, 'ardour_system.rc')) env.Alias('uninstall', remove_ardour) Default (sysrcbuild)