X-Git-Url: https://git.ralfj.de/auto-debuild.git/blobdiff_plain/58ba5650908a996bb32682a724831cdc07509263..e82d2ebfa5c26c1e60a334c9f048cf9661f019f5:/auto_debuild.py diff --git a/auto_debuild.py b/auto_debuild.py index 86f5805..c827a12 100755 --- a/auto_debuild.py +++ b/auto_debuild.py @@ -30,7 +30,9 @@ class RulesFile: def write(self, f): print >>f, "#!/usr/bin/make -f" print >>f, "" - print >>f, "%:" + print >>f, ".PHONY: build" # there may be a directory called "build" + print >>f, "" + print >>f, "build %:" # need to mention "build" here again explicitly print >>f, '\t'+self.env2str()+' dh $@ '+safeCall(*self.dh) for rule in self.rules: print >>f, "" @@ -40,7 +42,7 @@ class RulesFile: # build-system specific part of rules file def cmakeRules(config): - buildDir = config.get('buildDir', 'build.dir') # "build" is not a good idea, as that's also the name of a target... + buildDir = config.get('buildDir', 'build') srcDir = os.getcwd() r = RulesFile() r.dh += ["--buildsystem=cmake", "--builddirectory="+buildDir] # dh parameters @@ -91,8 +93,8 @@ def writeDependency(f, name, list): def createDebianFiles(config): sourceName = config['sourceName'] binaryName = config.get('binaryName', sourceName+'-local') - name = config.get('name', os.getlogin()) - email = config.get('email', os.getlogin()+'@'+os.uname()[1]) # user@hostname + name = config.get('name', os.getenv('USER')) # os.getlogin() fails in minimal chroots + email = config.get('email', os.getenv('USER')+'@'+os.uname()[1]) # user@hostname debDir = os.path.expanduser(config['debDir']) buildSystem = config['buildSystem'] version = config['version']