| 1 | %define major 8
|
|---|
| 2 | %define minor 5
|
|---|
| 3 | %define majorver %{major}.%{minor}
|
|---|
| 4 | %define vers %{majorver}.9
|
|---|
| 5 | %{!?sdt:%define sdt 0}
|
|---|
| 6 |
|
|---|
| 7 | Summary: Tool Command Language, pronounced tickle
|
|---|
| 8 | Name: tcl
|
|---|
| 9 | Version: %{vers}
|
|---|
| 10 | Release: 3%{?dist}
|
|---|
| 11 | Epoch: 1
|
|---|
| 12 | License: TCL
|
|---|
| 13 | Group: Development/Languages
|
|---|
| 14 | URL: http://tcl.sourceforge.net/
|
|---|
| 15 | Source0: http://downloads.sourceforge.net/sourceforge/tcl/tcl%{version}-src.tar.gz
|
|---|
| 16 |
|
|---|
| 17 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
|---|
| 18 |
|
|---|
| 19 | #Buildrequires: autoconf
|
|---|
| 20 | Provides: tcl(abi) = %{majorver}
|
|---|
| 21 | Obsoletes: tcl-tcldict <= %{vers}
|
|---|
| 22 | Provides: tcl-tcldict = %{vers}
|
|---|
| 23 |
|
|---|
| 24 | Patch0: tcl-os2.diff
|
|---|
| 25 |
|
|---|
| 26 | %if %sdt
|
|---|
| 27 | BuildRequires: systemtap-sdt-devel
|
|---|
| 28 | %endif
|
|---|
| 29 |
|
|---|
| 30 | %description
|
|---|
| 31 | The Tcl (Tool Command Language) provides a powerful platform for
|
|---|
| 32 | creating integration applications that tie together diverse
|
|---|
| 33 | applications, protocols, devices, and frameworks. When paired with the
|
|---|
| 34 | Tk toolkit, Tcl provides a fastest and powerful way to create
|
|---|
| 35 | cross-platform GUI applications. Tcl can also be used for a variety
|
|---|
| 36 | of web-related tasks and for creating powerful command languages for
|
|---|
| 37 | applications.
|
|---|
| 38 |
|
|---|
| 39 | %package devel
|
|---|
| 40 | Summary: Tcl scripting language development environment
|
|---|
| 41 | Group: Development/Languages
|
|---|
| 42 | Requires: %{name} = %{epoch}:%{version}-%{release}
|
|---|
| 43 |
|
|---|
| 44 | %description devel
|
|---|
| 45 | The Tcl (Tool Command Language) provides a powerful platform for
|
|---|
| 46 | creating integration applications that tie together diverse
|
|---|
| 47 | applications, protocols, devices, and frameworks. When paired with the
|
|---|
| 48 | Tk toolkit, Tcl provides a fastest and powerful way to create
|
|---|
| 49 | cross-platform GUI applications. Tcl can also be used for a variety
|
|---|
| 50 | of web-related tasks and for creating powerful command languages for
|
|---|
| 51 | applications.
|
|---|
| 52 |
|
|---|
| 53 | The package contains the development files and man pages for tcl.
|
|---|
| 54 |
|
|---|
| 55 | %package static
|
|---|
| 56 | Summary: Tcl scripting language development environment
|
|---|
| 57 | Group: Development/Languages
|
|---|
| 58 | Requires: %{name} = %{epoch}:%{version}-%{release}
|
|---|
| 59 |
|
|---|
| 60 | %description static
|
|---|
| 61 | The Tcl (Tool Command Language) provides a powerful platform for
|
|---|
| 62 | creating integration applications that tie together diverse
|
|---|
| 63 | applications, protocols, devices, and frameworks. When paired with the
|
|---|
| 64 | Tk toolkit, Tcl provides a fastest and powerful way to create
|
|---|
| 65 | cross-platform GUI applications. Tcl can also be used for a variety
|
|---|
| 66 | of web-related tasks and for creating powerful command languages for
|
|---|
| 67 | applications.
|
|---|
| 68 |
|
|---|
| 69 | The package contains the static library in aout format.
|
|---|
| 70 |
|
|---|
| 71 | %prep
|
|---|
| 72 | %setup -q -n %{name}%{version}
|
|---|
| 73 | #chmod -x generic/tclThreadAlloc.c
|
|---|
| 74 |
|
|---|
| 75 | %patch0 -p1 -b .os2~
|
|---|
| 76 |
|
|---|
| 77 | %build
|
|---|
| 78 | cd unix
|
|---|
| 79 | #autoconf
|
|---|
| 80 | export CONFIG_SITE="/@unixroot/usr/share/config.legacy"
|
|---|
| 81 | export LDFLAGS="-Zbin-files -Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
|
|---|
| 82 | export LIBS="-lurpo"
|
|---|
| 83 | %configure \
|
|---|
| 84 | %if %sdt
|
|---|
| 85 | --enable-dtrace \
|
|---|
| 86 | %endif
|
|---|
| 87 | --disable-shared --enable-static \
|
|---|
| 88 | --enable-load --enable-dll-unloading
|
|---|
| 89 |
|
|---|
| 90 | make %{?_smp_mflags} TCL_LIBRARY=%{_datadir}/%{name}%{majorver}
|
|---|
| 91 |
|
|---|
| 92 | #%check
|
|---|
| 93 | # don't run "make test" by default
|
|---|
| 94 | #%{?_without_check: %define _without_check 0}
|
|---|
| 95 | #%{!?_without_check: %define _without_check 1}
|
|---|
| 96 | #%if ! %{_without_check}
|
|---|
| 97 | # make test
|
|---|
| 98 | #%endif
|
|---|
| 99 |
|
|---|
| 100 | %install
|
|---|
| 101 | rm -rf $RPM_BUILD_ROOT
|
|---|
| 102 | make install -C unix INSTALL_ROOT=$RPM_BUILD_ROOT TCL_LIBRARY=%{_datadir}/%{name}%{majorver}
|
|---|
| 103 |
|
|---|
| 104 | cp $RPM_BUILD_ROOT%{_bindir}/tclsh%{majorver}.exe $RPM_BUILD_ROOT%{_bindir}/tclsh.exe
|
|---|
| 105 | cp unix/tcl*.dll $RPM_BUILD_ROOT%{_libdir}
|
|---|
| 106 | cp unix/libtcl%{majorver}_s.a $RPM_BUILD_ROOT%{_libdir}
|
|---|
| 107 |
|
|---|
| 108 | # for linking with -lib%{name}
|
|---|
| 109 | #ln -s lib%{name}%{majorver}.so $RPM_BUILD_ROOT%{_libdir}/lib%{name}.so
|
|---|
| 110 |
|
|---|
| 111 | mkdir -p $RPM_BUILD_ROOT/%{_libdir}/%{name}%{majorver}
|
|---|
| 112 |
|
|---|
| 113 | # postgresql and maybe other packages too need tclConfig.sh
|
|---|
| 114 | # paths don't look at /usr/lib for efficiency, so we symlink into tcl8.5 for now
|
|---|
| 115 | ln -s %{_libdir}/%{name}Config.sh $RPM_BUILD_ROOT/%{_libdir}/%{name}%{majorver}/%{name}Config.sh
|
|---|
| 116 |
|
|---|
| 117 | #mkdir -p $RPM_BUILD_ROOT/%{_includedir}/%{name}-private/{generic,unix}
|
|---|
| 118 | #find generic unix -name "*.h" -exec cp -p '{}' $RPM_BUILD_ROOT/%{_includedir}/%{name}-private/'{}' ';'
|
|---|
| 119 | #( cd $RPM_BUILD_ROOT/%{_includedir}
|
|---|
| 120 | # for i in *.h ; do
|
|---|
| 121 | # [ -f $RPM_BUILD_ROOT/%{_includedir}/%{name}-private/generic/$i ] && ln -sf ../../$i $RPM_BUILD_ROOT/%{_includedir}/%{name}-private/generic ;
|
|---|
| 122 | # done
|
|---|
| 123 | #)
|
|---|
| 124 |
|
|---|
| 125 | # remove buildroot traces
|
|---|
| 126 | sed -i -e "s|$PWD/unix|%{_libdir}|; s|$PWD|%{_includedir}/%{name}-private|" $RPM_BUILD_ROOT/%{_libdir}/%{name}Config.sh
|
|---|
| 127 | rm -rf $RPM_BUILD_ROOT/%{_datadir}/%{name}%{majorver}/tclAppInit.c
|
|---|
| 128 | rm -rf $RPM_BUILD_ROOT/%{_datadir}/%{name}%{majorver}/ldAix
|
|---|
| 129 |
|
|---|
| 130 | %clean
|
|---|
| 131 | rm -rf $RPM_BUILD_ROOT
|
|---|
| 132 |
|
|---|
| 133 | #%post -p /sbin/ldconfig
|
|---|
| 134 |
|
|---|
| 135 | #%postun -p /sbin/ldconfig
|
|---|
| 136 |
|
|---|
| 137 | %files
|
|---|
| 138 | %defattr(-,root,root,-)
|
|---|
| 139 | %{_bindir}/tclsh*
|
|---|
| 140 | %{_datadir}/%{name}%{majorver}
|
|---|
| 141 | %{_datadir}/%{name}8
|
|---|
| 142 | %{_libdir}/%{name}%{major}%{minor}.dll
|
|---|
| 143 | %{_mandir}/man1/*
|
|---|
| 144 | %{_mandir}/man3/*
|
|---|
| 145 | %{_mandir}/mann/*
|
|---|
| 146 | %dir %{_libdir}/%{name}%{majorver}
|
|---|
| 147 | %doc README changes
|
|---|
| 148 | %doc license.terms
|
|---|
| 149 |
|
|---|
| 150 | %files devel
|
|---|
| 151 | %defattr(-,root,root,-)
|
|---|
| 152 | %{_includedir}/*
|
|---|
| 153 | %{_libdir}/lib%{name}stub%{majorver}.a
|
|---|
| 154 | %{_libdir}/lib%{name}%{majorver}.a
|
|---|
| 155 | %{_libdir}/%{name}%{major}%{minor}.dll
|
|---|
| 156 | %{_libdir}/%{name}Config.sh
|
|---|
| 157 | %{_libdir}/%{name}8.5/%{name}Config.sh
|
|---|
| 158 |
|
|---|
| 159 | %files static
|
|---|
| 160 | %defattr(-,root,root,-)
|
|---|
| 161 | %{_includedir}/*
|
|---|
| 162 | %{_libdir}/lib%{name}%{majorver}_s.a
|
|---|
| 163 |
|
|---|
| 164 | %changelog
|
|---|
| 165 | * Tue Jun 14 2016 yd <yd@os2power.com> 8.5.9-3
|
|---|
| 166 | - rebuild package, fixes ticket#183.
|
|---|