2004-10-31 14:07:07 +00:00
|
|
|
# -*- python -*-
|
|
|
|
|
|
|
|
Import('env')
|
|
|
|
|
|
|
|
def py_compile(target, source, env):
|
|
|
|
"""compile python modules for .../python2.x/site-packages/"""
|
|
|
|
# Note: this differs from #/capisuite/SConscript.py_compile in 'dfile'
|
|
|
|
import py_compile, os.path
|
|
|
|
py_compile.compile(source[0].abspath,
|
|
|
|
#cfile=target[0].abspath,
|
|
|
|
dfile = os.path.join(env.subst('$python_moduledir'),
|
|
|
|
env.subst('$SOURCE.file')),
|
|
|
|
)
|
|
|
|
|
2005-01-02 22:05:17 +00:00
|
|
|
# these are meant to be used by users
|
2004-10-31 14:07:07 +00:00
|
|
|
user_scripts = [env.FileSubst('capisuitefax', 'capisuitefax.in'),]
|
2005-01-02 22:05:17 +00:00
|
|
|
env.AddPostAction(user_scripts, Chmod('$TARGETS', 0755))
|
2004-10-31 14:07:07 +00:00
|
|
|
|
|
|
|
# these are meant to be used by the admin
|
2005-01-20 18:26:19 +00:00
|
|
|
sbin_scripts = [
|
|
|
|
env.FileSubst('capisuite-checkconfig', 'capisuite-checkconfig.in'),
|
|
|
|
]
|
|
|
|
env.AddPostAction(sbin_scripts, Chmod('$TARGETS', 0755))
|
2004-10-31 14:07:07 +00:00
|
|
|
|
|
|
|
# config files
|
|
|
|
configs = [
|
|
|
|
env.FileSubst('fax.conf', 'fax.confin'),
|
|
|
|
env.FileSubst('answering_machine.conf', 'answering_machine.confin')
|
|
|
|
]
|
|
|
|
|
2005-01-02 22:05:17 +00:00
|
|
|
# file subst. is required because of sfftobmp_major_version
|
2004-10-31 14:07:07 +00:00
|
|
|
env.FileSubst('cs_helpers.py', 'cs_helpers.pyin')
|
|
|
|
|
|
|
|
pymodules = []
|
|
|
|
for mod in Split('cs_helpers'):
|
|
|
|
pymodules.append(mod+'.py')
|
|
|
|
pymodules.append(env.Command(mod + '.pyc', mod+'.py', py_compile))
|
|
|
|
|
|
|
|
#--- install ---
|
|
|
|
|
2005-01-02 22:05:17 +00:00
|
|
|
env.Alias('install-pylib', env.Install('$python_moduledir', pymodules))
|
|
|
|
|
|
|
|
for i in (
|
|
|
|
env.Install('$pkgbindir', user_scripts),
|
|
|
|
env.Install('$pkgsbindir', sbin_scripts),
|
|
|
|
env.Install('$pkglibdir', Split('idle.py incoming.py'))
|
|
|
|
):
|
|
|
|
env.Alias('install-scripts', i)
|
|
|
|
|
|
|
|
for i in (
|
|
|
|
env.Install('$python_moduledir', pymodules),
|
|
|
|
env.Install('$pkgsysconfdir', configs),
|
|
|
|
env.Install('$pkglibdir', 'README'),
|
|
|
|
):
|
|
|
|
env.Alias('install', i)
|
|
|
|
# this also includes 'install-pylib' and 'install-scripts'
|
|
|
|
# (set in #/SConstruct)
|