summaryrefslogtreecommitdiffstats
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 20:10:29 +0200
commit2c449d7170cba88f012c1745a86abcd0524a4aaa (patch)
treebd19cd91c4eb432c7c2bdb57a243c78d23eee714
parent0e28c6babba67d147d47101048d1c3b7aa22f495 (diff)
downloadtde-packaging-2c449d7170cba88f012c1745a86abcd0524a4aaa.tar.gz
tde-packaging-2c449d7170cba88f012c1745a86abcd0524a4aaa.zip
Cutting off the fourth number, or preliminary version number
in counting versions for dependencies on Debian and Ubuntu (cherry picked from commit 6e70fa33ca99b1020f68a09481317b854e31de66)
-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-kconfig/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/kde-style-qtcurve/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/kde-systemsettings/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/kdesudo/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/kdmtheme/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/kio-apt/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/kio-locate/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/applications/kio-umountwrapper/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/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.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/kwin-style-crystal/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/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/kdeaccessibility/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/kdeaddons/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/kdeadmin/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/kdeartwork/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/kdebase/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/kdebindings/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/kdeedu/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/kdegames/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/kdegraphics/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/kdelibs/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/kdemultimedia/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/kdenetwork/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/kdepim/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/kdesdk/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/kdetoys/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/kdeutils/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/kdevelop/debian/cdbs/versions.pl2
-rw-r--r--debian/lenny/kdewebdev/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/squeeze/applications/abakus/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/applications/adept/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/applications/amarok.cmake/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/applications/amarok/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/applications/bibletime/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/applications/compizconfig-backend-kconfig/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/applications/digikam/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/applications/dolphin/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/applications/filelight-l10n/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/applications/filelight/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/applications/gtk-qt-engine/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/applications/gwenview-i18n/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/applications/gwenview/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/applications/k3b/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/applications/k9copy/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/applications/kaffeine/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/applications/katapult/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/applications/kbarcode/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/applications/kbookreader/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/applications/kcpuload/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/applications/kdbusnotification/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/applications/kde-style-qtcurve/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/applications/kde-systemsettings/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/applications/kdesudo/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/applications/kdiff3/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/applications/kdirstat/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/applications/kdmtheme/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/applications/keep/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/applications/kerry/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/applications/kgtk-qt3/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/applications/kile/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/applications/kio-apt/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/applications/kio-locate/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/applications/kio-umountwrapper/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/applications/kiosktool/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/applications/kmplayer/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/applications/kmymoney/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/applications/knemo/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/applications/knetstats/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/applications/knetworkmanager.cmake/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/applications/knetworkmanager8/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/applications/koffice/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/applications/konversation/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/applications/kopete-otr/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/applications/kpilot/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/applications/kpowersave.cmake/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/applications/kpowersave/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/applications/krename/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/applications/krusader/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/applications/ksystemlog/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/applications/ktorrent/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/applications/kuickshow/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/applications/kvkbd/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/applications/kwin-style-crystal/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/applications/smb4k/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/applications/soundkonverter/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/applications/wlassistant/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/applications/yakuake/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/dependencies/arts/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/kdeaccessibility/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/kdeaddons/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/kdeadmin/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/kdeartwork/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/kdebase/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/kdebindings/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/kdeedu/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/kdegames/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/kdegraphics/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/kdelibs/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/kdemultimedia/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/kdenetwork/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/kdepim/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/kdesdk/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/kdetoys/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/kdeutils/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/kdevelop/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/kdewebdev/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/libraries/kipi-plugins/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/libraries/libkdcraw/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/libraries/libkexiv2/debian/cdbs/versions.pl2
-rw-r--r--debian/squeeze/libraries/libkipi/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/applications/abakus/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/applications/adept/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/applications/amarok.cmake/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/applications/amarok/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/applications/bibletime/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/applications/compizconfig-backend-kconfig/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/applications/digikam/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/applications/dolphin/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/applications/filelight-l10n/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/applications/filelight/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/applications/gtk-qt-engine/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/applications/gwenview-i18n/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/applications/gwenview/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/applications/k3b/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/applications/k9copy/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/applications/kaffeine/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/applications/katapult/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/applications/kbarcode/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/applications/kbookreader/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/applications/kcpuload/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/applications/kdbusnotification/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/applications/kde-style-qtcurve/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/applications/kde-systemsettings/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/applications/kdesudo/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/applications/kdiff3/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/applications/kdirstat/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/applications/kdmtheme/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/applications/keep/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/applications/kerry/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/applications/kgtk-qt3/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/applications/kile/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/applications/kio-apt/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/applications/kio-locate/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/applications/kio-umountwrapper/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/applications/kiosktool/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/applications/kmplayer/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/applications/kmymoney/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/applications/knemo/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/applications/knetstats/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/applications/knetworkmanager.cmake/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/applications/knetworkmanager8/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/applications/koffice/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/applications/konversation/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/applications/kopete-otr/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/applications/kpilot/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/applications/kpowersave.cmake/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/applications/kpowersave/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/applications/krename/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/applications/krusader/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/applications/ksystemlog/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/applications/ktorrent/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/applications/kuickshow/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/applications/kvkbd/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/applications/kwin-style-crystal/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/applications/smb4k/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/applications/soundkonverter/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/applications/wlassistant/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/applications/yakuake/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/dependencies/arts/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/kdeaccessibility/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/kdeaddons/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/kdeadmin/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/kdeartwork/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/kdebase/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/kdebindings/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/kdeedu/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/kdegames/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/kdegraphics.automake/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/kdegraphics/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/kdelibs/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/kdemultimedia/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/kdenetwork/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/kdepim/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/kdesdk/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/kdetoys/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/kdeutils/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/kdevelop.cmake/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/kdevelop/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/kdewebdev/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/libraries/kipi-plugins/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/libraries/libkdcraw/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/libraries/libkexiv2/debian/cdbs/versions.pl2
-rw-r--r--ubuntu/maverick/libraries/libkipi/debian/cdbs/versions.pl2
245 files changed, 245 insertions, 245 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-kconfig/debian/cdbs/versions.pl b/debian/lenny/applications/compizconfig-backend-kconfig/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/compizconfig-backend-kconfig/debian/cdbs/versions.pl
+++ b/debian/lenny/applications/compizconfig-backend-kconfig/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/kde-style-qtcurve/debian/cdbs/versions.pl b/debian/lenny/applications/kde-style-qtcurve/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/kde-style-qtcurve/debian/cdbs/versions.pl
+++ b/debian/lenny/applications/kde-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/kde-systemsettings/debian/cdbs/versions.pl b/debian/lenny/applications/kde-systemsettings/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/kde-systemsettings/debian/cdbs/versions.pl
+++ b/debian/lenny/applications/kde-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/kdesudo/debian/cdbs/versions.pl b/debian/lenny/applications/kdesudo/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/kdesudo/debian/cdbs/versions.pl
+++ b/debian/lenny/applications/kdesudo/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/kdmtheme/debian/cdbs/versions.pl b/debian/lenny/applications/kdmtheme/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/kdmtheme/debian/cdbs/versions.pl
+++ b/debian/lenny/applications/kdmtheme/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/kio-apt/debian/cdbs/versions.pl b/debian/lenny/applications/kio-apt/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/kio-apt/debian/cdbs/versions.pl
+++ b/debian/lenny/applications/kio-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/kio-locate/debian/cdbs/versions.pl b/debian/lenny/applications/kio-locate/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/kio-locate/debian/cdbs/versions.pl
+++ b/debian/lenny/applications/kio-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/kio-umountwrapper/debian/cdbs/versions.pl b/debian/lenny/applications/kio-umountwrapper/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/kio-umountwrapper/debian/cdbs/versions.pl
+++ b/debian/lenny/applications/kio-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/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/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.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/kwin-style-crystal/debian/cdbs/versions.pl b/debian/lenny/applications/kwin-style-crystal/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/applications/kwin-style-crystal/debian/cdbs/versions.pl
+++ b/debian/lenny/applications/kwin-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/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/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/kdeaccessibility/debian/cdbs/versions.pl b/debian/lenny/kdeaccessibility/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/kdeaccessibility/debian/cdbs/versions.pl
+++ b/debian/lenny/kdeaccessibility/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/kdeaddons/debian/cdbs/versions.pl b/debian/lenny/kdeaddons/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/kdeaddons/debian/cdbs/versions.pl
+++ b/debian/lenny/kdeaddons/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/kdeadmin/debian/cdbs/versions.pl b/debian/lenny/kdeadmin/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/kdeadmin/debian/cdbs/versions.pl
+++ b/debian/lenny/kdeadmin/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/kdeartwork/debian/cdbs/versions.pl b/debian/lenny/kdeartwork/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/kdeartwork/debian/cdbs/versions.pl
+++ b/debian/lenny/kdeartwork/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/kdebase/debian/cdbs/versions.pl b/debian/lenny/kdebase/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/kdebase/debian/cdbs/versions.pl
+++ b/debian/lenny/kdebase/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/kdebindings/debian/cdbs/versions.pl b/debian/lenny/kdebindings/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/kdebindings/debian/cdbs/versions.pl
+++ b/debian/lenny/kdebindings/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/kdeedu/debian/cdbs/versions.pl b/debian/lenny/kdeedu/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/kdeedu/debian/cdbs/versions.pl
+++ b/debian/lenny/kdeedu/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/kdegames/debian/cdbs/versions.pl b/debian/lenny/kdegames/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/kdegames/debian/cdbs/versions.pl
+++ b/debian/lenny/kdegames/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/kdegraphics/debian/cdbs/versions.pl b/debian/lenny/kdegraphics/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/kdegraphics/debian/cdbs/versions.pl
+++ b/debian/lenny/kdegraphics/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/kdelibs/debian/cdbs/versions.pl b/debian/lenny/kdelibs/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/kdelibs/debian/cdbs/versions.pl
+++ b/debian/lenny/kdelibs/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/kdemultimedia/debian/cdbs/versions.pl b/debian/lenny/kdemultimedia/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/kdemultimedia/debian/cdbs/versions.pl
+++ b/debian/lenny/kdemultimedia/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/kdenetwork/debian/cdbs/versions.pl b/debian/lenny/kdenetwork/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/kdenetwork/debian/cdbs/versions.pl
+++ b/debian/lenny/kdenetwork/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/kdepim/debian/cdbs/versions.pl b/debian/lenny/kdepim/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/kdepim/debian/cdbs/versions.pl
+++ b/debian/lenny/kdepim/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/kdesdk/debian/cdbs/versions.pl b/debian/lenny/kdesdk/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/kdesdk/debian/cdbs/versions.pl
+++ b/debian/lenny/kdesdk/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/kdetoys/debian/cdbs/versions.pl b/debian/lenny/kdetoys/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/kdetoys/debian/cdbs/versions.pl
+++ b/debian/lenny/kdetoys/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/kdeutils/debian/cdbs/versions.pl b/debian/lenny/kdeutils/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/kdeutils/debian/cdbs/versions.pl
+++ b/debian/lenny/kdeutils/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/kdevelop/debian/cdbs/versions.pl b/debian/lenny/kdevelop/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/kdevelop/debian/cdbs/versions.pl
+++ b/debian/lenny/kdevelop/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/kdewebdev/debian/cdbs/versions.pl b/debian/lenny/kdewebdev/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/lenny/kdewebdev/debian/cdbs/versions.pl
+++ b/debian/lenny/kdewebdev/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/squeeze/applications/abakus/debian/cdbs/versions.pl b/debian/squeeze/applications/abakus/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/applications/abakus/debian/cdbs/versions.pl
+++ b/debian/squeeze/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/squeeze/applications/adept/debian/cdbs/versions.pl b/debian/squeeze/applications/adept/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/applications/adept/debian/cdbs/versions.pl
+++ b/debian/squeeze/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/squeeze/applications/amarok.cmake/debian/cdbs/versions.pl b/debian/squeeze/applications/amarok.cmake/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/applications/amarok.cmake/debian/cdbs/versions.pl
+++ b/debian/squeeze/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/squeeze/applications/amarok/debian/cdbs/versions.pl b/debian/squeeze/applications/amarok/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/applications/amarok/debian/cdbs/versions.pl
+++ b/debian/squeeze/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/squeeze/applications/bibletime/debian/cdbs/versions.pl b/debian/squeeze/applications/bibletime/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/applications/bibletime/debian/cdbs/versions.pl
+++ b/debian/squeeze/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/squeeze/applications/compizconfig-backend-kconfig/debian/cdbs/versions.pl b/debian/squeeze/applications/compizconfig-backend-kconfig/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/applications/compizconfig-backend-kconfig/debian/cdbs/versions.pl
+++ b/debian/squeeze/applications/compizconfig-backend-kconfig/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/squeeze/applications/digikam/debian/cdbs/versions.pl b/debian/squeeze/applications/digikam/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/applications/digikam/debian/cdbs/versions.pl
+++ b/debian/squeeze/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/squeeze/applications/dolphin/debian/cdbs/versions.pl b/debian/squeeze/applications/dolphin/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/applications/dolphin/debian/cdbs/versions.pl
+++ b/debian/squeeze/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/squeeze/applications/filelight-l10n/debian/cdbs/versions.pl b/debian/squeeze/applications/filelight-l10n/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/applications/filelight-l10n/debian/cdbs/versions.pl
+++ b/debian/squeeze/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/squeeze/applications/filelight/debian/cdbs/versions.pl b/debian/squeeze/applications/filelight/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/applications/filelight/debian/cdbs/versions.pl
+++ b/debian/squeeze/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/squeeze/applications/gtk-qt-engine/debian/cdbs/versions.pl b/debian/squeeze/applications/gtk-qt-engine/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/applications/gtk-qt-engine/debian/cdbs/versions.pl
+++ b/debian/squeeze/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/squeeze/applications/gwenview-i18n/debian/cdbs/versions.pl b/debian/squeeze/applications/gwenview-i18n/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/applications/gwenview-i18n/debian/cdbs/versions.pl
+++ b/debian/squeeze/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/squeeze/applications/gwenview/debian/cdbs/versions.pl b/debian/squeeze/applications/gwenview/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/applications/gwenview/debian/cdbs/versions.pl
+++ b/debian/squeeze/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/squeeze/applications/k3b/debian/cdbs/versions.pl b/debian/squeeze/applications/k3b/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/applications/k3b/debian/cdbs/versions.pl
+++ b/debian/squeeze/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/squeeze/applications/k9copy/debian/cdbs/versions.pl b/debian/squeeze/applications/k9copy/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/applications/k9copy/debian/cdbs/versions.pl
+++ b/debian/squeeze/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/squeeze/applications/kaffeine/debian/cdbs/versions.pl b/debian/squeeze/applications/kaffeine/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/applications/kaffeine/debian/cdbs/versions.pl
+++ b/debian/squeeze/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/squeeze/applications/katapult/debian/cdbs/versions.pl b/debian/squeeze/applications/katapult/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/applications/katapult/debian/cdbs/versions.pl
+++ b/debian/squeeze/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/squeeze/applications/kbarcode/debian/cdbs/versions.pl b/debian/squeeze/applications/kbarcode/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/applications/kbarcode/debian/cdbs/versions.pl
+++ b/debian/squeeze/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/squeeze/applications/kbookreader/debian/cdbs/versions.pl b/debian/squeeze/applications/kbookreader/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/applications/kbookreader/debian/cdbs/versions.pl
+++ b/debian/squeeze/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/squeeze/applications/kcpuload/debian/cdbs/versions.pl b/debian/squeeze/applications/kcpuload/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/applications/kcpuload/debian/cdbs/versions.pl
+++ b/debian/squeeze/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/squeeze/applications/kdbusnotification/debian/cdbs/versions.pl b/debian/squeeze/applications/kdbusnotification/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/applications/kdbusnotification/debian/cdbs/versions.pl
+++ b/debian/squeeze/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/squeeze/applications/kde-style-qtcurve/debian/cdbs/versions.pl b/debian/squeeze/applications/kde-style-qtcurve/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/applications/kde-style-qtcurve/debian/cdbs/versions.pl
+++ b/debian/squeeze/applications/kde-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/squeeze/applications/kde-systemsettings/debian/cdbs/versions.pl b/debian/squeeze/applications/kde-systemsettings/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/applications/kde-systemsettings/debian/cdbs/versions.pl
+++ b/debian/squeeze/applications/kde-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/squeeze/applications/kdesudo/debian/cdbs/versions.pl b/debian/squeeze/applications/kdesudo/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/applications/kdesudo/debian/cdbs/versions.pl
+++ b/debian/squeeze/applications/kdesudo/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/squeeze/applications/kdiff3/debian/cdbs/versions.pl b/debian/squeeze/applications/kdiff3/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/applications/kdiff3/debian/cdbs/versions.pl
+++ b/debian/squeeze/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/squeeze/applications/kdirstat/debian/cdbs/versions.pl b/debian/squeeze/applications/kdirstat/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/applications/kdirstat/debian/cdbs/versions.pl
+++ b/debian/squeeze/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/squeeze/applications/kdmtheme/debian/cdbs/versions.pl b/debian/squeeze/applications/kdmtheme/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/applications/kdmtheme/debian/cdbs/versions.pl
+++ b/debian/squeeze/applications/kdmtheme/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/squeeze/applications/keep/debian/cdbs/versions.pl b/debian/squeeze/applications/keep/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/applications/keep/debian/cdbs/versions.pl
+++ b/debian/squeeze/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/squeeze/applications/kerry/debian/cdbs/versions.pl b/debian/squeeze/applications/kerry/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/applications/kerry/debian/cdbs/versions.pl
+++ b/debian/squeeze/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/squeeze/applications/kgtk-qt3/debian/cdbs/versions.pl b/debian/squeeze/applications/kgtk-qt3/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/applications/kgtk-qt3/debian/cdbs/versions.pl
+++ b/debian/squeeze/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/squeeze/applications/kile/debian/cdbs/versions.pl b/debian/squeeze/applications/kile/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/applications/kile/debian/cdbs/versions.pl
+++ b/debian/squeeze/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/squeeze/applications/kio-apt/debian/cdbs/versions.pl b/debian/squeeze/applications/kio-apt/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/applications/kio-apt/debian/cdbs/versions.pl
+++ b/debian/squeeze/applications/kio-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/squeeze/applications/kio-locate/debian/cdbs/versions.pl b/debian/squeeze/applications/kio-locate/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/applications/kio-locate/debian/cdbs/versions.pl
+++ b/debian/squeeze/applications/kio-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/squeeze/applications/kio-umountwrapper/debian/cdbs/versions.pl b/debian/squeeze/applications/kio-umountwrapper/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/applications/kio-umountwrapper/debian/cdbs/versions.pl
+++ b/debian/squeeze/applications/kio-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/squeeze/applications/kiosktool/debian/cdbs/versions.pl b/debian/squeeze/applications/kiosktool/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/applications/kiosktool/debian/cdbs/versions.pl
+++ b/debian/squeeze/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/squeeze/applications/kmplayer/debian/cdbs/versions.pl b/debian/squeeze/applications/kmplayer/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/applications/kmplayer/debian/cdbs/versions.pl
+++ b/debian/squeeze/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/squeeze/applications/kmymoney/debian/cdbs/versions.pl b/debian/squeeze/applications/kmymoney/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/applications/kmymoney/debian/cdbs/versions.pl
+++ b/debian/squeeze/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/squeeze/applications/knemo/debian/cdbs/versions.pl b/debian/squeeze/applications/knemo/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/applications/knemo/debian/cdbs/versions.pl
+++ b/debian/squeeze/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/squeeze/applications/knetstats/debian/cdbs/versions.pl b/debian/squeeze/applications/knetstats/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/applications/knetstats/debian/cdbs/versions.pl
+++ b/debian/squeeze/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/squeeze/applications/knetworkmanager.cmake/debian/cdbs/versions.pl b/debian/squeeze/applications/knetworkmanager.cmake/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/applications/knetworkmanager.cmake/debian/cdbs/versions.pl
+++ b/debian/squeeze/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/squeeze/applications/knetworkmanager8/debian/cdbs/versions.pl b/debian/squeeze/applications/knetworkmanager8/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/applications/knetworkmanager8/debian/cdbs/versions.pl
+++ b/debian/squeeze/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/squeeze/applications/koffice/debian/cdbs/versions.pl b/debian/squeeze/applications/koffice/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/applications/koffice/debian/cdbs/versions.pl
+++ b/debian/squeeze/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/squeeze/applications/konversation/debian/cdbs/versions.pl b/debian/squeeze/applications/konversation/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/applications/konversation/debian/cdbs/versions.pl
+++ b/debian/squeeze/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/squeeze/applications/kopete-otr/debian/cdbs/versions.pl b/debian/squeeze/applications/kopete-otr/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/applications/kopete-otr/debian/cdbs/versions.pl
+++ b/debian/squeeze/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/squeeze/applications/kpilot/debian/cdbs/versions.pl b/debian/squeeze/applications/kpilot/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/applications/kpilot/debian/cdbs/versions.pl
+++ b/debian/squeeze/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/squeeze/applications/kpowersave.cmake/debian/cdbs/versions.pl b/debian/squeeze/applications/kpowersave.cmake/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/applications/kpowersave.cmake/debian/cdbs/versions.pl
+++ b/debian/squeeze/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/squeeze/applications/kpowersave/debian/cdbs/versions.pl b/debian/squeeze/applications/kpowersave/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/applications/kpowersave/debian/cdbs/versions.pl
+++ b/debian/squeeze/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/squeeze/applications/krename/debian/cdbs/versions.pl b/debian/squeeze/applications/krename/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/applications/krename/debian/cdbs/versions.pl
+++ b/debian/squeeze/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/squeeze/applications/krusader/debian/cdbs/versions.pl b/debian/squeeze/applications/krusader/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/applications/krusader/debian/cdbs/versions.pl
+++ b/debian/squeeze/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/squeeze/applications/ksystemlog/debian/cdbs/versions.pl b/debian/squeeze/applications/ksystemlog/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/applications/ksystemlog/debian/cdbs/versions.pl
+++ b/debian/squeeze/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/squeeze/applications/ktorrent/debian/cdbs/versions.pl b/debian/squeeze/applications/ktorrent/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/applications/ktorrent/debian/cdbs/versions.pl
+++ b/debian/squeeze/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/squeeze/applications/kuickshow/debian/cdbs/versions.pl b/debian/squeeze/applications/kuickshow/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/applications/kuickshow/debian/cdbs/versions.pl
+++ b/debian/squeeze/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/squeeze/applications/kvkbd/debian/cdbs/versions.pl b/debian/squeeze/applications/kvkbd/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/applications/kvkbd/debian/cdbs/versions.pl
+++ b/debian/squeeze/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/squeeze/applications/kwin-style-crystal/debian/cdbs/versions.pl b/debian/squeeze/applications/kwin-style-crystal/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/applications/kwin-style-crystal/debian/cdbs/versions.pl
+++ b/debian/squeeze/applications/kwin-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/squeeze/applications/smb4k/debian/cdbs/versions.pl b/debian/squeeze/applications/smb4k/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/applications/smb4k/debian/cdbs/versions.pl
+++ b/debian/squeeze/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/squeeze/applications/soundkonverter/debian/cdbs/versions.pl b/debian/squeeze/applications/soundkonverter/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/applications/soundkonverter/debian/cdbs/versions.pl
+++ b/debian/squeeze/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/squeeze/applications/wlassistant/debian/cdbs/versions.pl b/debian/squeeze/applications/wlassistant/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/applications/wlassistant/debian/cdbs/versions.pl
+++ b/debian/squeeze/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/squeeze/applications/yakuake/debian/cdbs/versions.pl b/debian/squeeze/applications/yakuake/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/applications/yakuake/debian/cdbs/versions.pl
+++ b/debian/squeeze/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/squeeze/dependencies/arts/debian/cdbs/versions.pl b/debian/squeeze/dependencies/arts/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/dependencies/arts/debian/cdbs/versions.pl
+++ b/debian/squeeze/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/squeeze/kdeaccessibility/debian/cdbs/versions.pl b/debian/squeeze/kdeaccessibility/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/kdeaccessibility/debian/cdbs/versions.pl
+++ b/debian/squeeze/kdeaccessibility/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/squeeze/kdeaddons/debian/cdbs/versions.pl b/debian/squeeze/kdeaddons/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/kdeaddons/debian/cdbs/versions.pl
+++ b/debian/squeeze/kdeaddons/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/squeeze/kdeadmin/debian/cdbs/versions.pl b/debian/squeeze/kdeadmin/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/kdeadmin/debian/cdbs/versions.pl
+++ b/debian/squeeze/kdeadmin/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/squeeze/kdeartwork/debian/cdbs/versions.pl b/debian/squeeze/kdeartwork/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/kdeartwork/debian/cdbs/versions.pl
+++ b/debian/squeeze/kdeartwork/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/squeeze/kdebase/debian/cdbs/versions.pl b/debian/squeeze/kdebase/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/kdebase/debian/cdbs/versions.pl
+++ b/debian/squeeze/kdebase/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/squeeze/kdebindings/debian/cdbs/versions.pl b/debian/squeeze/kdebindings/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/kdebindings/debian/cdbs/versions.pl
+++ b/debian/squeeze/kdebindings/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/squeeze/kdeedu/debian/cdbs/versions.pl b/debian/squeeze/kdeedu/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/kdeedu/debian/cdbs/versions.pl
+++ b/debian/squeeze/kdeedu/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/squeeze/kdegames/debian/cdbs/versions.pl b/debian/squeeze/kdegames/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/kdegames/debian/cdbs/versions.pl
+++ b/debian/squeeze/kdegames/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/squeeze/kdegraphics/debian/cdbs/versions.pl b/debian/squeeze/kdegraphics/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/kdegraphics/debian/cdbs/versions.pl
+++ b/debian/squeeze/kdegraphics/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/squeeze/kdelibs/debian/cdbs/versions.pl b/debian/squeeze/kdelibs/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/kdelibs/debian/cdbs/versions.pl
+++ b/debian/squeeze/kdelibs/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/squeeze/kdemultimedia/debian/cdbs/versions.pl b/debian/squeeze/kdemultimedia/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/kdemultimedia/debian/cdbs/versions.pl
+++ b/debian/squeeze/kdemultimedia/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/squeeze/kdenetwork/debian/cdbs/versions.pl b/debian/squeeze/kdenetwork/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/kdenetwork/debian/cdbs/versions.pl
+++ b/debian/squeeze/kdenetwork/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/squeeze/kdepim/debian/cdbs/versions.pl b/debian/squeeze/kdepim/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/kdepim/debian/cdbs/versions.pl
+++ b/debian/squeeze/kdepim/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/squeeze/kdesdk/debian/cdbs/versions.pl b/debian/squeeze/kdesdk/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/kdesdk/debian/cdbs/versions.pl
+++ b/debian/squeeze/kdesdk/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/squeeze/kdetoys/debian/cdbs/versions.pl b/debian/squeeze/kdetoys/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/kdetoys/debian/cdbs/versions.pl
+++ b/debian/squeeze/kdetoys/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/squeeze/kdeutils/debian/cdbs/versions.pl b/debian/squeeze/kdeutils/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/kdeutils/debian/cdbs/versions.pl
+++ b/debian/squeeze/kdeutils/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/squeeze/kdevelop/debian/cdbs/versions.pl b/debian/squeeze/kdevelop/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/kdevelop/debian/cdbs/versions.pl
+++ b/debian/squeeze/kdevelop/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/squeeze/kdewebdev/debian/cdbs/versions.pl b/debian/squeeze/kdewebdev/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/kdewebdev/debian/cdbs/versions.pl
+++ b/debian/squeeze/kdewebdev/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/squeeze/libraries/kipi-plugins/debian/cdbs/versions.pl b/debian/squeeze/libraries/kipi-plugins/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/libraries/kipi-plugins/debian/cdbs/versions.pl
+++ b/debian/squeeze/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/squeeze/libraries/libkdcraw/debian/cdbs/versions.pl b/debian/squeeze/libraries/libkdcraw/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/libraries/libkdcraw/debian/cdbs/versions.pl
+++ b/debian/squeeze/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/squeeze/libraries/libkexiv2/debian/cdbs/versions.pl b/debian/squeeze/libraries/libkexiv2/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/libraries/libkexiv2/debian/cdbs/versions.pl
+++ b/debian/squeeze/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/squeeze/libraries/libkipi/debian/cdbs/versions.pl b/debian/squeeze/libraries/libkipi/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/debian/squeeze/libraries/libkipi/debian/cdbs/versions.pl
+++ b/debian/squeeze/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/maverick/applications/abakus/debian/cdbs/versions.pl b/ubuntu/maverick/applications/abakus/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/applications/abakus/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/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/maverick/applications/adept/debian/cdbs/versions.pl b/ubuntu/maverick/applications/adept/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/applications/adept/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/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/maverick/applications/amarok.cmake/debian/cdbs/versions.pl b/ubuntu/maverick/applications/amarok.cmake/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/applications/amarok.cmake/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/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/maverick/applications/amarok/debian/cdbs/versions.pl b/ubuntu/maverick/applications/amarok/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/applications/amarok/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/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/maverick/applications/bibletime/debian/cdbs/versions.pl b/ubuntu/maverick/applications/bibletime/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/applications/bibletime/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/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/maverick/applications/compizconfig-backend-kconfig/debian/cdbs/versions.pl b/ubuntu/maverick/applications/compizconfig-backend-kconfig/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/applications/compizconfig-backend-kconfig/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/applications/compizconfig-backend-kconfig/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/maverick/applications/digikam/debian/cdbs/versions.pl b/ubuntu/maverick/applications/digikam/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/applications/digikam/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/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/maverick/applications/dolphin/debian/cdbs/versions.pl b/ubuntu/maverick/applications/dolphin/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/applications/dolphin/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/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/maverick/applications/filelight-l10n/debian/cdbs/versions.pl b/ubuntu/maverick/applications/filelight-l10n/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/applications/filelight-l10n/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/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/maverick/applications/filelight/debian/cdbs/versions.pl b/ubuntu/maverick/applications/filelight/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/applications/filelight/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/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/maverick/applications/gtk-qt-engine/debian/cdbs/versions.pl b/ubuntu/maverick/applications/gtk-qt-engine/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/applications/gtk-qt-engine/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/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/maverick/applications/gwenview-i18n/debian/cdbs/versions.pl b/ubuntu/maverick/applications/gwenview-i18n/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/applications/gwenview-i18n/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/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/maverick/applications/gwenview/debian/cdbs/versions.pl b/ubuntu/maverick/applications/gwenview/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/applications/gwenview/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/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/maverick/applications/k3b/debian/cdbs/versions.pl b/ubuntu/maverick/applications/k3b/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/applications/k3b/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/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/maverick/applications/k9copy/debian/cdbs/versions.pl b/ubuntu/maverick/applications/k9copy/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/applications/k9copy/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/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/maverick/applications/kaffeine/debian/cdbs/versions.pl b/ubuntu/maverick/applications/kaffeine/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/applications/kaffeine/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/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/maverick/applications/katapult/debian/cdbs/versions.pl b/ubuntu/maverick/applications/katapult/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/applications/katapult/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/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/maverick/applications/kbarcode/debian/cdbs/versions.pl b/ubuntu/maverick/applications/kbarcode/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/applications/kbarcode/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/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/maverick/applications/kbookreader/debian/cdbs/versions.pl b/ubuntu/maverick/applications/kbookreader/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/applications/kbookreader/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/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/maverick/applications/kcpuload/debian/cdbs/versions.pl b/ubuntu/maverick/applications/kcpuload/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/applications/kcpuload/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/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/maverick/applications/kdbusnotification/debian/cdbs/versions.pl b/ubuntu/maverick/applications/kdbusnotification/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/applications/kdbusnotification/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/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/maverick/applications/kde-style-qtcurve/debian/cdbs/versions.pl b/ubuntu/maverick/applications/kde-style-qtcurve/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/applications/kde-style-qtcurve/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/applications/kde-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/maverick/applications/kde-systemsettings/debian/cdbs/versions.pl b/ubuntu/maverick/applications/kde-systemsettings/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/applications/kde-systemsettings/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/applications/kde-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/maverick/applications/kdesudo/debian/cdbs/versions.pl b/ubuntu/maverick/applications/kdesudo/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/applications/kdesudo/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/applications/kdesudo/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/maverick/applications/kdiff3/debian/cdbs/versions.pl b/ubuntu/maverick/applications/kdiff3/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/applications/kdiff3/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/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/maverick/applications/kdirstat/debian/cdbs/versions.pl b/ubuntu/maverick/applications/kdirstat/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/applications/kdirstat/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/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/maverick/applications/kdmtheme/debian/cdbs/versions.pl b/ubuntu/maverick/applications/kdmtheme/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/applications/kdmtheme/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/applications/kdmtheme/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/maverick/applications/keep/debian/cdbs/versions.pl b/ubuntu/maverick/applications/keep/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/applications/keep/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/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/maverick/applications/kerry/debian/cdbs/versions.pl b/ubuntu/maverick/applications/kerry/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/applications/kerry/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/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/maverick/applications/kgtk-qt3/debian/cdbs/versions.pl b/ubuntu/maverick/applications/kgtk-qt3/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/applications/kgtk-qt3/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/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/maverick/applications/kile/debian/cdbs/versions.pl b/ubuntu/maverick/applications/kile/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/applications/kile/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/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/maverick/applications/kio-apt/debian/cdbs/versions.pl b/ubuntu/maverick/applications/kio-apt/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/applications/kio-apt/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/applications/kio-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/maverick/applications/kio-locate/debian/cdbs/versions.pl b/ubuntu/maverick/applications/kio-locate/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/applications/kio-locate/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/applications/kio-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/maverick/applications/kio-umountwrapper/debian/cdbs/versions.pl b/ubuntu/maverick/applications/kio-umountwrapper/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/applications/kio-umountwrapper/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/applications/kio-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/maverick/applications/kiosktool/debian/cdbs/versions.pl b/ubuntu/maverick/applications/kiosktool/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/applications/kiosktool/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/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/maverick/applications/kmplayer/debian/cdbs/versions.pl b/ubuntu/maverick/applications/kmplayer/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/applications/kmplayer/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/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/maverick/applications/kmymoney/debian/cdbs/versions.pl b/ubuntu/maverick/applications/kmymoney/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/applications/kmymoney/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/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/maverick/applications/knemo/debian/cdbs/versions.pl b/ubuntu/maverick/applications/knemo/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/applications/knemo/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/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/maverick/applications/knetstats/debian/cdbs/versions.pl b/ubuntu/maverick/applications/knetstats/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/applications/knetstats/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/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/maverick/applications/knetworkmanager.cmake/debian/cdbs/versions.pl b/ubuntu/maverick/applications/knetworkmanager.cmake/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/applications/knetworkmanager.cmake/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/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/maverick/applications/knetworkmanager8/debian/cdbs/versions.pl b/ubuntu/maverick/applications/knetworkmanager8/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/applications/knetworkmanager8/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/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/maverick/applications/koffice/debian/cdbs/versions.pl b/ubuntu/maverick/applications/koffice/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/applications/koffice/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/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/maverick/applications/konversation/debian/cdbs/versions.pl b/ubuntu/maverick/applications/konversation/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/applications/konversation/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/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/maverick/applications/kopete-otr/debian/cdbs/versions.pl b/ubuntu/maverick/applications/kopete-otr/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/applications/kopete-otr/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/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/maverick/applications/kpilot/debian/cdbs/versions.pl b/ubuntu/maverick/applications/kpilot/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/applications/kpilot/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/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/maverick/applications/kpowersave.cmake/debian/cdbs/versions.pl b/ubuntu/maverick/applications/kpowersave.cmake/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/applications/kpowersave.cmake/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/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/maverick/applications/kpowersave/debian/cdbs/versions.pl b/ubuntu/maverick/applications/kpowersave/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/applications/kpowersave/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/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/maverick/applications/krename/debian/cdbs/versions.pl b/ubuntu/maverick/applications/krename/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/applications/krename/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/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/maverick/applications/krusader/debian/cdbs/versions.pl b/ubuntu/maverick/applications/krusader/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/applications/krusader/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/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/maverick/applications/ksystemlog/debian/cdbs/versions.pl b/ubuntu/maverick/applications/ksystemlog/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/applications/ksystemlog/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/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/maverick/applications/ktorrent/debian/cdbs/versions.pl b/ubuntu/maverick/applications/ktorrent/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/applications/ktorrent/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/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/maverick/applications/kuickshow/debian/cdbs/versions.pl b/ubuntu/maverick/applications/kuickshow/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/applications/kuickshow/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/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/maverick/applications/kvkbd/debian/cdbs/versions.pl b/ubuntu/maverick/applications/kvkbd/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/applications/kvkbd/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/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/maverick/applications/kwin-style-crystal/debian/cdbs/versions.pl b/ubuntu/maverick/applications/kwin-style-crystal/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/applications/kwin-style-crystal/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/applications/kwin-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/maverick/applications/smb4k/debian/cdbs/versions.pl b/ubuntu/maverick/applications/smb4k/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/applications/smb4k/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/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/maverick/applications/soundkonverter/debian/cdbs/versions.pl b/ubuntu/maverick/applications/soundkonverter/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/applications/soundkonverter/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/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/maverick/applications/wlassistant/debian/cdbs/versions.pl b/ubuntu/maverick/applications/wlassistant/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/applications/wlassistant/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/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/maverick/applications/yakuake/debian/cdbs/versions.pl b/ubuntu/maverick/applications/yakuake/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/applications/yakuake/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/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/maverick/dependencies/arts/debian/cdbs/versions.pl b/ubuntu/maverick/dependencies/arts/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/dependencies/arts/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/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/maverick/kdeaccessibility/debian/cdbs/versions.pl b/ubuntu/maverick/kdeaccessibility/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/kdeaccessibility/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/kdeaccessibility/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/maverick/kdeaddons/debian/cdbs/versions.pl b/ubuntu/maverick/kdeaddons/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/kdeaddons/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/kdeaddons/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/maverick/kdeadmin/debian/cdbs/versions.pl b/ubuntu/maverick/kdeadmin/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/kdeadmin/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/kdeadmin/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/maverick/kdeartwork/debian/cdbs/versions.pl b/ubuntu/maverick/kdeartwork/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/kdeartwork/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/kdeartwork/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/maverick/kdebase/debian/cdbs/versions.pl b/ubuntu/maverick/kdebase/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/kdebase/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/kdebase/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/maverick/kdebindings/debian/cdbs/versions.pl b/ubuntu/maverick/kdebindings/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/kdebindings/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/kdebindings/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/maverick/kdeedu/debian/cdbs/versions.pl b/ubuntu/maverick/kdeedu/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/kdeedu/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/kdeedu/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/maverick/kdegames/debian/cdbs/versions.pl b/ubuntu/maverick/kdegames/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/kdegames/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/kdegames/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/maverick/kdegraphics.automake/debian/cdbs/versions.pl b/ubuntu/maverick/kdegraphics.automake/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/kdegraphics.automake/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/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/maverick/kdegraphics/debian/cdbs/versions.pl b/ubuntu/maverick/kdegraphics/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/kdegraphics/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/kdegraphics/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/maverick/kdelibs/debian/cdbs/versions.pl b/ubuntu/maverick/kdelibs/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/kdelibs/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/kdelibs/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/maverick/kdemultimedia/debian/cdbs/versions.pl b/ubuntu/maverick/kdemultimedia/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/kdemultimedia/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/kdemultimedia/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/maverick/kdenetwork/debian/cdbs/versions.pl b/ubuntu/maverick/kdenetwork/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/kdenetwork/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/kdenetwork/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/maverick/kdepim/debian/cdbs/versions.pl b/ubuntu/maverick/kdepim/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/kdepim/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/kdepim/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/maverick/kdesdk/debian/cdbs/versions.pl b/ubuntu/maverick/kdesdk/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/kdesdk/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/kdesdk/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/maverick/kdetoys/debian/cdbs/versions.pl b/ubuntu/maverick/kdetoys/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/kdetoys/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/kdetoys/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/maverick/kdeutils/debian/cdbs/versions.pl b/ubuntu/maverick/kdeutils/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/kdeutils/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/kdeutils/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/maverick/kdevelop.cmake/debian/cdbs/versions.pl b/ubuntu/maverick/kdevelop.cmake/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/kdevelop.cmake/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/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/maverick/kdevelop/debian/cdbs/versions.pl b/ubuntu/maverick/kdevelop/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/kdevelop/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/kdevelop/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/maverick/kdewebdev/debian/cdbs/versions.pl b/ubuntu/maverick/kdewebdev/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/kdewebdev/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/kdewebdev/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/maverick/libraries/kipi-plugins/debian/cdbs/versions.pl b/ubuntu/maverick/libraries/kipi-plugins/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/libraries/kipi-plugins/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/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/maverick/libraries/libkdcraw/debian/cdbs/versions.pl b/ubuntu/maverick/libraries/libkdcraw/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/libraries/libkdcraw/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/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/maverick/libraries/libkexiv2/debian/cdbs/versions.pl b/ubuntu/maverick/libraries/libkexiv2/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/libraries/libkexiv2/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/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/maverick/libraries/libkipi/debian/cdbs/versions.pl b/ubuntu/maverick/libraries/libkipi/debian/cdbs/versions.pl
index 9ce11d8a3..75c9add4b 100644
--- a/ubuntu/maverick/libraries/libkipi/debian/cdbs/versions.pl
+++ b/ubuntu/maverick/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;