Add support for removing some files from the package
[auto-debuild.git] / auto_debuild.py
index 37d8443bf2f30f1d6ede3dd9633eae1d5da59eba..90d616dbe7bffc29ab26f8ab85c5d70fc05b0196 100755 (executable)
@@ -163,7 +163,11 @@ def createDebianFiles(config):
                r.dh += ['--parallel']
                r.rules['builddeb'] = [safeCall(['dh_builddeb', "--destdir="+debDir])] # passing this gobally to dh results in weird problems (like stuff being installed there, and not in the package...)
                r.rules['auto_test'] = []
                r.dh += ['--parallel']
                r.rules['builddeb'] = [safeCall(['dh_builddeb', "--destdir="+debDir])] # passing this gobally to dh results in weird problems (like stuff being installed there, and not in the package...)
                r.rules['auto_test'] = []
+               # installation rule
                r.rules['auto_install'] = [safeCall(['dh_auto_install', '--destdir=debian/'+binaryName])] # install everything into the binary package
                r.rules['auto_install'] = [safeCall(['dh_auto_install', '--destdir=debian/'+binaryName])] # install everything into the binary package
+               if 'binarySkipFiles' in config:
+                       r.rules['auto_install'].append(safeCall(['cd', 'debian/'+binaryName]) + " && " +
+                               safeCall(['rm'] + config['binarySkipFiles']))
                # for debug packages
                if dbgPackage:
                        r.rules['strip'] = [safeCall(['dh_strip', '--dbg-package='+binaryName+"-dbg"])] # put debug files in appropriate package
                # for debug packages
                if dbgPackage:
                        r.rules['strip'] = [safeCall(['dh_strip', '--dbg-package='+binaryName+"-dbg"])] # put debug files in appropriate package