/[packages]/cauldron/tk/current/SPECS/tk.spec
ViewVC logotype

Annotation of /cauldron/tk/current/SPECS/tk.spec

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1001 - (hide annotations) (download)
Sat Jan 8 19:15:54 2011 UTC (13 years, 3 months ago) by blino
File size: 5830 byte(s)
imported package tk
1 blino 1001 %define rel 7
2     %define pre b1
3    
4     %if %pre
5     %define release %mkrel 0.%{pre}.%{rel}
6     %define distname %{name}%{version}%{pre}-src.tar.gz
7     %define dirname %{name}%{version}%{pre}
8     %else
9     %define release %mkrel %{rel}
10     %define distname %{name}%{version}-src.tar.gz
11     %define dirname %{name}%{version}
12     %endif
13    
14     %define major 8.6
15     %define libname %mklibname %{name} %{major}
16     %define develname %mklibname %{name} -d
17    
18     Summary: Tk GUI toolkit for Tcl
19     Name: tk
20     Version: 8.6
21     Release: %{release}
22     License: BSD
23     Group: System/Libraries
24     URL: http://tcl.tk
25     Source0: http://downloads.sourceforge.net/tcl/%{distname}
26     Patch0: tk8.6b1-soname.patch
27     Patch1: tk8.6b1-fix_Xft_linkage.patch
28     Requires: %{libname} = %{version}-%{release}
29     BuildRequires: tcl-devel >= %{version}
30     BuildRequires: libx11-devel
31     BuildRequires: libxft-devel
32     BuildRequires: fontconfig-devel
33     BuildRequires: libxscrnsaver-devel
34     BuildRequires: chrpath
35     Buildroot: %{_tmppath}/%{name}-%{version}
36     Provides: %{_bindir}/wish
37    
38     %description
39     Tk is a X Windows widget set designed to work closely with the tcl
40     scripting language. It allows you to write simple programs with full
41     featured GUIs in only a little more time then it takes to write a
42     text based interface. Tcl/Tk applications can also be run on Windows
43     and Macintosh platforms.
44    
45     %package -n %{libname}
46     Summary: Shared libraries for %{name}
47     Group: System/Libraries
48    
49     %description -n %{libname}
50     Tk is a X Windows widget set designed to work closely with the tcl
51     scripting language. It allows you to write simple programs with full
52     featured GUI's in only a little more time then it takes to write a
53     text based interface. Tcl/Tk applications can also be run on Windows
54     and Macintosh platforms.
55    
56     %package -n %{develname}
57     Summary: Development files for %{name}
58     Group: Development/Other
59     Requires: %{name} = %{version}-%{release}
60     Requires: %{libname} = %{version}-%{release}
61     Requires: libx11-devel
62     Provides: %{name}-devel = %{version}-%{release}
63     Obsoletes: %{mklibname tk 8.5 -d}
64     Obsoletes: %{mklibname tk 8.4 -d}
65    
66     %description -n %{develname}
67     This package contains development files for %{name}.
68    
69     %prep
70     %setup -q -n %{dirname}
71     %patch0 -p1
72     %patch1 -p1 -b .Xft
73    
74     %build
75     pushd unix
76     autoconf
77     %configure2_5x \
78     --enable-threads \
79     --enable-64bit \
80     --disable-rpath \
81     --with-tcl=%{_libdir} \
82     --includedir=%{_includedir}/tk%{version}
83     %make TK_LIBRARY=%{_datadir}/%{name}%{majorver}
84    
85     cp libtk%{major}.so libtk%{major}.so.0
86     # make test
87     popd
88    
89     %install
90     rm -rf %{buildroot}
91    
92     # If %{_libdir} is not %{_prefix}/lib, then define EXTRA_TCLLIB_FILES
93     # which contains actual non-architecture-dependent tcl code.
94     if [ "%{_libdir}" != "%{_prefix}/lib" ]; then
95     EXTRA_TCLLIB_FILES="%{buildroot}%{_prefix}/lib/*"
96     fi
97    
98     %makeinstall -C unix TK_LIBRARY=%{buildroot}%{_datadir}/%{name}%{major}
99    
100     # create the arch-dependent dir
101     mkdir -p %{buildroot}%{_libdir}/%{name}%{major}
102    
103     # fix libname
104     mv %{buildroot}%{_libdir}/libtk%{major}.so %{buildroot}%{_libdir}/libtk%{major}.so.0
105     ln -snf libtk%{major}.so.0 %{buildroot}%{_libdir}/libtk%{major}.so
106    
107     # install all headers
108     install -d %{buildroot}%{_includedir}/tk%{version}/compat
109     install -d %{buildroot}%{_includedir}/tk%{version}/generic
110     install -d %{buildroot}%{_includedir}/tk%{version}/unix
111     install -m0644 compat/*.h %{buildroot}%{_includedir}/tk%{version}/compat/
112     install -m0644 generic/*.h %{buildroot}%{_includedir}/tk%{version}/generic/
113     install -m0644 unix/*.h %{buildroot}%{_includedir}/tk%{version}/unix/
114    
115     # (tpg) compat issues
116     cp -f %{buildroot}%{_includedir}/tk%{version}/unix/tkUnixPort.h %{buildroot}%{_includedir}/tk%{version}/generic/
117    
118     pushd %{buildroot}%{_bindir}
119     ln -sf wish* wish
120     popd
121    
122     pushd %{buildroot}%{_libdir}
123     cat > lib%{name}.so << EOF
124     /* GNU ld script
125     We want -l%{name} to include the actual system library,
126     which is lib%{name}%{major}.so.0 */
127     INPUT ( -l%{name}%{major} )
128     EOF
129     popd
130    
131     # fix config script
132     perl -pi -e "s|-L`pwd`/unix\b|-L%{_libdir}|g" %{buildroot}%{_libdir}/tkConfig.sh
133     perl -pi -e "s|`pwd`/unix/lib|%{_libdir}/lib|g" %{buildroot}%{_libdir}/tkConfig.sh
134     perl -pi -e "s|`pwd`|%{_includedir}/tk%{version}|g" %{buildroot}%{_libdir}/tkConfig.sh
135    
136     # and let it be found (we don't look in /usr/lib any more)
137     ln -s %{_libdir}/%{name}Config.sh %{buildroot}/%{_libdir}/%{name}%{major}/%{name}Config.sh
138    
139     # Arrangements for lib64 platforms
140     echo "# placeholder" >> %{libname}.files
141     echo "# placeholder" >> %{develname}.files
142     if [[ "%{_lib}" != "lib" ]]; then
143     mkdir -p %{buildroot}%{_prefix}/lib
144     ln -s %{_libdir}/tkConfig.sh %{buildroot}%{_prefix}/lib/tkConfig.sh
145     echo "%{_prefix}/lib/tkConfig.sh" >> %{develname}.files
146     echo "%{_libdir}/%{name}%{major}/pkgIndex.tcl" >> %{libname}.files
147     fi
148    
149     # (fc) make sure .so files are writable by root
150     chmod 755 %{buildroot}%{_libdir}/*.so*
151    
152     # (tpg) nuke rpath
153     chrpath -d %{buildroot}%{_libdir}/libtk%{major}.so.0
154    
155     %if %mdkversion < 200900
156     %post -p /sbin/ldconfig -n %{libname}
157     %endif
158    
159     %if %mdkversion < 200900
160     %postun -p /sbin/ldconfig -n %{libname}
161     %endif
162    
163     %clean
164     rm -rf %{buildroot}
165    
166     %files
167     %defattr(-,root,root)
168     %{_bindir}/*
169     %{_libdir}/%{name}%{major}
170     %{_datadir}/%{name}%{major}
171     %{_mandir}/man1/*
172     %{_mandir}/man3/*
173     %{_mandir}/mann/*
174    
175     %files -n %{libname} -f %{libname}.files
176     %defattr(-,root,root)
177     %attr(0755,root,root) %{_libdir}/lib*.so.*
178    
179     %files -n %{develname} -f %{develname}.files
180     %defattr(-,root,root)
181     %dir %{_includedir}/tk%{version}
182     %dir %{_includedir}/tk%{version}/compat
183     %dir %{_includedir}/tk%{version}/generic
184     %dir %{_includedir}/tk%{version}/unix
185     %attr(0644,root,root) %{_includedir}/tk%{version}/compat/*.h
186     %attr(0644,root,root) %{_includedir}/tk%{version}/generic/*.h
187     %attr(0644,root,root) %{_includedir}/tk%{version}/unix/*.h
188     %attr(0644,root,root) %{_includedir}/*.h
189     %attr(0755,root,root) %{_libdir}/*.so
190     %attr(0644,root,root) %{_libdir}/*.a
191     %attr(0755,root,root) %{_libdir}/tkConfig.sh
192    
193    

  ViewVC Help
Powered by ViewVC 1.1.30