diff --git a/tcl.spec b/tcl.spec index 8da3847..6d23102 100644 --- a/tcl.spec +++ b/tcl.spec @@ -3,18 +3,19 @@ Summary: Tcl scripting language development environment Name: tcl Version: %{majorver}.5 -Release: 3 +Release: 6 License: BSD Group: Development/Languages URL: http://tcl.sourceforge.net/ Source0: http://prdownloads.sourceforge.net/tcl/%{name}%{version}-src.tar.gz Source1: http://prdownloads.sourceforge.net/tcl/%{name}%{version}-html.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root -Buildrequires: autoconf213 +Buildrequires: autoconf Patch1: tcl-8.3.5-tclm4-soname.patch Patch2: tcl-8.4.5-lib-perm.patch Patch3: tcl8.3.5-tclConfig-package-path-90160.patch Patch4: tcl-8.4.5-no_rpath.patch +Patch5: tcl-8.4.5-autoconf.patch %description The Tcl (Tool Command Language) provides a powerful platform for @@ -30,7 +31,7 @@ Version: %{version} Summary: Tcl scripting language development environment Group: Development/Languages URL: http://tcl.sourceforge.net/ -Requires: tcl = %{version}-%{release} +Requires: %{name} = %{version}-%{release} %description devel The Tcl (Tool Command Language) provides a powerful platform for @@ -62,30 +63,49 @@ This package contains the html manual. %patch2 -p1 -b .ro-lib %patch3 -p1 -b .pkgpath %patch4 -p1 -b .no_rpath +%patch5 -p1 -b .ac213 + # patch1 touches tcl.m4, and patch3 touches configure.in cd unix -autoconf-2.13 +autoconf %build cd unix %configure -make %{?_smp_mflags} TCL_LIBRARY=%{_datadir}/tcl%{majorver} +make %{?_smp_mflags} TCL_LIBRARY=%{_datadir}/%{name}%{majorver} + +# run "make test" by default +%{?_without_check: %define _without_check 1} +%{!?_without_check: %define _without_check 0} + +%if ! %{_without_check} + make test +%endif %install rm -rf $RPM_BUILD_ROOT -make install -C unix INSTALL_ROOT=%{buildroot} TCL_LIBRARY=%{_datadir}/tcl%{majorver} +make install -C unix INSTALL_ROOT=%{buildroot} TCL_LIBRARY=%{_datadir}/%{name}%{majorver} ln -s tclsh%{majorver} %{buildroot}%{_bindir}/tclsh -# for linking with -ltcl -ln -s libtcl%{majorver}.so %{buildroot}%{_libdir}/libtcl.so +# for linking with -l%{name} +ln -s lib%{name}%{majorver}.so %{buildroot}%{_libdir}/lib%{name}.so -mkdirhier %buildroot/%{_includedir}/tcl-private/{generic,unix} -cp -p generic/tcl{Int,IntDecls,IntPlatDecls,Math,Port}.h %buildroot/%{_includedir}/tcl-private/generic -cp -p unix/tclUnixPort.h %buildroot/%{_includedir}/tcl-private/unix +# backward compatible symlink for legacy tcl packages that hardcode lib path +# to prefix/lib/%{name}%{majorver} +mkdir -p %{buildroot}%{_prefix}/lib +ln -s %{_datadir}/%{name}%{majorver} %{buildroot}%{_prefix}/lib/%{name}%{majorver} + +mkdir -p %buildroot/%{_includedir}/%{name}-private/{generic,unix} +find generic unix -name "*.h" -exec cp -p '{}' %buildroot/%{_includedir}/%{name}-private/'{}' ';' +( cd %buildroot/%{_includedir} + for i in *.h ; do + [ -f %buildroot/%{_includedir}/%{name}-private/generic/$i ] && ln -sf ../../$i %buildroot/%{_includedir}/%{name}-private/generic ; + done +) # remove buildroot traces -perl -pi -e "s|$PWD/unix|%{_libdir}|; s|$PWD|%{_includedir}/tcl-private|" %buildroot/%{_libdir}/tclConfig.sh +perl -pi -e "s|$PWD/unix|%{_libdir}|; s|$PWD|%{_includedir}/%{name}-private|" %buildroot/%{_libdir}/%{name}Config.sh %clean rm -rf $RPM_BUILD_ROOT @@ -99,17 +119,19 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) %{_bindir}/tclsh* -%{_datadir}/tcl%{majorver} -%{_libdir}/libtcl%{majorver}.so -%{_libdir}/tclConfig.sh +%{_datadir}/%{name}%{majorver} +%{_libdir}/lib%{name}%{majorver}.so +%{_libdir}/%{name}Config.sh %{_mandir}/man1/* -%doc +# this should be prefix/lib +%{_prefix}/lib/%{name}%{majorver} +%doc README changes license.terms %files devel %defattr(-,root,root) %{_includedir}/* -%{_libdir}/libtclstub%{majorver}.a -%{_libdir}/libtcl.so +%{_libdir}/lib%{name}stub%{majorver}.a +%{_libdir}/lib%{name}.so %{_mandir}/man3/* %{_mandir}/mann/* @@ -118,6 +140,26 @@ rm -rf $RPM_BUILD_ROOT %doc html/* %changelog +* Wed Mar 10 2004 Jens Petersen - 8.4.5-6 +- apply tcl-8.4.5-autoconf.patch to build with autoconf 2.5x + (Robert Scheck, #116773) +- use %%{name} more extensively for script portability +- run "make test" by default when building (can be disabled with + "--without check") +- add a backwards compatible symlink %{_prefix}/lib/tk8.4 -> + %{_datadir}/tk8.4 (Michal Jaegermann, part of #90160) +- use "mkdir -p" instead of "mkdirhier" (Robert Scheck, #116771) +- include some doc files + +* Tue Mar 02 2004 Elliot Lee - 8.4.5-5.1 +- rebuilt + +* Fri Feb 13 2004 Elliot Lee - 8.4.5-5 +- rebuilt + +* Mon Feb 2 2004 Jens Petersen - 8.4.5-4 +- include all private .h files under %{_includedir}/tcl-private + * Mon Dec 1 2003 Thomas Woerner 8.4.5-3 - removed rpath (patch 4) @@ -125,6 +167,7 @@ rm -rf $RPM_BUILD_ROOT - put private header files under generic and unix subdirs - include real generic/tclPort.h not just a symlink to tclUnixPort.h - add tclMath.h to %{_includedir}/tcl-private/generic for building tk +- remove build remnants from tclConfig.sh * Thu Nov 27 2003 Jens Petersen - 8.4.5-1 - new package split out from tcltk @@ -135,8 +178,6 @@ rm -rf $RPM_BUILD_ROOT - filtered changelog for tcl - buildrequire autoconf213 (#110583) [mvd@mylinux.com.ua] -* Wed Oct 15 2003 Jens Petersen - 8.3.5-93 - * Wed Sep 17 2003 Matt Wilson 8.3.5-92 - rebuild again for #91211