2004-10-31 14:07:07 +00:00
|
|
|
# -*- python -*-
|
|
|
|
|
|
|
|
# build top level files
|
|
|
|
# this is a SConscript, too, to support really build-dirs
|
|
|
|
|
2005-01-09 21:17:33 +00:00
|
|
|
Import('env', 'is_dist')
|
2004-10-31 14:07:07 +00:00
|
|
|
|
|
|
|
cronfile = env.FileSubst('capisuite.cron', 'capisuite.cronin')
|
|
|
|
rcfile = env.FileSubst('rc.capisuite', 'rc.capisuite.in')
|
2005-01-02 22:05:17 +00:00
|
|
|
env.AddPostAction([cronfile, rcfile], Chmod('$TARGETS', 0755))
|
2004-10-31 14:07:07 +00:00
|
|
|
|
2005-01-02 22:05:17 +00:00
|
|
|
env.Alias('install', [
|
|
|
|
env.Install('$docdir', Split('COPYING NEWS README AUTHORS')),
|
|
|
|
])
|
2005-01-07 15:51:52 +00:00
|
|
|
|
2005-01-09 20:02:09 +00:00
|
|
|
# Since these are not installed, we need to list explicitly
|
|
|
|
# them for distribuition
|
|
|
|
env.DistSourcesOf([cronfile, rcfile])
|
|
|
|
env.ExtraDist('cronjob.conf')
|
2005-01-09 21:17:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
#--- a simple 'Echo' action with nice output ---
|
|
|
|
import SCons, os
|
|
|
|
def echo_func(file, text):
|
|
|
|
open(file, 'a').writelines([text, os.linesep])
|
|
|
|
def echo_str(file, text):
|
|
|
|
return 'Echo("%s", %s)' % (file, repr(text))
|
|
|
|
Echo = SCons.Action.ActionFactory(echo_func, echo_str)
|
|
|
|
|
|
|
|
#--- build Changelog ---
|
|
|
|
|
|
|
|
changelog_header = """
|
|
|
|
# This file is automatically generated from the Subversion log for
|
|
|
|
# the current branch (i.e. the branch which was used for this
|
|
|
|
# release). Only changes starting from 2005-01-01 are listed here.
|
|
|
|
#
|
|
|
|
# ChangeLog.complete lists all changes in all branches if needed
|
|
|
|
# for reference.
|
|
|
|
"""
|
2005-01-20 18:05:45 +00:00
|
|
|
cl = File('#/ChangeLog')
|
2005-01-09 21:17:33 +00:00
|
|
|
env.ExtraDist(cl)
|
2005-01-16 20:56:55 +00:00
|
|
|
if is_dist or 'ChangeLog' in COMMAND_LINE_TARGETS:
|
2005-01-20 18:05:45 +00:00
|
|
|
cl = env.Command(cl, None,
|
|
|
|
[Echo('$TARGET', changelog_header),
|
|
|
|
Echo('$TARGET', ''),
|
|
|
|
# need to set locale to set correct character encoding
|
|
|
|
'LANG=de_DE svn log -v -r "HEAD:{2005-01-01}" >> $TARGET'
|
|
|
|
])[0]
|
2005-01-09 21:17:33 +00:00
|
|
|
env.AlwaysBuild(cl)
|
|
|
|
|
|
|
|
changelog_complete_header = """
|
|
|
|
# This file is automatically generated from the Subversion
|
|
|
|
# repository. It contains all changes in all development branches
|
|
|
|
# and is only meant for reference purposes. If you want to see the
|
|
|
|
# changes which lead to this release, please refer to the ChangeLog
|
|
|
|
"""
|
2005-01-20 18:05:45 +00:00
|
|
|
cl = File('#/ChangeLog.complete')
|
2005-01-09 21:17:33 +00:00
|
|
|
env.ExtraDist(cl)
|
2005-01-20 18:05:45 +00:00
|
|
|
if is_dist or 'ChangeLog' in COMMAND_LINE_TARGETS:
|
|
|
|
cl = env.Command(cl, None,
|
|
|
|
[Echo('$TARGET', changelog_complete_header),
|
|
|
|
Echo('$TARGET', ''),
|
|
|
|
# need to set locale to set correct character encoding
|
|
|
|
'LANG=de_DE svn log -v $SVNREPOSITORY >> $TARGET'
|
|
|
|
])[0]
|
2005-01-09 21:17:33 +00:00
|
|
|
env.AlwaysBuild(cl)
|