-
Notifications
You must be signed in to change notification settings - Fork 0
/
tcl.spec
158 lines (122 loc) · 4.12 KB
/
tcl.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
#
# Do NOT Edit the Auto-generated Part!
# Generated by: spectacle version 0.23
#
# >> macros
%define majorver 8.5
# << macros
%define keepstatic 1
Name: tcl
Summary: Tool Command Language, pronounced tickle
Version: 8.5.8
Release: 4
Group: Development/Languages
License: TCL
URL: http://tcl.sourceforge.net/
Source0: http://downloads.sourceforge.net/sourceforge/tcl/tcl%{version}-src.tar.gz
Source100: tcl.yaml
Patch0: tcl-8.5.1-autopath.patch
Patch1: tcl-8.5.0-conf.patch
Patch2: tcl-8.5.0-hidden.patch
Patch3: tcl-8.5.7-sigabrt.patch
Patch4: mips-tclstrtod.patch
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
BuildRequires: autoconf
Provides: tcl(abi) = %{majorver}
%description
The Tcl (Tool Command Language) provides a powerful platform for
creating integration applications that tie together diverse
applications, protocols, devices, and frameworks. When paired with the
Tk toolkit, Tcl provides a fastest and powerful way to create
cross-platform GUI applications. Tcl can also be used for a variety
of web-related tasks and for creating powerful command languages for
applications.
%package devel
Summary: Tcl scripting language development environment
Group: Development/Languages
Requires: %{name} = %{version}-%{release}
%description devel
The Tcl (Tool Command Language) provides a powerful platform for
creating integration applications that tie together diverse
applications, protocols, devices, and frameworks. When paired with the
Tk toolkit, Tcl provides a fastest and powerful way to create
cross-platform GUI applications. Tcl can also be used for a variety
of web-related tasks and for creating powerful command languages for
applications.
The package contains the development files and man pages for tcl.
%prep
%setup -q -n %{name}%{version}
# tcl-8.5.1-autopath.patch
%patch0 -p1
# tcl-8.5.0-conf.patch
%patch1 -p1
# tcl-8.5.0-hidden.patch
%patch2 -p1
# tcl-8.5.7-sigabrt.patch
%patch3 -p1
# mips-tclstrtod.patch
%patch4 -p1
# >> setup
# << setup
%build
# >> build pre
pushd unix
# << build pre
%reconfigure \
--disable-threads \
--enable-symbols \
--enable-shared
# >> build post
make %{?_smp_mflags} TCL_LIBRARY=%{_datadir}/%{name}%{majorver} CFLAGS="$RPM_OPT_FLAGS -DTCL_NO_STACK_CHECK=1"
# << build post
%install
rm -rf %{buildroot}
# >> install pre
# << install pre
# >> install post
make install -C unix INSTALL_ROOT=$RPM_BUILD_ROOT TCL_LIBRARY=%{_datadir}/%{name}%{majorver}
ln -s tclsh%{majorver} $RPM_BUILD_ROOT%{_bindir}/tclsh
# for linking with -lib%{name}
ln -s lib%{name}%{majorver}.so $RPM_BUILD_ROOT%{_libdir}/lib%{name}.so
mkdir -p $RPM_BUILD_ROOT/%{_libdir}/%{name}%{majorver}
# postgresql and maybe other packages too need tclConfig.sh
# paths don't look at /usr/lib for efficiency, so we symlink into tcl8.5 for now
ln -s %{_libdir}/%{name}Config.sh $RPM_BUILD_ROOT/%{_libdir}/%{name}%{majorver}/%{name}Config.sh
mkdir -p $RPM_BUILD_ROOT/%{_includedir}/%{name}-private/{generic,unix}
find generic unix -name "*.h" -exec cp -p '{}' $RPM_BUILD_ROOT/%{_includedir}/%{name}-private/'{}' ';'
( cd $RPM_BUILD_ROOT/%{_includedir}
for i in *.h ; do
[ -f $RPM_BUILD_ROOT/%{_includedir}/%{name}-private/generic/$i ] && ln -sf ../../$i $RPM_BUILD_ROOT/%{_includedir}/%{name}-private/generic ;
done
)
# remove buildroot traces
sed -i -e "s|$PWD/unix|%{_libdir}|; s|$PWD|%{_includedir}/%{name}-private|" $RPM_BUILD_ROOT/%{_libdir}/%{name}Config.sh
rm -rf $RPM_BUILD_ROOT/%{_datadir}/%{name}%{majorver}/tclAppInit.c
rm -rf $RPM_BUILD_ROOT/%{_datadir}/%{name}%{majorver}/ldAix
# << install post
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%files
%defattr(-,root,root,-)
# >> files
%doc README changes
%doc license.terms
%{_bindir}/tclsh*
%{_datadir}/%{name}%{majorver}
%{_datadir}/%{name}8
%{_libdir}/lib%{name}%{majorver}.so
%{_mandir}/man1/*
%{_mandir}/man3/*
%{_mandir}/mann/*
%dir %{_libdir}/%{name}%{majorver}
# << files
%files devel
%defattr(-,root,root,-)
# >> files devel
%{_includedir}/*
%{_libdir}/lib%{name}stub%{majorver}.a
%{_libdir}/lib%{name}.so
%{_libdir}/%{name}Config.sh
%{_libdir}/%{name}8.5/%{name}Config.sh
# << files devel