X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=debian%2FSConscript;h=899b3f618647666d3ee6b2e406f6733a9fb6b08b;hb=18d987b03ac188adf6e1a82ebce2666738f0ff65;hp=548c560ae622350691ecd7119159635a18d7a7f1;hpb=6b43243d9b1a3b9720efdacc6f02364877ebe2aa;p=senf.git diff --git a/debian/SConscript b/debian/SConscript index 548c560..899b3f6 100644 --- a/debian/SConscript +++ b/debian/SConscript @@ -1,7 +1,7 @@ # -*- python -*- Import('env') -import SENFSCons, os +import SENFSCons, os, os.path, pwd, time, string ########################################################################### @@ -21,7 +21,7 @@ def updateRevision(target, source, env): rev = rev[:-1] if 'm' in rev: rev = rev[:-1] - url = None + url = '' for line in os.popen("svn info"): elts=line.split(':',1) if elts[0] == 'URL': @@ -31,7 +31,7 @@ def updateRevision(target, source, env): version = url.rsplit('/',1)[-1].split('_',1)[0] if version[0] not in string.digits: version = None - if version is None: + if not version: version = '1:0r%s' % rev changelog = file('debian/changelog.template').read() % { 'version': version, @@ -65,6 +65,8 @@ if os.environ.get('debian_build'): rev = os.popen("dpkg-parsechangelog | awk '/^Version:/{print $2}'").read().strip() else: rev = 'r' + os.popen("svnversion").read().strip().lower() + if rev == 'rexported': + rev = os.popen("gitsvnversion").read().strip().lower() logname = os.environ.get('LOGNAME') if not logname: @@ -82,8 +84,9 @@ env.Append( ENV = { }) env.Replace( - LOCAL_CONFIG_FILES = [ '/Doxyfile.local', '/SConfig', '/local_config.hh' ], - DPKG_IGNORED_FILES = [ '$LOCAL_CONFIG_FILES', '.svn', '/_templates' ], + LOCAL_CONFIG_FILES = [ '/Doxyfile.local', '/SConscript.local', '/senf/local_config.hh' ], + DPKG_IGNORED_FILES = [ '$LOCAL_CONFIG_FILES', '.svn', '.git', '.gitignore', '/_templates', + '/TODO', '.project', '.cproject', '.dir.el', '/.project.el' ], DPKG_IGNORED_FILES_OPTS = dpkgIgnoredFilesOpts, BUILDPACKAGE_COMMAND = "dpkg-buildpackage -us -uc -rfakeroot $DPKG_IGNORED_FILES_OPTS", ) @@ -92,7 +95,7 @@ env.PhonyTarget('deb', [], [ checkLocalConf, updateRevision, "$BUILDPACKAGE_COMMAND", - "fakeroot ./debian/rules debclean" + "fakeroot ./debian/rules clean" ]) env.PhonyTarget('debsrc', [], [ @@ -103,7 +106,9 @@ env.PhonyTarget('debsrc', [], [ env.PhonyTarget('debbin', [], [ checkLocalConf, updateRevision, - "$BUILDPACKAGE_COMMAND -b", + "$BUILDPACKAGE_COMMAND -b -nc", "fakeroot ./debian/rules debclean" ]) +if not os.environ.get('debian_build'): + env.Clean(env.Alias('all'), '#/debian/changelog')