from samba_utils import *
dist_dirs = None
+dist_blacklist = None
def add_symlink(tar, fname, abspath, basedir):
'''handle symlinks to directories that may move during packaging'''
dist_name = '%s.tar.gz' % (dist_base)
tar = tarfile.open(dist_name, 'w:gz')
+ blacklist = dist_blacklist.split()
for dir in dist_dirs.split():
if dir.find(':') != -1:
abspath = os.path.join(srcdir, f)
if dir != '.':
f = f[len(dir)+1:]
+
+ # Remove files in the blacklist
+ if f in dist_blacklist:
+ continue
+ blacklisted = False
+ # Remove directories in the blacklist
+ for d in blacklist:
+ if f.startswith(d):
+ blacklisted = True
+ if blacklisted:
+ continue
if destdir != '.':
f = destdir + '/' + f
fname = dist_base + '/' + f
if not dist_dirs:
dist_dirs = dirs
+@conf
+def DIST_BLACKLIST(blacklist):
+ '''set the directories to package, relative to top srcdir'''
+ global dist_blacklist
+ if not dist_blacklist:
+ dist_blacklist = blacklist
+
Scripting.dist = dist
samba_dist.DIST_DIRS('.')
+#This is a list of files that we don't want in the package, for
+#whatever reason. Directories should be listed with a trailing / to
+#avoid over-exclusion.
+samba_dist.DIST_BLACKLIST('README Manifest Read-Manifest-Now Roadmap source3/ ' +
+ 'packaging/ docs-xml/ examples/ swat/ WHATSNEW.txt MAINTAINERS')
# install in /usr/local/samba by default
Options.default_prefix = '/usr/local/samba'