# bring in the other samba modules
from samba_optimisation import *
from samba_utils import *
+from samba_version import *
from samba_autoconf import *
from samba_patterns import *
from samba_pidl import *
abi_file=None,
abi_match=None,
hide_symbols=False,
+ is_bundled=False,
+ manpages=None,
enabled=True):
'''define a Samba library'''
deps = TO_LIST(deps)
deps.append(obj_target)
- if target_type == 'PYTHON' or realname:
- bundled_name = libname
+ if target_type == 'PYTHON' or realname or not is_bundled:
+ # Sanitize the library name
+ bundled_name = libname.lower().replace('_', '-')
+ while bundled_name.startswith("lib"):
+ bundled_name = bundled_name[3:]
else:
bundled_name = BUNDLED_NAME(bld, libname, bundled_extension)
vnum = vnum,
install_path = None,
samba_inst_path = install_path,
- name = libname,
+ name = libname,
samba_realname = realname,
samba_install = install,
abi_file = abi_file,
if pc_files is not None:
bld.PKG_CONFIG_FILES(pc_files, vnum=vnum)
+ if manpages is not None and 'XSLTPROC' in bld.env:
+ bld.env.MAN_XSL = 'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl'
+ for m in manpages.split():
+ source = m + '.xml'
+ bld.SAMBA_GENERATOR(m,
+ source=source,
+ target=m,
+ rule='${XSLTPROC} -o ${TGT} ${MAN_XSL} ${SRC}'
+ )
+ bld.INSTALL_FILES('${MANDIR}/man%s' % m[-1], m, flat=True)
+
+
Build.BuildContext.SAMBA_LIBRARY = SAMBA_LIBRARY
if subsystem_name is not None:
bld.TARGET_ALIAS(subsystem_name, binname)
+ if manpages is not None and 'XSLTPROC' in bld.env:
+ bld.env.MAN_XSL = 'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl'
+ for m in manpages.split():
+ source = m + '.xml'
+ bld.SAMBA_GENERATOR(m,
+ source=source,
+ target=m,
+ rule='${XSLTPROC} -o ${TGT} ${MAN_XSL} ${SRC}'
+ )
+ bld.INSTALL_FILES('${MANDIR}/man%s' % m[-1], m, flat=True)
+
Build.BuildContext.SAMBA_BINARY = SAMBA_BINARY