-Source0: ftp://ftp.sourceforge.net/pub/sourceforge/%{name}/%{name}-%{version}.tar.bz2
-URL: http://fribi.sf.net/
-BuildRequires: autoconf
-BuildRequires: automake
-BuildRequires: libtool
-BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+Source0: http://fribidi.org/download/%{name}-%{version}.tar.bz2
+# Source0-md5: ce93d862344991173dabb609bf93ca1d
+Patch0: format-security.patch
+URL: http://fribidi.freedesktop.org/
+BuildRequires: autoconf >= 2.64
+BuildRequires: automake >= 1:1.11.1
+%{?with_glib:BuildRequires: glib2-devel >= 1:2.4}
+BuildRequires: libtool >= 2:2.2
+BuildRequires: pkgconfig
+%{?with_glib:Requires: glib2 >= 1:2.4}