summaryrefslogtreecommitdiffstats
path: root/ubuntu/precise
diff options
context:
space:
mode:
authorSlávek Banko <slavek.banko@axis.cz>2013-04-21 19:42:09 +0200
committerSlávek Banko <slavek.banko@axis.cz>2013-04-21 19:54:57 +0200
commit6e70fa33ca99b1020f68a09481317b854e31de66 (patch)
tree13810e0cd96c7ea9dbbc14e43fefb1500e272728 /ubuntu/precise
parent731c5feadab8d86e307b00e3b408b5d5b80b4422 (diff)
downloadtde-packaging-6e70fa33ca99b1020f68a09481317b854e31de66.tar.gz
tde-packaging-6e70fa33ca99b1020f68a09481317b854e31de66.zip
Cutting off the fourth number, or preliminary version number
in counting versions for dependencies on Debian and Ubuntu
Diffstat (limited to 'ubuntu/precise')
-rw-r--r--ubuntu/precise/applications/abakus/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/adept/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/amarok.cmake/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/amarok/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/bibletime/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/compizconfig-backend-tdeconfig/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/digikam/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/dolphin/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/filelight-l10n/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/filelight/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/gtk-qt-engine/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/gwenview-i18n/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/gwenview/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/k3b/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/k9copy/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/kaffeine/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/katapult/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/kbarcode/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/kbookreader/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/kcpuload/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/kdbusnotification/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/kdiff3/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/kdirstat/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/keep/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/kerry/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/kgtk-qt3/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/kile/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/kiosktool/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/kmplayer/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/kmymoney/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/knemo/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/knetstats/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/knetworkmanager.cmake/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/knetworkmanager8/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/knetworkmanager9/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/koffice/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/konversation/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/kopete-otr/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/kpilot/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/kpowersave-nohal/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/kpowersave.cmake/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/kpowersave/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/krename/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/krusader/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/ksystemlog/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/ktorrent/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/kuickshow/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/kvkbd/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/rosegarden/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/smb4k/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/soundkonverter/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/tde-style-qtcurve/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/tde-systemsettings/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/tdeio-apt/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/tdeio-locate/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/tdeio-umountwrapper/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/tdesudo/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/tdesvn/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/tdmtheme/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/twin-style-crystal/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/wlassistant/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/applications/yakuake/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/dependencies/arts/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/kdegraphics.automake/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/kdevelop.cmake/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/libraries/kipi-plugins/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/libraries/libkdcraw/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/libraries/libkexiv2/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/libraries/libkipi/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/tdeaccessibility/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/tdeaddons/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/tdeadmin/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/tdeartwork/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/tdebase/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/tdebindings/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/tdeedu/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/tdegames/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/tdegraphics/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/tdelibs/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/tdemultimedia/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/tdenetwork/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/tdepim/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/tdesdk/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/tdetoys/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/tdeutils/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/tdevelop/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/precise/tdewebdev/debian/cdbs/versions.pl2
87 files changed, 87 insertions, 87 deletions
diff --git a/ubuntu/precise/applications/abakus/debian/cdbs/versions.pl b/ubuntu/precise/applications/abakus/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/abakus/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/abakus/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/adept/debian/cdbs/versions.pl b/ubuntu/precise/applications/adept/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/adept/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/adept/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/amarok.cmake/debian/cdbs/versions.pl b/ubuntu/precise/applications/amarok.cmake/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/amarok.cmake/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/amarok.cmake/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/amarok/debian/cdbs/versions.pl b/ubuntu/precise/applications/amarok/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/amarok/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/amarok/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/bibletime/debian/cdbs/versions.pl b/ubuntu/precise/applications/bibletime/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/bibletime/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/bibletime/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/compizconfig-backend-tdeconfig/debian/cdbs/versions.pl b/ubuntu/precise/applications/compizconfig-backend-tdeconfig/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/compizconfig-backend-tdeconfig/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/compizconfig-backend-tdeconfig/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/digikam/debian/cdbs/versions.pl b/ubuntu/precise/applications/digikam/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/digikam/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/digikam/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/dolphin/debian/cdbs/versions.pl b/ubuntu/precise/applications/dolphin/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/dolphin/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/dolphin/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/filelight-l10n/debian/cdbs/versions.pl b/ubuntu/precise/applications/filelight-l10n/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/filelight-l10n/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/filelight-l10n/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/filelight/debian/cdbs/versions.pl b/ubuntu/precise/applications/filelight/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/filelight/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/filelight/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/gtk-qt-engine/debian/cdbs/versions.pl b/ubuntu/precise/applications/gtk-qt-engine/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/gtk-qt-engine/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/gtk-qt-engine/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/gwenview-i18n/debian/cdbs/versions.pl b/ubuntu/precise/applications/gwenview-i18n/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/gwenview-i18n/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/gwenview-i18n/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/gwenview/debian/cdbs/versions.pl b/ubuntu/precise/applications/gwenview/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/gwenview/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/gwenview/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/k3b/debian/cdbs/versions.pl b/ubuntu/precise/applications/k3b/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/k3b/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/k3b/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/k9copy/debian/cdbs/versions.pl b/ubuntu/precise/applications/k9copy/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/k9copy/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/k9copy/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/kaffeine/debian/cdbs/versions.pl b/ubuntu/precise/applications/kaffeine/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/kaffeine/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/kaffeine/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/katapult/debian/cdbs/versions.pl b/ubuntu/precise/applications/katapult/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/katapult/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/katapult/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/kbarcode/debian/cdbs/versions.pl b/ubuntu/precise/applications/kbarcode/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/kbarcode/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/kbarcode/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/kbookreader/debian/cdbs/versions.pl b/ubuntu/precise/applications/kbookreader/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/kbookreader/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/kbookreader/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/kcpuload/debian/cdbs/versions.pl b/ubuntu/precise/applications/kcpuload/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/kcpuload/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/kcpuload/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/kdbusnotification/debian/cdbs/versions.pl b/ubuntu/precise/applications/kdbusnotification/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/kdbusnotification/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/kdbusnotification/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/kdiff3/debian/cdbs/versions.pl b/ubuntu/precise/applications/kdiff3/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/kdiff3/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/kdiff3/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/kdirstat/debian/cdbs/versions.pl b/ubuntu/precise/applications/kdirstat/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/kdirstat/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/kdirstat/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/keep/debian/cdbs/versions.pl b/ubuntu/precise/applications/keep/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/keep/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/keep/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/kerry/debian/cdbs/versions.pl b/ubuntu/precise/applications/kerry/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/kerry/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/kerry/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/kgtk-qt3/debian/cdbs/versions.pl b/ubuntu/precise/applications/kgtk-qt3/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/kgtk-qt3/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/kgtk-qt3/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/kile/debian/cdbs/versions.pl b/ubuntu/precise/applications/kile/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/kile/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/kile/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/kiosktool/debian/cdbs/versions.pl b/ubuntu/precise/applications/kiosktool/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/kiosktool/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/kiosktool/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/kmplayer/debian/cdbs/versions.pl b/ubuntu/precise/applications/kmplayer/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/kmplayer/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/kmplayer/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/kmymoney/debian/cdbs/versions.pl b/ubuntu/precise/applications/kmymoney/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/kmymoney/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/kmymoney/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/knemo/debian/cdbs/versions.pl b/ubuntu/precise/applications/knemo/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/knemo/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/knemo/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/knetstats/debian/cdbs/versions.pl b/ubuntu/precise/applications/knetstats/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/knetstats/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/knetstats/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/knetworkmanager.cmake/debian/cdbs/versions.pl b/ubuntu/precise/applications/knetworkmanager.cmake/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/knetworkmanager.cmake/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/knetworkmanager.cmake/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/knetworkmanager8/debian/cdbs/versions.pl b/ubuntu/precise/applications/knetworkmanager8/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/knetworkmanager8/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/knetworkmanager8/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/knetworkmanager9/debian/cdbs/versions.pl b/ubuntu/precise/applications/knetworkmanager9/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/knetworkmanager9/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/knetworkmanager9/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/koffice/debian/cdbs/versions.pl b/ubuntu/precise/applications/koffice/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/koffice/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/koffice/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/konversation/debian/cdbs/versions.pl b/ubuntu/precise/applications/konversation/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/konversation/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/konversation/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/kopete-otr/debian/cdbs/versions.pl b/ubuntu/precise/applications/kopete-otr/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/kopete-otr/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/kopete-otr/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/kpilot/debian/cdbs/versions.pl b/ubuntu/precise/applications/kpilot/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/kpilot/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/kpilot/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/kpowersave-nohal/debian/cdbs/versions.pl b/ubuntu/precise/applications/kpowersave-nohal/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/kpowersave-nohal/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/kpowersave-nohal/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/kpowersave.cmake/debian/cdbs/versions.pl b/ubuntu/precise/applications/kpowersave.cmake/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/kpowersave.cmake/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/kpowersave.cmake/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/kpowersave/debian/cdbs/versions.pl b/ubuntu/precise/applications/kpowersave/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/kpowersave/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/kpowersave/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/krename/debian/cdbs/versions.pl b/ubuntu/precise/applications/krename/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/krename/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/krename/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/krusader/debian/cdbs/versions.pl b/ubuntu/precise/applications/krusader/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/krusader/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/krusader/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/ksystemlog/debian/cdbs/versions.pl b/ubuntu/precise/applications/ksystemlog/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/ksystemlog/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/ksystemlog/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/ktorrent/debian/cdbs/versions.pl b/ubuntu/precise/applications/ktorrent/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/ktorrent/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/ktorrent/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/kuickshow/debian/cdbs/versions.pl b/ubuntu/precise/applications/kuickshow/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/kuickshow/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/kuickshow/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/kvkbd/debian/cdbs/versions.pl b/ubuntu/precise/applications/kvkbd/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/kvkbd/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/kvkbd/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/rosegarden/debian/cdbs/versions.pl b/ubuntu/precise/applications/rosegarden/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/rosegarden/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/rosegarden/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/smb4k/debian/cdbs/versions.pl b/ubuntu/precise/applications/smb4k/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/smb4k/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/smb4k/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/soundkonverter/debian/cdbs/versions.pl b/ubuntu/precise/applications/soundkonverter/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/soundkonverter/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/soundkonverter/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/tde-style-qtcurve/debian/cdbs/versions.pl b/ubuntu/precise/applications/tde-style-qtcurve/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/tde-style-qtcurve/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/tde-style-qtcurve/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/tde-systemsettings/debian/cdbs/versions.pl b/ubuntu/precise/applications/tde-systemsettings/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/tde-systemsettings/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/tde-systemsettings/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/tdeio-apt/debian/cdbs/versions.pl b/ubuntu/precise/applications/tdeio-apt/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/tdeio-apt/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/tdeio-apt/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/tdeio-locate/debian/cdbs/versions.pl b/ubuntu/precise/applications/tdeio-locate/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/tdeio-locate/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/tdeio-locate/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/tdeio-umountwrapper/debian/cdbs/versions.pl b/ubuntu/precise/applications/tdeio-umountwrapper/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/tdeio-umountwrapper/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/tdeio-umountwrapper/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/tdesudo/debian/cdbs/versions.pl b/ubuntu/precise/applications/tdesudo/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/tdesudo/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/tdesudo/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/tdesvn/debian/cdbs/versions.pl b/ubuntu/precise/applications/tdesvn/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/tdesvn/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/tdesvn/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/tdmtheme/debian/cdbs/versions.pl b/ubuntu/precise/applications/tdmtheme/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/tdmtheme/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/tdmtheme/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/twin-style-crystal/debian/cdbs/versions.pl b/ubuntu/precise/applications/twin-style-crystal/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/twin-style-crystal/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/twin-style-crystal/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/wlassistant/debian/cdbs/versions.pl b/ubuntu/precise/applications/wlassistant/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/wlassistant/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/wlassistant/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/applications/yakuake/debian/cdbs/versions.pl b/ubuntu/precise/applications/yakuake/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/applications/yakuake/debian/cdbs/versions.pl
+++ b/ubuntu/precise/applications/yakuake/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/dependencies/arts/debian/cdbs/versions.pl b/ubuntu/precise/dependencies/arts/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/dependencies/arts/debian/cdbs/versions.pl
+++ b/ubuntu/precise/dependencies/arts/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/kdegraphics.automake/debian/cdbs/versions.pl b/ubuntu/precise/kdegraphics.automake/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/kdegraphics.automake/debian/cdbs/versions.pl
+++ b/ubuntu/precise/kdegraphics.automake/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/kdevelop.cmake/debian/cdbs/versions.pl b/ubuntu/precise/kdevelop.cmake/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/kdevelop.cmake/debian/cdbs/versions.pl
+++ b/ubuntu/precise/kdevelop.cmake/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/libraries/kipi-plugins/debian/cdbs/versions.pl b/ubuntu/precise/libraries/kipi-plugins/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/libraries/kipi-plugins/debian/cdbs/versions.pl
+++ b/ubuntu/precise/libraries/kipi-plugins/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/libraries/libkdcraw/debian/cdbs/versions.pl b/ubuntu/precise/libraries/libkdcraw/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/libraries/libkdcraw/debian/cdbs/versions.pl
+++ b/ubuntu/precise/libraries/libkdcraw/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/libraries/libkexiv2/debian/cdbs/versions.pl b/ubuntu/precise/libraries/libkexiv2/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/libraries/libkexiv2/debian/cdbs/versions.pl
+++ b/ubuntu/precise/libraries/libkexiv2/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/libraries/libkipi/debian/cdbs/versions.pl b/ubuntu/precise/libraries/libkipi/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/libraries/libkipi/debian/cdbs/versions.pl
+++ b/ubuntu/precise/libraries/libkipi/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/tdeaccessibility/debian/cdbs/versions.pl b/ubuntu/precise/tdeaccessibility/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/tdeaccessibility/debian/cdbs/versions.pl
+++ b/ubuntu/precise/tdeaccessibility/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/tdeaddons/debian/cdbs/versions.pl b/ubuntu/precise/tdeaddons/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/tdeaddons/debian/cdbs/versions.pl
+++ b/ubuntu/precise/tdeaddons/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/tdeadmin/debian/cdbs/versions.pl b/ubuntu/precise/tdeadmin/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/tdeadmin/debian/cdbs/versions.pl
+++ b/ubuntu/precise/tdeadmin/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/tdeartwork/debian/cdbs/versions.pl b/ubuntu/precise/tdeartwork/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/tdeartwork/debian/cdbs/versions.pl
+++ b/ubuntu/precise/tdeartwork/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/tdebase/debian/cdbs/versions.pl b/ubuntu/precise/tdebase/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/tdebase/debian/cdbs/versions.pl
+++ b/ubuntu/precise/tdebase/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/tdebindings/debian/cdbs/versions.pl b/ubuntu/precise/tdebindings/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/tdebindings/debian/cdbs/versions.pl
+++ b/ubuntu/precise/tdebindings/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/tdeedu/debian/cdbs/versions.pl b/ubuntu/precise/tdeedu/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/tdeedu/debian/cdbs/versions.pl
+++ b/ubuntu/precise/tdeedu/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/tdegames/debian/cdbs/versions.pl b/ubuntu/precise/tdegames/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/tdegames/debian/cdbs/versions.pl
+++ b/ubuntu/precise/tdegames/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/tdegraphics/debian/cdbs/versions.pl b/ubuntu/precise/tdegraphics/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/tdegraphics/debian/cdbs/versions.pl
+++ b/ubuntu/precise/tdegraphics/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/tdelibs/debian/cdbs/versions.pl b/ubuntu/precise/tdelibs/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/tdelibs/debian/cdbs/versions.pl
+++ b/ubuntu/precise/tdelibs/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/tdemultimedia/debian/cdbs/versions.pl b/ubuntu/precise/tdemultimedia/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/tdemultimedia/debian/cdbs/versions.pl
+++ b/ubuntu/precise/tdemultimedia/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/tdenetwork/debian/cdbs/versions.pl b/ubuntu/precise/tdenetwork/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/tdenetwork/debian/cdbs/versions.pl
+++ b/ubuntu/precise/tdenetwork/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/tdepim/debian/cdbs/versions.pl b/ubuntu/precise/tdepim/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/tdepim/debian/cdbs/versions.pl
+++ b/ubuntu/precise/tdepim/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/tdesdk/debian/cdbs/versions.pl b/ubuntu/precise/tdesdk/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/tdesdk/debian/cdbs/versions.pl
+++ b/ubuntu/precise/tdesdk/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/tdetoys/debian/cdbs/versions.pl b/ubuntu/precise/tdetoys/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/tdetoys/debian/cdbs/versions.pl
+++ b/ubuntu/precise/tdetoys/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/tdeutils/debian/cdbs/versions.pl b/ubuntu/precise/tdeutils/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/tdeutils/debian/cdbs/versions.pl
+++ b/ubuntu/precise/tdeutils/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/tdevelop/debian/cdbs/versions.pl b/ubuntu/precise/tdevelop/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/tdevelop/debian/cdbs/versions.pl
+++ b/ubuntu/precise/tdevelop/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;
diff --git a/ubuntu/precise/tdewebdev/debian/cdbs/versions.pl b/ubuntu/precise/tdewebdev/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/precise/tdewebdev/debian/cdbs/versions.pl
+++ b/ubuntu/precise/tdewebdev/debian/cdbs/versions.pl
@@ -7,7 +7,7 @@ my $version = `dpkg-parsechangelog | awk '/^Version/ {print \$2}'`;
my ($version3, $version3_next);
my ($version2, $version2_next);
-($version3 = $version) =~ s/-[^-]+$//;
+($version3 = $version) =~ s/^(([^.]+\.){2}[^.+~-]+)[.+~-]?[^-]*-[^-]+$/$1/;
($version2 = $version3) =~ s/\.[^.]+$//;
($version3_next = $version3) =~ s/(?<=\.)(\d+)[a-z]?$/($1+1)/e;