File otcl.spec of Package otcl
#
# spec file for package otcl
#
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: otcl
Version: 1.14
Release: 0
Summary: The OTcl Programming Language
License: MIT
Group: System/Libraries
Url: http://otcl-tclcl.sourceforge.net/
Source0: http://downloads.sourceforge.net/project/otcl-tclcl/OTcl/%{version}/otcl-src-%{version}.tar.gz
Patch0: otcl-tcl_detection.patch
Patch1: otcl-DESTDIR.patch
Patch2: otcl-no_static.patch
Patch3: otcl-install.patch
Patch4: otcl-1.14-linking.patch
Patch5: otcl-1.14-no_x11.patch
BuildRequires: tcl-devel
BuildRequires: tk-devel
#BuildRequires: xorg-x11-Xvfb
%define myversion %(echo %{version} | sed 's/\\./_/g')
%description
The OTcl Programming Language.
%package -n libotcl-%{myversion}
Summary: The OTcl Programming Language
Group: System/Libraries
%description -n libotcl-%{myversion}
The OTcl Programming Language.
%package -n libotcl-devel
Summary: Headers to program against libotcl
Group: Development/Languages/C and C++
Requires: libotcl-%{myversion} = %{version}
%description -n libotcl-devel
Headers to program against libotcl.
%prep
%setup -q
%patch0
%patch1
%patch2
%patch3
%patch4
%patch5
%build
%configure
make %{?_smp_mflags}
%install
%make_install
# It fails
#%%check
#export DISPLAY=":98"
#Xvfb "$DISPLAY" >& Xvfb.log &
#trap "kill $! || true" EXIT
#sleep 10
#make test
%post -n libotcl-%{myversion} -p /sbin/ldconfig
%postun -n libotcl-%{myversion} -p /sbin/ldconfig
%files
%defattr(0644, root, root, 0755)
%doc CHANGES.html README.html
%attr(0755, root, root) %{_bindir}/owish
%attr(0755, root, root) %{_bindir}/otclsh
%files -n libotcl-%{myversion}
%defattr(0644, root, root, 0755)
%{_libdir}/libotcl-%{version}.so
%files -n libotcl-devel
%defattr(0644, root, root, 0755)
%doc doc/autoload.html doc/capi.html doc/class.html doc/object.html doc/otcl-paper.ps.gz doc/tutorial.html
%{_libdir}/libotcl.so
%{_includedir}/otcl.h
%changelog