File tclcl.spec of Package tclcl

#
# spec file for package tclcl
#
# 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:           tclcl
Version:        1.20
Release:        0
Summary:        Tcl/C++ interface
License:        BSD-4-Clause
Group:          System/Libraries
Url:            http://otcl-tclcl.sourceforge.net/
Source0:        http://downloads.sourceforge.net/project/otcl-tclcl/TclCL/%{version}/tclcl-src-%{version}.tar.gz
Patch0:         tclcl-tcl_detection.patch
Patch1:         tclcl-install.patch
Patch2:         tclcl-no_static.patch
Patch3:         tclcl-cflags.patch
Patch4:         tclcl-1.20-no_x.patch
BuildRequires:  gcc-c++
BuildRequires:  libotcl-devel
BuildRequires:  tcl-devel
BuildRequires:  tk-devel
%define myversion %(echo %{version} | sed 's/\\./_/g')

%description
tcl/C++ interface.

%package -n libtclcl-%{myversion}
Summary:        Libtclcl library
Group:          System/Libraries

%description -n libtclcl-%{myversion}
The libtclcl library.

%package -n libtclcl-devel
Summary:        Headers to program against libtclcl
Group:          Development/Languages/C and C++
Requires:       libtclcl-%{myversion} = %{version}

%description -n libtclcl-devel
Headers to program against libtclcl.

%prep
%setup -q
%patch0
%patch1
%patch2
%patch3
%patch4

%build
%configure
make %{?_smp_mflags}

%install
%make_install
rm -f '%{buildroot}%{_includedir}/config.h'

%post -n libtclcl-%{myversion} -p /sbin/ldconfig

%postun -n libtclcl-%{myversion} -p /sbin/ldconfig

%files
%defattr(0644, root, root, 0755)
%doc CHANGES.html README TODO.html
%attr(0755,root,root) %{_bindir}/tcl2c++

%files -n libtclcl-%{myversion}
%defattr(0644, root, root, 0755)
%{_libdir}/libtclcl-%{version}.so

%files -n libtclcl-devel
%defattr(0644, root, root, 0755)
%{_libdir}/libtclcl.so
%{_includedir}/*.h

%changelog
openSUSE Build Service is sponsored by