Name: tk-html1
Version: 1.04
Release: 1%{?dist}
Summary: HTML/CSS rendering widget for Tk
License: GPL-2.0-only
URL: https://github.com/SAOImageDS9/tkhtml1
Source0: https://github.com/SAOImageDS9/tkhtml1/archive/refs/tags/v%{version}/tkhtml1-%{version}.tar.gz
BuildRequires: gcc
BuildRequires: make
BuildRequires: tcl8-devel
BuildRequires: tk8-devel
Requires: tcl(abi) = 8.6
%description
Tkhtml1 is a Tk widget that displays content formatted according to the
HTML and CSS standards. It is not an end-user application; it is meant
for Tcl programmers who want to embed a lightweight HTML/CSS
implementation in their own applications.
This is one of the extra Tcl/Tk packages that SAOImage DS9 bundles
in-tree (DS9's own help browser uses it); this build lets DS9 use a
system-installed tk-html1 instead. Upstream has moved to the
SAOImageDS9 GitHub organization, which now maintains this widget
specifically for DS9's use.
%prep
%autosetup -n tkhtml1-%{version}
%build
%configure --libdir=%{_libdir}/tcltk --with-tcl=%{_libdir}/tcl8.6 --with-tk=%{_libdir} --enable-symbols
%make_build
%install
%make_install
# TEA installs the module mode 644, which rpm's debuginfo extraction skips: 'Empty %files file
# debugsourcefiles.list'. Shared objects are 755 anyway.
find %{buildroot} -name '*.so' -exec chmod 755 {} +
find %{buildroot} -name '*.a' -delete
# Contains build-time paths that won't work on end-user systems.
find %{buildroot} -name 'tkhtml1Config.sh' -delete
%files
%license LICENSE
%doc README.md
%{_libdir}/tcltk/tkhtml11.0/
%changelog
* Wed Aug 26 2026 Morgan Hough - 1.04-1
- Initial package for the neurofedora COPR: one of the extra Tcl/Tk
packages SAOImage DS9 bundles in-tree, now maintained upstream at
github.com/SAOImageDS9/tkhtml1 (used by Debian's saods9 packaging
too).