diff --git a/kf5-khtml.spec b/kf5-khtml.spec
index 52b99f4..8133bbc 100644
--- a/kf5-khtml.spec
+++ b/kf5-khtml.spec
@@ -1,5 +1,4 @@
%define framework khtml
-#%define snapshot 20140206
Name: kf5-%{framework}
Version: 5.4.0
@@ -8,12 +7,14 @@ Summary: KDE Frameworks 5 Tier 4 solution with KHTML, a HTML rendering en
License: LGPLv2+ and GPLv3 and MIT and BSD
URL: http://www.kde.org
-# git archive --format=tar --prefix=%{framework}-%{version}/ \
-# --remote=git://anongit.kde.org/%{framework}.git master | \
-# bzip2 -c > %{name}-%{version}-%{snapshot}git.tar.bz2
-#Source0: %{name}-%{version}-%{snapshot}git.tar.bz2
-Source0: http://download.kde.org/stable/frameworks/%{version}/portingAids/%{framework}-%{version}.tar.xz
+%global revision %(echo %{version} | cut -d. -f3)
+%if %{revision} >= 50
+%global stable unstable
+%else
+%global stable stable
+%endif
+Source0: http://download.kde.org/%{stable}/frameworks/%{version}/portingAids/%{framework}-%{version}.tar.xz
BuildRequires: fdupes
BuildRequires: giflib-devel
@@ -74,6 +75,7 @@ Requires: kf5-sonnet-devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
+
%prep
%setup -q -n %{framework}-%{version}
@@ -89,8 +91,8 @@ make %{?_smp_mflags} -C %{_target_platform}
%make_install -C %{_target_platform}
%find_lang khtml5_qt --with-qt --all-name
-%post -p /sbin/ldconfig
+%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files -f khtml5_qt.lang