updated on Thu Jan 19 16:10:29 UTC 2012
[aur-mirror.git] / tranches / sconstruct_tranches.diff
blobb9199b6bbbed3544e9223c2b825c4a8cd3ec8a89
1 --- SConstruct_old 2009-11-18 14:30:07.000000000 +0100
2 +++ SConstruct 2009-11-18 13:31:12.000000000 +0100
3 @@ -1,6 +1,15 @@
4 # ENVIRONMENT
5 env = Environment(CPPFLAGS=' -I/usr/include/libxml2 -I/usr/include/lash-1.0',LIBS=['asound','pthread','xml2','jack'])
7 +# CONFIGURATION OPTIONS
8 +opts = Variables('tranches.conf')
9 +opts.Add(PathVariable('PREFIX', 'Directory to install under', '/usr/local', PathVariable.PathIsDir))
10 +opts.Add(PathVariable("DESTDIR", 'Root directory to install into', '/usr/local', PathVariable.PathIsDir))
11 +opts.Update(env)
12 +opts.Save('tranches.conf', env) # Save, so user doesn't have to specify PREFIX every time
14 +Help(opts.GenerateHelpText(env))
16 # SOURCE FILES
17 base = Glob('src/base/*.cpp')
18 audio = Glob('src/audio/*.cpp')
19 @@ -82,9 +91,9 @@
20 env['LINKCOMSTR'] = "Linking $TARGET"
22 # INSTALL
23 -bin = env.Install('/usr/local/bin', 'tranches')
24 -desktop = env.Install('/usr/local/share/applications', 'data/tranches.desktop')
25 -icon = env.Install('/usr/local/share/pixmaps', 'data/tranches.png')
26 +bin = env.Install('$DESTDIR/$PREFIX/bin', 'tranches')
27 +desktop = env.Install('$DESTDIR/$PREFIX/share/applications', 'data/tranches.desktop')
28 +icon = env.Install('$DESTDIR/$PREFIX/share/pixmaps', 'data/tranches.png')
29 env.Alias('install', [bin,desktop,icon])
31 # HELP
32 @@ -98,6 +107,8 @@
34 Si tout se passe bien, entrez 'scons install' en tant qu'administrateur
35 pour installer Tranches dans /usr/local/
36 + utilisez DESTDIR ou PREFIX pour installer dans d'autres endroits,
37 + p. ex. 'scons PREFIX="/usr" install'
39 Si vous voulez nettoyer la compilation, entrez 'scons -c'
40 Si vous voulez desinstaller Tranches, entrez 'scons -c install'
41 @@ -113,7 +124,9 @@
43 If everything went good, type 'scons install' as root
44 to install Tranches in /usr/local/
46 + use DESTDIR or PREFIX to install in other places,
47 + e.g. 'scons PREFIX="/usr" install'
49 If you want to clean the build, type 'scons -c'
50 If you want to uninstall Tranches, type 'scons -c install'
51 """)