# We used to define this dynamically, but the Fedora buildsystem chokes on # using this for the versioned Requires on tcl(abi), so we hardcode it. # This sucks, but there is no other clean way around it, because tcl # (and tclsh) aren't in the default buildroot. %{!?tcl_version: %global tcl_version 8.6} %{!?tcl_sitearch: %global tcl_sitearch %{_libdir}/tcl%{tcl_version}} %global debug_package %{nil} %global realname cffi Name: tcl-%{realname} Version: 2.0.3 Release: %autorelease Summary: Tcl CFFI package License: BSD-2-Clause URL: https://cffi.magicsplat.com Source: https://sourceforge.net/projects/magicsplat/files/%{realname}/%{realname}%{version}-src.tar.gz BuildRequires: make BuildRequires: gcc BuildRequires: tcl-devel, libffi-devel, libuuid-devel Requires: tcl(abi) = %{tcl_version} %description A FFI provides the ability for Tcl to invoke, with some limitations, arbitrary functions from any dynamically linked shared library without having to write C code. %prep %autosetup -p1 -n %{realname}%{version} %build %configure --with-tcl=%{_libdir} --libdir=%{tcl_sitearch} --with-libffi --disable-staticffi %make_build %global dir tcl%{realname}%{version} %install %make_install make DESTDIR=%{buildroot} install-binaries install-libraries strip %{buildroot}%{tcl_sitearch}/%{dir}/lib%{realname}%{version}.so %files %{tcl_sitearch}/%{dir}/lib%{realname}%{version}.so %{tcl_sitearch}/%{dir}/pkgIndex.tcl %{tcl_sitearch}/%{dir}/README.md %{tcl_sitearch}/%{dir}/LICENSE %{_mandir}/man3/cffi*.3tcl.gz %doc README.md doc/html %license LICENSE %changelog %autochangelog