#!/usr/bin/python
-import os, stat, time, subprocess, sys
+import os, shutil, stat, time, subprocess, sys
from collections import OrderedDict
# some utility functions
# install file
with open('debian/'+binaryName+'.install', 'w') as f:
for line in config.get('binaryInstall', []):
+ if line.startswith('/'): # a file from within the package, not from the source tree
+ line = 'debian/'+binaryName+line
print >>f, line
# rules file: build system specific
with open('debian/rules', 'w') as f:
r.write(f)
mode = os.stat('debian/rules').st_mode
os.chmod('debian/rules', mode | stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH)
- # return list of files affected
+ # return list of files that will be created
return files
def buildDebianPackage(config):
###################################################################
# if we are called directly as script
if __name__ == "__main__":
- import imp, shutil
+ import imp
# get config
config = imp.load_source('config', 'auto-debuild.conf').__dict__
os.remove('auto-debuild.confc')