-# current: http://www.cmake.org/files/v2.0/cmake-2.0.2.tar.gz
-Source0: CMake%{version}-src-unix.tar.bz2
-Patch0: cmake-ncurses.patch
-URL: http://www.cmake.org/HTML/Index.html
+Source0: http://www.cmake.org/files/v2.8/%{name}-%{version}.tar.gz
+# Source0-md5: 8c967d5264657a798f22ee23976ff0d9
+Patch0: %{name}-lib64.patch
+Patch1: %{name}-tinfo.patch
+URL: http://www.cmake.org/
+%{?with_gui:BuildRequires: QtGui-devel}
+BuildRequires: libstdc++-devel
+BuildRequires: ncurses-devel
+%{?with_gui:BuildRequires: qt4-build}
+%{?with_gui:BuildRequires: qt4-qmake}
+BuildRequires: rpmbuild(macros) >= 1.167
+%{!?with_bootstrap:BuildRequires: xmlrpc-c-devel >= 1.4.12-2}