%define majorver 8.6 %define minorver %{majorver}.14 #define patchver 1 %define libname %mklibname %{name} %{majorver} %define develname %mklibname %{name} -d Name: tk Epoch: 1 Version: %{minorver}%{?patchver:.%{patchver}} Release: %mkrel 1 Summary: The graphical toolkit for the Tcl scripting language License: TCL Group: Development/Other URL: https://tcl.sourceforge.net/ Source0: https://downloads.sourceforge.net/tcl/%{name}%{version}-src.tar.gz Patch1: tk-8.6.1-make.patch Patch2: tk-8.6.12-conf.patch BuildRequires: autoconf BuildRequires: pkgconfig(tcl) = %{minorver} BuildRequires: pkgconfig(x11) BuildRequires: pkgconfig(xft) BuildRequires: pkgconfig(xscrnsaver) Requires: tcl = %{epoch}:%{minorver} %description When paired with the Tcl scripting language, Tk provides a fast and powerful way to create cross-platform GUI applications. %package -n %{libname} Summary: Shared libraries for %{name} Group: System/Libraries %description -n %{libname} When paired with the Tcl scripting language, Tk provides a fast and powerful way to create cross-platform GUI applications. %package -n %{develname} Summary: Tk graphical toolkit development files Group: Development/Other Requires: %{name} = %{epoch}:%{version}-%{release} Requires: %{libname} = %{epoch}:%{version}-%{release} Provides: %{name}-devel = %{epoch}:%{version}-%{release} %description -n %{develname} When paired with the Tcl scripting language, Tk provides a fast and powerful way to create cross-platform GUI applications. The package contains the development files and man pages for tk. %prep %setup -q -n %{name}%{minorver} %autopatch -p1 %build cd unix autoconf %configure --enable-threads %make_build \ CFLAGS="%{optflags}" TK_LIBRARY=%{_datadir}/%{name}%{majorver} %install %make_install -C unix \ TK_LIBRARY=%{_datadir}/%{name}%{majorver} ln -s wish%{majorver} %{buildroot}%{_bindir}/wish # for linking with -l%%{name} ln -s lib%{name}%{majorver}.so %{buildroot}%{_libdir}/lib%{name}.so mkdir -p %{buildroot}%{_includedir}/%{name}-private/{generic/ttk,unix} find generic unix -name "*.h" -exec cp -p '{}' %{buildroot}%{_includedir}/%{name}-private/'{}' ';' ( cd %{buildroot}%{_includedir} for i in *.h ; do [ -f %{buildroot}%{_includedir}/%{name}-private/generic/$i ] && ln -sf ../../$i %{buildroot}%{_includedir}/%{name}-private/generic ; done ) # remove buildroot traces sed -i -e "s|$PWD/unix|%{_libdir}|; s|$PWD|%{_includedir}/%{name}-private|" %{buildroot}%{_libdir}/%{name}Config.sh %files %doc README.md changes license.terms %{_bindir}/wish* %{_datadir}/%{name}%{majorver} %exclude %{_datadir}/%{name}%{majorver}/tkAppInit.c %{_libdir}/%{name}%{majorver} %{_mandir}/man1/* %{_mandir}/mann/* %files -n %{libname} %{_libdir}/lib%{name}%{majorver}.so %files -n %{develname} %{_includedir}/* %{_libdir}/lib%{name}.so %{_libdir}/lib%{name}stub%{majorver}.a %{_libdir}/%{name}Config.sh %{_libdir}/pkgconfig/%{name}.pc %{_mandir}/man3/* %{_datadir}/%{name}%{majorver}/tkAppInit.c