File tkhtml3.spec of Package tkhtml3

%{!?directory:%define directory /usr}

%define buildroot %{_tmppath}/%{name}

Name:          tkhtml3
Summary:       Tk HTML / CSS rendering widget
Version:       3.0
Release:       alpha16.20110119
License:       New BSD
Group:         Development/Libraries/Tcl
Source:        tkhtml3-alpha-16-20110119.tar.gz
BuildRequires: autoconf
BuildRequires: make
BuildRequires: tcl-devel >= 8.6
BuildRequires: tk-devel >= 8.6
Requires:      tcl >= 8.6
Requires:      tk >= 8.6
BuildRoot:     %{buildroot}

Tkhtml3 is a Tk widget that displays content formatted according to the
HTML and CSS standards. Tkhtml3 is not an end-user application, it is
for Tcl programmers who wish to embed a standards-compliant HTML/CSS
implementation in their applications. 

%package -n hv3
Summary:	Html Viewer 3 - Tkhtml3 Web Browser
Group:		Applications/WWW
Requires:	%{name} = %{version}-%{release}
Requires:	tcl >= 8.6
Requires:	tk
Requires:	tls
Requires:	tkimg
Requires:	tkhtml3
Provides:	wwwbrowser

%description -n hv3
Hv3 is a lightweight web browser with support for modern web standards
like HTML, CSS, HTTP and ECMAScript (a.k.a. javascript). It is based on
the Tkhtml3 HTML rendering widget and the tclsee Javascript rendering

%setup -q -n htmlwidget


./configure \
	--prefix=%{directory} \
	--exec-prefix=%{directory} \
	--libdir=%{directory}/%{_lib} \
	--mandir=%{directory}/share/man \
	--with-tcl=%{directory}/%{_lib} \
	--with-tk=%{directory}/%{_lib} \
	--enable-64bits=yes \

make DESTDIR=%{buildroot} pkglibdir=%{tcl_archdir}/%{name}%{version} install

install -d $RPM_BUILD_ROOT{%{_datadir}/hv3,%{_bindir}}
cp -a hv/*.tcl $RPM_BUILD_ROOT%{_datadir}/hv3
cp -a hv/index.html $RPM_BUILD_ROOT%{_datadir}/hv3
cat <<'EOF' > $RPM_BUILD_ROOT%{_bindir}/hv3
exec %{_bindir}/wish %{_datadir}/hv3/hv3_main.tcl -statefile ${HOME}/.hv3.db ${1:+"$@"}

rm -rf %buildroot


%files -n hv3
%doc hv/README hv/license.txt
%attr(755,root,root) %{_bindir}

* Fri Apr 28 2017 Danilo Chang <> 3.0
- Remove HV3LIB, I don't know how to handle it correctly