Added DESTDIR option which is used as an additional prefix for the purposes of
installing files. It is useful for binary distributions (eg RPM etc). Thanks to Dominic Hargreaves!
This commit is contained in:
parent
dee8851b26
commit
31442b6bac
8 changed files with 22 additions and 14 deletions
|
@ -48,6 +48,7 @@ opts.Add(PathOption('PYTHON','Python executable', sys.executable))
|
|||
opts.Add(ListOption('INPUT_PLUGINS','Input drivers to include','all',['postgis','shape','raster']))
|
||||
opts.Add(ListOption('BINDINGS','Language bindings to build','all',['python']))
|
||||
opts.Add('DEBUG', 'Compile a debug version of mapnik', '')
|
||||
opts.Add('DESTDIR', 'The root directory to install into. Useful mainly for binary package building', '/')
|
||||
opts.Add('BIDI', 'BIDI support', '')
|
||||
|
||||
env = Environment(ENV=os.environ, options=opts)
|
||||
|
|
|
@ -24,6 +24,7 @@ import glob
|
|||
Import('env')
|
||||
|
||||
prefix = env['PYTHON_PREFIX'] + '/'+ 'lib' + '/python' + env['PYTHON_VERSION'] + '/site-packages/'
|
||||
install_prefix = env['DESTDIR'] + '/' + prefix
|
||||
|
||||
libraries = ['mapnik', 'boost_python%s' % env['BOOST_APPEND']]
|
||||
headers = [env['PYTHON_PREFIX'] + '/include/python' + env['PYTHON_VERSION']] + env['CPPPATH']
|
||||
|
@ -39,8 +40,8 @@ fontscollectionpath = mapniklibpath + '/fonts'
|
|||
file('mapnik/paths.py','w').write(paths % (env['PREFIX'] + '/'+env['LIBDIR_SCHEMA']+'/mapnik',))
|
||||
|
||||
pymapnik = glob.glob('mapnik/*.py')
|
||||
env.Alias(target='install', source=env.Install(prefix+'/mapnik', pymapnik))
|
||||
env.Alias(target='install', source=env.Install(install_prefix+'/mapnik', pymapnik))
|
||||
pymapnik2 = glob.glob('mapnik/ogcserver/*.py')
|
||||
env.Alias(target='install', source=env.Install(prefix+'/mapnik/ogcserver', pymapnik2))
|
||||
pymapniklib = env.Install(prefix+'/mapnik',_mapnik)
|
||||
env.Alias(target='install', source=env.Install(install_prefix+'/mapnik/ogcserver', pymapnik2))
|
||||
pymapniklib = env.Install(install_prefix+'/mapnik',_mapnik)
|
||||
env.Alias(target="install",source=pymapniklib)
|
||||
|
|
|
@ -22,6 +22,7 @@ import glob
|
|||
Import('env')
|
||||
|
||||
prefix = env['PREFIX']
|
||||
install_prefix = env['DESTDIR'] + '/' + prefix
|
||||
|
||||
includes = glob.glob('*/*.ttf')
|
||||
env.Alias(target='install', source=env.Install(prefix+'/' + env['LIBDIR_SCHEMA'] + '/mapnik/fonts', includes))
|
||||
env.Alias(target='install', source=env.Install(install_prefix+'/' + env['LIBDIR_SCHEMA'] + '/mapnik/fonts', includes))
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
Import ('env')
|
||||
|
||||
prefix = env['PREFIX']
|
||||
install_prefix = env['DESTDIR'] + '/' + prefix
|
||||
|
||||
postgis_src = Split(
|
||||
"""
|
||||
|
@ -32,5 +33,5 @@ postgis_src = Split(
|
|||
|
||||
postgis_inputdriver = env.SharedLibrary('postgis', source=postgis_src, SHLIBPREFIX='', LIBS='pq')
|
||||
|
||||
env.Install(prefix + '/' + env['LIBDIR_SCHEMA'] + '/mapnik/input', postgis_inputdriver)
|
||||
env.Alias('install', prefix + '/' + env['LIBDIR_SCHEMA'] + '/mapnik/input')
|
||||
env.Install(install_prefix + '/' + env['LIBDIR_SCHEMA'] + '/mapnik/input', postgis_inputdriver)
|
||||
env.Alias('install', install_prefix + '/' + env['LIBDIR_SCHEMA'] + '/mapnik/input')
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
Import ('env')
|
||||
|
||||
prefix = env['PREFIX']
|
||||
install_prefix = env['DESTDIR'] + '/' + prefix
|
||||
|
||||
raster_src = Split(
|
||||
"""
|
||||
|
@ -33,5 +34,5 @@ raster_src = Split(
|
|||
|
||||
raster_inputdriver = env.SharedLibrary('raster', source=raster_src, SHLIBPREFIX='', LIBS=[])
|
||||
|
||||
env.Install(prefix + '/' + env['LIBDIR_SCHEMA'] + '/mapnik/input', raster_inputdriver)
|
||||
env.Alias('install', prefix + '/' + env['LIBDIR_SCHEMA'] + '/mapnik/input')
|
||||
env.Install(install_prefix + '/' + env['LIBDIR_SCHEMA'] + '/mapnik/input', raster_inputdriver)
|
||||
env.Alias('install', install_prefix + '/' + env['LIBDIR_SCHEMA'] + '/mapnik/input')
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
Import ('env')
|
||||
|
||||
prefix = env['PREFIX']
|
||||
install_prefix = env['DESTDIR'] + '/' + prefix
|
||||
|
||||
shape_src = Split(
|
||||
"""
|
||||
|
@ -38,5 +39,5 @@ shape_src = Split(
|
|||
|
||||
shape_inputdriver = env.SharedLibrary('shape', source=shape_src, SHLIBPREFIX='', LIBS=[])
|
||||
|
||||
env.Install(prefix + '/' + env['LIBDIR_SCHEMA'] + '/mapnik/input', shape_inputdriver)
|
||||
env.Alias('install', prefix + '/' + env['LIBDIR_SCHEMA'] + '/mapnik/input')
|
||||
env.Install(install_prefix + '/' + env['LIBDIR_SCHEMA'] + '/mapnik/input', shape_inputdriver)
|
||||
env.Alias('install', install_prefix + '/' + env['LIBDIR_SCHEMA'] + '/mapnik/input')
|
||||
|
|
|
@ -25,6 +25,7 @@ import glob
|
|||
Import('env')
|
||||
|
||||
prefix = env['PREFIX']
|
||||
install_prefix = env['DESTDIR'] + '/' + prefix
|
||||
|
||||
libraries = ['agg'] + env['LIBS']
|
||||
|
||||
|
@ -73,6 +74,6 @@ source += Split(
|
|||
|
||||
mapnik = env.SharedLibrary('mapnik', source, LIBS=libraries, LINKFLAGS=linkflags)
|
||||
|
||||
env.Alias(target='install', source=env.Install(prefix + '/' + env['LIBDIR_SCHEMA'], mapnik))
|
||||
env.Alias(target='install', source=env.Install(install_prefix + '/' + env['LIBDIR_SCHEMA'], mapnik))
|
||||
includes = glob.glob('../include/mapnik/*.hpp')
|
||||
env.Alias(target='install', source=env.Install(prefix+'/include/mapnik', includes))
|
||||
env.Alias(target='install', source=env.Install(install_prefix+'/include/mapnik', includes))
|
||||
|
|
|
@ -24,6 +24,7 @@ import glob
|
|||
Import ('env')
|
||||
|
||||
prefix = env['PREFIX']
|
||||
install_prefix = env['DESTDIR'] + '/' + prefix
|
||||
|
||||
source = Split(
|
||||
"""
|
||||
|
@ -37,5 +38,5 @@ headers = ['#plugins/input/shape'] + env['CPPPATH']
|
|||
|
||||
shapeindex = env.Program('shapeindex', source, CPPPATH=headers, LIBS='boost_program_options%s' % env['BOOST_APPEND'])
|
||||
|
||||
env.Install(prefix + '/bin', shapeindex)
|
||||
env.Alias('install', prefix + '/bin')
|
||||
env.Install(install_prefix + '/bin', shapeindex)
|
||||
env.Alias('install', install_prefix + '/bin')
|
||||
|
|
Loading…
Reference in a new issue