File mingw64-tcl.spec of Package mingw64-tcl
#
# spec file for package mingw64-tcl
#
# Copyright (c) 2014 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/
#
%define majorver1 8
%define majorver2 6
%define majorver %{majorver1}.%{majorver2}
%define vers %{majorver}.12
%define name1 tcl
Name: mingw64-%{name1}
Version: %{vers}
Release: 0
Summary: The Tcl Programming Language
License: TCL
Group: Development/Languages
Url: http://tcl.sourceforge.net/
Source0: http://downloads.sourceforge.net/sourceforge/tcl/%{name1}%{version}-src.tar.gz
Source1000: %{name}-rpmlintrc
Patch0: tcl.patch
#!BuildIgnore: post-build-checks
BuildRequires: autoconf
BuildRequires: file
BuildRequires: m4
BuildRequires: mingw64-cross-binutils
BuildRequires: mingw64-cross-gcc
BuildRequires: mingw64-filesystem >= 23
BuildRequires: net-tools
BuildRequires: tcl
%_mingw64_package_header_debug
BuildArch: noarch
%description
Tcl (Tool Command Language) is a very powerful but easy to learn
dynamic programming language, suitable for a very wide range of uses,
including web and desktop applications, networking, administration,
testing and many more. Open source and business-friendly, Tcl is a
mature yet evolving language that is truly cross platform, easily
deployed and highly extensible.
For more information on Tcl see http://www.tcl.tk and
http://wiki.tcl.tk .
%package devel
Summary: Header Files and C API Documentation for Tcl
License: BSD-3-Clause
Group: Development/Libraries/Tcl
%description devel
This package contains header files and documentation needed for writing
Tcl extensions in compiled languages like C, C++, etc., or for
embedding the Tcl interpreter in programs written in such languages.
This package is not needed for writing extensions or applications in
the Tcl language itself.
%_mingw64_debug_package
%prep
%setup -q -n %{name1}%{version}
chmod -x generic/tclThreadAlloc.c
%patch -P 0
%build
pushd win
autoconf
%{_mingw64_configure} --disable-threads --enable-shared
# builds fail sometimes with %{?_smp_mflags}, so don't use
make TCL_LIBRARY=%{_mingw64_datadir}/%{name1}%{majorver}
popd
%install
make install -C win INSTALL_ROOT=%{buildroot} TCL_LIBRARY=%{_mingw64_datadir}/%{name1}%{majorver}
cp %{buildroot}%{_mingw64_bindir}/tclsh%{majorver1}%{majorver2}.exe %{buildroot}%{_mingw64_bindir}/tclsh.exe
# for linking with -lib%{name1}
cp %{buildroot}%{_mingw64_libdir}/lib%{name1}%{majorver1}%{majorver2}.dll.a %{buildroot}%{_mingw64_libdir}/lib%{name1}.dll.a
mkdir -p %{buildroot}/%{_mingw64_libdir}/%{name1}%{majorver}
mkdir -p %{buildroot}/%{_mingw64_includedir}/%{name1}-private/{generic,win}
find generic win -name "*.h" -exec cp -p '{}' %{buildroot}/%{_mingw64_includedir}/%{name1}-private/'{}' ';'
( cd %{buildroot}/%{_mingw64_includedir}
for i in *.h ; do
[ -f %{buildroot}/%{_mingw64_includedir}/%{name1}-private/generic/$i ] && ln -sf ../../$i %{buildroot}/%{_mingw64_includedir}/%{name1}-private/generic ;
done
) || true
# fix executable bits
chmod a-x %{buildroot}/%{_mingw64_datadir}/%{name1}%{majorver}/encoding/*.enc
chmod a-x %{buildroot}/%{_mingw64_libdir}/*/pkgIndex.tcl
# remove buildroot traces
sed -i -e "s|$PWD/win|%{_mingw64_libdir}|" %{buildroot}/%{_mingw64_libdir}/%{name1}Config.sh
sed -i -e "s|$PWD|%{_mingw64_includedir}/%{name1}-private|" %{buildroot}/%{_mingw64_libdir}/%{name1}Config.sh
sed -i -e "s|lib%{name1}%{majorver1}%{majorver2}\.a|lib%{name1}%{majorver1}%{majorver2}\.dll\.a|" %{buildroot}/%{_mingw64_libdir}/%{name1}Config.sh
rm -rf %{buildroot}/%{_mingw64_datadir}/%{name1}%{majorver}/ldAix
%files
%defattr(-,root,root,-)
%{_mingw64_bindir}/%{name1}sh.exe
%{_mingw64_bindir}/%{name1}sh%{majorver1}%{majorver2}.exe
%{_mingw64_bindir}/sqlite3_analyzer
%{_mingw64_bindir}/%{name1}*.dll
%{_mingw64_bindir}/zlib1.dll
%{_mingw64_datadir}/%{name1}%{majorver}
%{_mingw64_datadir}/%{name1}%{majorver1}
%{_mingw64_libdir}/%{name1}%{majorver}/
%{_mingw64_libdir}/dde*/
%{_mingw64_libdir}/itcl*/
%{_mingw64_libdir}/reg*/
%{_mingw64_libdir}/sqlite*/
%{_mingw64_libdir}/tcl*/
%{_mingw64_libdir}/tdb*/
%{_mingw64_libdir}/thread*/
%exclude %{_mingw64_libdir}/*/*.a
%exclude %{_mingw64_libdir}/*/*.sh
%exclude %{_mingw64_libdir}/*/*.debug
%{_mingw64_datadir}/man
%files devel
%defattr(-,root,root,-)
%{_mingw64_libdir}/lib%{name1}%{majorver1}%{majorver2}.dll.a
%{_mingw64_libdir}/lib%{name1}stub%{majorver1}%{majorver2}.a
%{_mingw64_libdir}/lib%{name1}.dll.a
%{_mingw64_libdir}/*/*.a
%{_mingw64_libdir}/*/*.sh
%{_mingw64_libdir}/*.sh
%{_mingw64_includedir}/*
%changelog