diff --git a/doc/index.docbook b/doc/index.docbook
index 9205077..b882aee 100644
--- a/doc/index.docbook
+++ b/doc/index.docbook
@@ -1947,6 +1947,21 @@ on also use that proxy server, if possible, by setting the
+
+ignore-kde-structure
+Module setting overrides global
+This option is used to store the source and the build files directly
+in the name of the module. Fir example:
+source/extragear/network/telepathy/ktp-text-ui
+becomes
+source/ktp-text-ui.
+This option is disabled by default, if you want to enable this you need to set this
+option to true
+
+This option was introduced with &kdesrc-build; 1.16.
+
+
+
ignore-modules
Can't be overridden
diff --git a/modules/ksb/BuildContext.pm b/modules/ksb/BuildContext.pm
index 90ef80b..9607227 100644
--- a/modules/ksb/BuildContext.pm
+++ b/modules/ksb/BuildContext.pm
@@ -61,6 +61,7 @@ my %defaultGlobalOptions = (
"delete-my-patches" => 0, # Should only be set from cmdline
"delete-my-settings" => 0, # Should only be set from cmdline
"dest-dir" => '${MODULE}', # single quotes used on purpose!
+ "ignore-kde-structure" => 0, #respect or not kde dir structure like extragear/network
"disable-agent-check" => 0, # If true we don't check on ssh-agent
"do-not-compile" => "",
"filter-out-phases" => '',
diff --git a/modules/ksb/Module.pm b/modules/ksb/Module.pm
index 3dcd65e..930396b 100644
--- a/modules/ksb/Module.pm
+++ b/modules/ksb/Module.pm
@@ -1016,8 +1016,15 @@ sub destDir
{
my $self = assert_isa(shift, 'ksb::Module');
my $destDir = $self->getOption('dest-dir');
- my $basePath = shift // $self->getOption('#xml-full-path', 'module');
- $basePath ||= $self->name(); # Default if not provided in XML
+
+ my $basePath = "";
+
+ if ($self->getOption('ignore-kde-structure')) {
+ $basePath = $self->name();
+ } else {
+ $basePath = shift // $self->getOption('#xml-full-path');
+ $basePath ||= $self->name(); # Default if not provided in XML
+ }
$destDir =~ s/(\${MODULE})|(\$MODULE\b)/$basePath/g;