fork of capisuite ( with some fixes to make it build on modern Linux
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

57 lines
1.8 KiB

# -*- python -*-
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
dfile = os.path.join(env.subst('$python_moduledir'),
# these are meant to be used by users
user_scripts = [env.FileSubst('capisuitefax', ''),]
env.AddPostAction(user_scripts, Chmod('$TARGETS', 0755))
# these are meant to be used by the admin
sbin_scripts = [
env.FileSubst('capisuite-checkconfig', ''),
env.AddPostAction(sbin_scripts, Chmod('$TARGETS', 0755))
# config files
configs = [
env.FileSubst('fax.conf', 'fax.confin'),
env.FileSubst('answering_machine.conf', 'answering_machine.confin')
# file subst. is required because of sfftobmp_major_version
env.FileSubst('', 'cs_helpers.pyin')
pymodules = []
for mod in Split('cs_helpers'):
pymodules.append(env.Command(mod + '.pyc', mod+'.py', py_compile))
#--- install ---
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(''))
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)