summaryrefslogtreecommitdiffstats
path: root/debian/lenny
diff options
context:
space:
mode:
Diffstat (limited to 'debian/lenny')
-rw-r--r--debian/lenny/applications/abakus/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/adept/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/amarok.cmake/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/amarok/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/bibletime/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/compizconfig-backend-tdeconfig/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/digikam/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/dolphin/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/filelight-l10n/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/filelight/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/gtk-qt-engine/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/gwenview-i18n/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/gwenview/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/k3b/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/k9copy/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/kaffeine/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/katapult/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/kbarcode/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/kbookreader/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/kcpuload/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/kdbusnotification/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/kdiff3/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/kdirstat/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/keep/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/kerry/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/kgtk-qt3/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/kile/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/kiosktool/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/kmplayer/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/kmymoney/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/knemo/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/knetstats/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/knetworkmanager.cmake/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/knetworkmanager8/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/knetworkmanager9/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/koffice/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/konversation/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/kopete-otr/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/kpilot/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/kpowersave-nohal/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/kpowersave.cmake/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/kpowersave/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/krename/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/krusader/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/ksystemlog/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/ktorrent/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/kuickshow/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/kvkbd/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/rosegarden/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/smb4k/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/soundkonverter/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/tde-style-qtcurve/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/tde-systemsettings/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/tdeio-apt/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/tdeio-locate/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/tdeio-umountwrapper/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/tdesudo/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/tdesvn/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/tdmtheme/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/twin-style-crystal/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/wlassistant/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/yakuake/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/dependencies/arts/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/libraries/kipi-plugins/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/libraries/libkdcraw/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/libraries/libkexiv2/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/libraries/libkipi/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/tdeaccessibility/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/tdeaddons/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/tdeadmin/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/tdeartwork/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/tdebase/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/tdebindings/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/tdeedu/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/tdegames/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/tdegraphics/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/tdelibs/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/tdemultimedia/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/tdenetwork/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/tdepim/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/tdesdk/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/tdetoys/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/tdeutils/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/tdevelop/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/tdewebdev/debian/cdbs/versions.pl2
85 files changed, 85 insertions, 85 deletions
diff --git a/debian/lenny/applications/abakus/debian/cdbs/versions.pl b/debian/lenny/applications/abakus/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/abakus/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/adept/debian/cdbs/versions.pl b/debian/lenny/applications/adept/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/adept/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/amarok.cmake/debian/cdbs/versions.pl b/debian/lenny/applications/amarok.cmake/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/amarok.cmake/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/amarok/debian/cdbs/versions.pl b/debian/lenny/applications/amarok/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/amarok/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/bibletime/debian/cdbs/versions.pl b/debian/lenny/applications/bibletime/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/bibletime/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/compizconfig-backend-tdeconfig/debian/cdbs/versions.pl b/debian/lenny/applications/compizconfig-backend-tdeconfig/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/compizconfig-backend-tdeconfig/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/digikam/debian/cdbs/versions.pl b/debian/lenny/applications/digikam/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/digikam/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/dolphin/debian/cdbs/versions.pl b/debian/lenny/applications/dolphin/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/dolphin/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/filelight-l10n/debian/cdbs/versions.pl b/debian/lenny/applications/filelight-l10n/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/filelight-l10n/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/filelight/debian/cdbs/versions.pl b/debian/lenny/applications/filelight/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/filelight/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/gtk-qt-engine/debian/cdbs/versions.pl b/debian/lenny/applications/gtk-qt-engine/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/gtk-qt-engine/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/gwenview-i18n/debian/cdbs/versions.pl b/debian/lenny/applications/gwenview-i18n/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/gwenview-i18n/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/gwenview/debian/cdbs/versions.pl b/debian/lenny/applications/gwenview/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/gwenview/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/k3b/debian/cdbs/versions.pl b/debian/lenny/applications/k3b/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/k3b/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/k9copy/debian/cdbs/versions.pl b/debian/lenny/applications/k9copy/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/k9copy/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/kaffeine/debian/cdbs/versions.pl b/debian/lenny/applications/kaffeine/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/kaffeine/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/katapult/debian/cdbs/versions.pl b/debian/lenny/applications/katapult/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/katapult/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/kbarcode/debian/cdbs/versions.pl b/debian/lenny/applications/kbarcode/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/kbarcode/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/kbookreader/debian/cdbs/versions.pl b/debian/lenny/applications/kbookreader/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/kbookreader/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/kcpuload/debian/cdbs/versions.pl b/debian/lenny/applications/kcpuload/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/kcpuload/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/kdbusnotification/debian/cdbs/versions.pl b/debian/lenny/applications/kdbusnotification/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/kdbusnotification/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/kdiff3/debian/cdbs/versions.pl b/debian/lenny/applications/kdiff3/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/kdiff3/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/kdirstat/debian/cdbs/versions.pl b/debian/lenny/applications/kdirstat/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/kdirstat/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/keep/debian/cdbs/versions.pl b/debian/lenny/applications/keep/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/keep/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/kerry/debian/cdbs/versions.pl b/debian/lenny/applications/kerry/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/kerry/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/kgtk-qt3/debian/cdbs/versions.pl b/debian/lenny/applications/kgtk-qt3/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/kgtk-qt3/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/kile/debian/cdbs/versions.pl b/debian/lenny/applications/kile/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/kile/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/kiosktool/debian/cdbs/versions.pl b/debian/lenny/applications/kiosktool/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/kiosktool/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/kmplayer/debian/cdbs/versions.pl b/debian/lenny/applications/kmplayer/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/kmplayer/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/kmymoney/debian/cdbs/versions.pl b/debian/lenny/applications/kmymoney/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/kmymoney/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/knemo/debian/cdbs/versions.pl b/debian/lenny/applications/knemo/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/knemo/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/knetstats/debian/cdbs/versions.pl b/debian/lenny/applications/knetstats/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/knetstats/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/knetworkmanager.cmake/debian/cdbs/versions.pl b/debian/lenny/applications/knetworkmanager.cmake/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/knetworkmanager.cmake/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/knetworkmanager8/debian/cdbs/versions.pl b/debian/lenny/applications/knetworkmanager8/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/knetworkmanager8/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/knetworkmanager9/debian/cdbs/versions.pl b/debian/lenny/applications/knetworkmanager9/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/knetworkmanager9/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/koffice/debian/cdbs/versions.pl b/debian/lenny/applications/koffice/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/koffice/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/konversation/debian/cdbs/versions.pl b/debian/lenny/applications/konversation/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/konversation/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/kopete-otr/debian/cdbs/versions.pl b/debian/lenny/applications/kopete-otr/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/kopete-otr/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/kpilot/debian/cdbs/versions.pl b/debian/lenny/applications/kpilot/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/kpilot/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/kpowersave-nohal/debian/cdbs/versions.pl b/debian/lenny/applications/kpowersave-nohal/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/kpowersave-nohal/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/kpowersave.cmake/debian/cdbs/versions.pl b/debian/lenny/applications/kpowersave.cmake/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/kpowersave.cmake/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/kpowersave/debian/cdbs/versions.pl b/debian/lenny/applications/kpowersave/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/kpowersave/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/krename/debian/cdbs/versions.pl b/debian/lenny/applications/krename/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/krename/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/krusader/debian/cdbs/versions.pl b/debian/lenny/applications/krusader/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/krusader/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/ksystemlog/debian/cdbs/versions.pl b/debian/lenny/applications/ksystemlog/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/ksystemlog/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/ktorrent/debian/cdbs/versions.pl b/debian/lenny/applications/ktorrent/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/ktorrent/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/kuickshow/debian/cdbs/versions.pl b/debian/lenny/applications/kuickshow/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/kuickshow/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/kvkbd/debian/cdbs/versions.pl b/debian/lenny/applications/kvkbd/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/kvkbd/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/rosegarden/debian/cdbs/versions.pl b/debian/lenny/applications/rosegarden/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/rosegarden/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/smb4k/debian/cdbs/versions.pl b/debian/lenny/applications/smb4k/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/smb4k/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/soundkonverter/debian/cdbs/versions.pl b/debian/lenny/applications/soundkonverter/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/soundkonverter/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/tde-style-qtcurve/debian/cdbs/versions.pl b/debian/lenny/applications/tde-style-qtcurve/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/tde-style-qtcurve/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/tde-systemsettings/debian/cdbs/versions.pl b/debian/lenny/applications/tde-systemsettings/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/tde-systemsettings/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/tdeio-apt/debian/cdbs/versions.pl b/debian/lenny/applications/tdeio-apt/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/tdeio-apt/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/tdeio-locate/debian/cdbs/versions.pl b/debian/lenny/applications/tdeio-locate/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/tdeio-locate/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/tdeio-umountwrapper/debian/cdbs/versions.pl b/debian/lenny/applications/tdeio-umountwrapper/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/tdeio-umountwrapper/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/tdesudo/debian/cdbs/versions.pl b/debian/lenny/applications/tdesudo/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/tdesudo/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/tdesvn/debian/cdbs/versions.pl b/debian/lenny/applications/tdesvn/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/tdesvn/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/tdmtheme/debian/cdbs/versions.pl b/debian/lenny/applications/tdmtheme/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/tdmtheme/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/twin-style-crystal/debian/cdbs/versions.pl b/debian/lenny/applications/twin-style-crystal/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/twin-style-crystal/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/wlassistant/debian/cdbs/versions.pl b/debian/lenny/applications/wlassistant/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/wlassistant/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/applications/yakuake/debian/cdbs/versions.pl b/debian/lenny/applications/yakuake/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/yakuake/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/dependencies/arts/debian/cdbs/versions.pl b/debian/lenny/dependencies/arts/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/dependencies/arts/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/libraries/kipi-plugins/debian/cdbs/versions.pl b/debian/lenny/libraries/kipi-plugins/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/libraries/kipi-plugins/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/libraries/libkdcraw/debian/cdbs/versions.pl b/debian/lenny/libraries/libkdcraw/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/libraries/libkdcraw/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/libraries/libkexiv2/debian/cdbs/versions.pl b/debian/lenny/libraries/libkexiv2/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/libraries/libkexiv2/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/libraries/libkipi/debian/cdbs/versions.pl b/debian/lenny/libraries/libkipi/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/libraries/libkipi/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/tdeaccessibility/debian/cdbs/versions.pl b/debian/lenny/tdeaccessibility/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/tdeaccessibility/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/tdeaddons/debian/cdbs/versions.pl b/debian/lenny/tdeaddons/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/tdeaddons/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/tdeadmin/debian/cdbs/versions.pl b/debian/lenny/tdeadmin/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/tdeadmin/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/tdeartwork/debian/cdbs/versions.pl b/debian/lenny/tdeartwork/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/tdeartwork/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/tdebase/debian/cdbs/versions.pl b/debian/lenny/tdebase/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/tdebase/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/tdebindings/debian/cdbs/versions.pl b/debian/lenny/tdebindings/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/tdebindings/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/tdeedu/debian/cdbs/versions.pl b/debian/lenny/tdeedu/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/tdeedu/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/tdegames/debian/cdbs/versions.pl b/debian/lenny/tdegames/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/tdegames/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/tdegraphics/debian/cdbs/versions.pl b/debian/lenny/tdegraphics/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/tdegraphics/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/tdelibs/debian/cdbs/versions.pl b/debian/lenny/tdelibs/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/tdelibs/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/tdemultimedia/debian/cdbs/versions.pl b/debian/lenny/tdemultimedia/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/tdemultimedia/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/tdenetwork/debian/cdbs/versions.pl b/debian/lenny/tdenetwork/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/tdenetwork/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/tdepim/debian/cdbs/versions.pl b/debian/lenny/tdepim/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/tdepim/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/tdesdk/debian/cdbs/versions.pl b/debian/lenny/tdesdk/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/tdesdk/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/tdetoys/debian/cdbs/versions.pl b/debian/lenny/tdetoys/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/tdetoys/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/tdeutils/debian/cdbs/versions.pl b/debian/lenny/tdeutils/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/tdeutils/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/tdevelop/debian/cdbs/versions.pl b/debian/lenny/tdevelop/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/tdevelop/debian/cdbs/versions.pl
+++ b/debian/lenny/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/debian/lenny/tdewebdev/debian/cdbs/versions.pl b/debian/lenny/tdewebdev/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/tdewebdev/debian/cdbs/versions.pl
+++ b/debian/lenny/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;