source: spec/trunk/SPECS/tcl.spec@ 1010

Last change on this file since 1010 was 802, checked in by Yuri Dario, 9 years ago

spec: tcl, rebuild package, ticket#183.

File size: 5.0 KB
Line 
1%define major 8
2%define minor 5
3%define majorver %{major}.%{minor}
4%define vers %{majorver}.9
5%{!?sdt:%define sdt 0}
6
7Summary: Tool Command Language, pronounced tickle
8Name: tcl
9Version: %{vers}
10Release: 3%{?dist}
11Epoch: 1
12License: TCL
13Group: Development/Languages
14URL: http://tcl.sourceforge.net/
15Source0: http://downloads.sourceforge.net/sourceforge/tcl/tcl%{version}-src.tar.gz
16
17BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
18
19#Buildrequires: autoconf
20Provides: tcl(abi) = %{majorver}
21Obsoletes: tcl-tcldict <= %{vers}
22Provides: tcl-tcldict = %{vers}
23
24Patch0: tcl-os2.diff
25
26%if %sdt
27BuildRequires: systemtap-sdt-devel
28%endif
29
30%description
31The Tcl (Tool Command Language) provides a powerful platform for
32creating integration applications that tie together diverse
33applications, protocols, devices, and frameworks. When paired with the
34Tk toolkit, Tcl provides a fastest and powerful way to create
35cross-platform GUI applications. Tcl can also be used for a variety
36of web-related tasks and for creating powerful command languages for
37applications.
38
39%package devel
40Summary: Tcl scripting language development environment
41Group: Development/Languages
42Requires: %{name} = %{epoch}:%{version}-%{release}
43
44%description devel
45The Tcl (Tool Command Language) provides a powerful platform for
46creating integration applications that tie together diverse
47applications, protocols, devices, and frameworks. When paired with the
48Tk toolkit, Tcl provides a fastest and powerful way to create
49cross-platform GUI applications. Tcl can also be used for a variety
50of web-related tasks and for creating powerful command languages for
51applications.
52
53The package contains the development files and man pages for tcl.
54
55%package static
56Summary: Tcl scripting language development environment
57Group: Development/Languages
58Requires: %{name} = %{epoch}:%{version}-%{release}
59
60%description static
61The Tcl (Tool Command Language) provides a powerful platform for
62creating integration applications that tie together diverse
63applications, protocols, devices, and frameworks. When paired with the
64Tk toolkit, Tcl provides a fastest and powerful way to create
65cross-platform GUI applications. Tcl can also be used for a variety
66of web-related tasks and for creating powerful command languages for
67applications.
68
69The 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
78cd unix
79#autoconf
80export CONFIG_SITE="/@unixroot/usr/share/config.legacy"
81export LDFLAGS="-Zbin-files -Zhigh-mem -Zomf -Zargs-wild -Zargs-resp"
82export LIBS="-lurpo"
83%configure \
84%if %sdt
85 --enable-dtrace \
86%endif
87 --disable-shared --enable-static \
88 --enable-load --enable-dll-unloading
89
90make %{?_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
101rm -rf $RPM_BUILD_ROOT
102make install -C unix INSTALL_ROOT=$RPM_BUILD_ROOT TCL_LIBRARY=%{_datadir}/%{name}%{majorver}
103
104cp $RPM_BUILD_ROOT%{_bindir}/tclsh%{majorver}.exe $RPM_BUILD_ROOT%{_bindir}/tclsh.exe
105cp unix/tcl*.dll $RPM_BUILD_ROOT%{_libdir}
106cp 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
111mkdir -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
115ln -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
126sed -i -e "s|$PWD/unix|%{_libdir}|; s|$PWD|%{_includedir}/%{name}-private|" $RPM_BUILD_ROOT/%{_libdir}/%{name}Config.sh
127rm -rf $RPM_BUILD_ROOT/%{_datadir}/%{name}%{majorver}/tclAppInit.c
128rm -rf $RPM_BUILD_ROOT/%{_datadir}/%{name}%{majorver}/ldAix
129
130%clean
131rm -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.
Note: See TracBrowser for help on using the repository browser.