--- /dev/null
+%define gmpver 6.1.1
+%define guilevers 2.0
+%define guilesubvers 14
+
+Name: guile
+BuildRequires: libgc-devel
+BuildRequires: libffi-devel
+BuildRequires: libltdl-devel
+BuildRequires: libunistring-devel
+BuildRequires: pkg-config
+BuildRequires: readline-devel
+BuildRequires: glibc-extra
+BuildRequires: glibc-i18ndata
+BuildRequires: flex gettext-tools gettext-runtime glibc-locale
+Requires: glibc-locale
+BuildRequires: gdb
+BuildRequires: makeinfo
+Version: %{guilevers}.%{guilesubvers}
+Release: 0
+Summary: GNU's Ubiquitous Intelligent Language for Extension
+License: GFDL-1.3 and GPL-3.0+ and LGPL-3.0+
+Group: Development/Languages/Scheme
+Url: http://www.gnu.org/software/guile/
+Source0: %{name}-%{version}.tar.gz
+Source1: gmp-%{gmpver}.tar.bz2
+Source1001: %{name}.manifest
+
+%description
+This is Guile, a portable, embeddable Scheme implementation written in
+C. Guile provides a machine independent execution platform that can be
+linked in as a library when building extensible programs.
+
+%package -n libguile
+Summary: GNU's Ubiquitous Intelligent Language for Extension
+License: GFDL-1.3 and GPL-3.0+ and LGPL-3.0+
+Group: Development/Languages/Scheme
+Requires: %{name}-modules >= %{version}
+
+%description -n libguile
+This is Guile, a portable, embeddable Scheme implementation written in
+C. Guile provides a machine independent execution platform that can be
+linked in as a library when building extensible programs. This package
+contains the shared libraries.
+
+%package modules
+Summary: GNU's Ubiquitous Intelligent Language for Extension
+License: GFDL-1.3 and GPL-3.0+ and LGPL-3.0+
+Group: Development/Languages/Scheme
+
+%description modules
+This is Guile, a portable, embeddable Scheme implementation written in
+C. Guile provides a machine independent execution platform that can be
+linked in as a library when building extensible programs. This package
+contains guile modules.
+
+%package -n libguilereadline
+Summary: GNU's Ubiquitous Intelligent Language for Extension
+License: GFDL-1.3 and GPL-3.0+ and LGPL-3.0+
+Group: Development/Languages/Scheme
+
+%description -n libguilereadline
+This is Guile, a portable, embeddable Scheme implementation written in
+C. Guile provides a machine independent execution platform that can be
+linked in as a library when building extensible programs. This package
+contains the shared libraries.
+
+%package devel
+Summary: GNU's Ubiquitous Intelligent Language for Extension
+License: LGPL-2.1+
+Group: Development/Languages/Scheme
+Requires: libgc-devel
+Requires: gmp-devel
+Requires: libffi-devel
+Requires: libunistring-devel
+Requires: ncurses-devel
+Requires: readline-devel
+# following Requires needed because /usr/bin/guile-config needs /usr/bin/guile
+Requires: guile = %{version}
+Requires: libguile = %{version}
+Requires: libguilereadline = %{version}
+
+%description devel
+This is Guile, a portable, embeddable Scheme implementation written in
+C. Guile provides a machine independent execution platform that can be
+linked in as a library when building extensible programs.
+
+%prep
+%setup -q
+cp %{SOURCE1001} .
+tar xfvj %{SOURCE1}
+
+%build
+pushd gmp-%{gmpver}
+%reconfigure \
+ --enable-static \
+ --with-pic \
+ --prefix="%{_builddir}/gmp-install" \
+ --disable-shared
+
+%{__make} %{?_smp_mflags}
+%{__make} install DESTDIR=%{_builddir}/gmp-install
+popd
+
+%reconfigure \
+ --disable-static --enable-shared --with-pic \
+ --disable-silent-rules \
+ --with-libgmp-prefix="%{_builddir}/gmp-install/%{_prefix}" \
+ PACKAGE_VERSION=%{version}
+
+%{__make} %{?_smp_mflags}
+
+%check
+#LD_LIBRARY_PATH="." make check
+
+%install
+make install DESTDIR=$RPM_BUILD_ROOT
+mkdir -p $RPM_BUILD_ROOT%{_datadir}/guile/site
+find %{buildroot}%{_libdir} -type f -name '*.la' -delete -print
+
+%post -n libguile -p /sbin/ldconfig
+
+%postun -n libguile -p /sbin/ldconfig
+
+%post -n libguilereadline -p /sbin/ldconfig
+
+%postun -n libguilereadline -p /sbin/ldconfig
+
+%files
+%defattr(-,root,root)
+%manifest %{name}.manifest
+%doc ABOUT-NLS AUTHORS COPYING* ChangeLog GUILE-VERSION HACKING
+%doc LICENSE NEWS README THANKS
+%{_bindir}/guile-tools
+%{_bindir}/guild
+%{_bindir}/guile
+%{_mandir}/man1/guile.1.gz
+
+%files -n libguile
+%defattr(-,root,root)
+%manifest %{name}.manifest
+%{_libdir}/libguile-*
+
+%files modules
+%defattr(-,root,root)
+%manifest %{name}.manifest
+%{_libdir}/%{name}
+%{_datadir}/%{name}
+
+%files -n libguilereadline
+%defattr(-,root,root)
+%manifest %{name}.manifest
+%{_libdir}/libguilereadline-v-*
+
+%files devel
+%defattr(-,root,root)
+%manifest %{name}.manifest
+%{_bindir}/guile-snarf
+%{_bindir}/guile-config
+%dir %{_includedir}/%{name}
+%dir %{_includedir}/%{name}/%{guilevers}
+%{_includedir}/%{name}/%{guilevers}/*
+%{_datadir}/aclocal/guile.m4
+%doc %{_infodir}/%{name}.info.gz
+%doc %{_infodir}/%{name}.info-[0-9].gz
+%doc %{_infodir}/%{name}.info-1[0-9].gz
+%doc %{_infodir}/r5rs.info.gz
+%{_libdir}/libguile-%{guilevers}.so
+%{_libdir}/pkgconfig/guile-%{guilevers}.pc