| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179 |
- ##
- ## tcl.spec -- OpenPKG RPM Specification
- ## Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/>
- ## Copyright (c) 2000-2004 Ralf S. Engelschall <rse@engelschall.com>
- ## Copyright (c) 2000-2004 Cable & Wireless <http://www.cw.com/>
- ##
- ## Permission to use, copy, modify, and distribute this software for
- ## any purpose with or without fee is hereby granted, provided that
- ## the above copyright notice and this permission notice appear in all
- ## copies.
- ##
- ## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
- ## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- ## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
- ## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
- ## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- ## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- ## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
- ## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- ## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- ## SUCH DAMAGE.
- ##
- # package version
- %define V_major 8
- %define V_minor 4
- %define V_level 6
- # package information
- Name: tcl
- Summary: Tool Command Language (TCL)
- URL: http://tcl.activestate.com/
- Vendor: John Ousterhout
- Packager: The OpenPKG Project
- Distribution: OpenPKG
- Class: BASE
- Group: Language
- License: GPL
- Version: %{V_major}.%{V_minor}.%{V_level}
- Release: 20040304
- # package options
- %option with_x11 no
- # list of sources
- Source0: ftp://ftp.scriptics.com/pub/tcl/tcl%{V_major}_%{V_minor}/tcl%{V_major}.%{V_minor}.%{V_level}-src.tar.gz
- Source1: ftp://ftp.scriptics.com/pub/tcl/tcl%{V_major}_%{V_minor}/tk%{V_major}.%{V_minor}.%{V_level}-src.tar.gz
- # build information
- Prefix: %{l_prefix}
- BuildRoot: %{l_buildroot}
- BuildPreReq: OpenPKG, openpkg >= 20040130
- PreReq: OpenPKG, openpkg >= 20040130
- %if "%{with_x11}" == "yes"
- BuildPreReq: X11
- PreReq: X11
- %endif
- AutoReq: no
- AutoReqProv: no
- %description
- The Tool Command Language (TCL), optionally including the
- popular TCL Widget Toolkit (Tk).
- %track
- prog tcl:tcl = {
- version = %{version}
- url = ftp://ftp.scriptics.com/pub/tcl/tcl8_4/
- regex = tcl(__VER__)-src\.tar.gz
- }
- prog tcl:tk = {
- version = %{version}
- url = ftp://ftp.scriptics.com/pub/tcl/tcl8_4/
- regex = tk(__VER__)-src\.tar.gz
- }
- %prep
- %setup -q -c -n tcl-%{V_major}.%{V_minor}.%{V_level}
- %setup -q -T -D -a 1
- %build
- # build Tcl
- ( cd tcl%{V_major}.%{V_minor}.%{V_level}/unix
- CC="%{l_cc}" \
- CFLAGS="%{l_cflags -O}" \
- ./configure \
- --prefix=%{l_prefix} \
- --includedir=%{l_prefix}/include/tcl \
- --disable-shared
- %{l_make} %{l_mflags -O}
- ) || exit $?
- # build Tk (optional)
- %if "%{with_x11}" == "yes"
- ( cd tk%{V_major}.%{V_minor}.%{V_level}/unix
- CC="%{l_cc}" \
- CFLAGS="%{l_cflags -O}" \
- ./configure \
- --prefix=%{l_prefix} \
- --includedir=%{l_prefix}/include/tcl \
- --disable-shared \
- --with-tcl=../../tcl%{V_major}.%{V_minor}.%{V_level}/unix \
- --with-x \
- --x-includes=`%{l_prefix}/etc/rc --query x11_incdir` \
- --x-libraries=`%{l_prefix}/etc/rc --query x11_libdir`
- %{l_make} %{l_mflags -O}
- ) || exit $?
- %endif
- %install
- rm -rf $RPM_BUILD_ROOT
- # install Tcl
- ( cd tcl%{V_major}.%{V_minor}.%{V_level}/unix
- %{l_shtool} subst \
- -e 's;-L[^ ]*;%{l_ldflags};g' \
- -e "s;\\(TCL_BUILD_STUB_LIB_PATH=\\).*;\\1'%{l_prefix}/lib/libtclstub%{V_major}.%{V_minor}\${TCL_DBGX}.a';" \
- tclConfig.sh
- %{l_make} %{l_mflags} install INSTALL_ROOT=$RPM_BUILD_ROOT
- ) || exit $?
- ( cd $RPM_BUILD_ROOT%{l_prefix}
- mv bin/tclsh%{V_major}.%{V_minor} bin/tclsh
- ln lib/libtcl%{V_major}.%{V_minor}.a lib/libtcl.a
- ln lib/libtclstub%{V_major}.%{V_minor}.a lib/libtclstub.a
- cd man/mann
- for mo in *.n; do
- mn=`echo $mo | sed -e 's;\.n$;.3;'`
- mv $mo ../man3/$mn
- done
- cd ../man3
- chmod u+w *
- for mp in *.3; do
- if [ ".`echo $mp | grep '^Tcl_'`" = . ]; then
- mv $mp Tcl_$mp
- fi
- done
- ) || exit $?
- # install Tk (optional)
- %if "%{with_x11}" == "yes"
- ( cd tk%{V_major}.%{V_minor}.%{V_level}/unix
- %{l_shtool} subst \
- -e 's;-L[^ ]*;%{l_ldflags};g' \
- -e "s;\\(TK_BUILD_STUB_LIB_PATH=\\).*;\\1'%{l_prefix}/lib/libtkstub%{V_major}.%{V_minor}.a';" \
- tkConfig.sh
- %{l_make} %{l_mflags} install INSTALL_ROOT=$RPM_BUILD_ROOT
- ) || exit $?
- ( cd $RPM_BUILD_ROOT%{l_prefix}
- mv bin/wish%{V_major}.%{V_minor} bin/wish
- ln lib/libtk%{V_major}.%{V_minor}.a lib/libtk.a
- ln lib/libtkstub%{V_major}.%{V_minor}.a lib/libtkstub.a
- cd man/mann
- for mo in *.n; do
- mn=`echo $mo | sed -e 's;\.n$;.3;'`
- mv $mo ../man3/$mn
- done
- cd ../man3
- chmod u+w *
- for mp in *.3; do
- if [ ".`echo $mp | grep '^Tcl_'`" = . ] && \
- [ ".`echo $mp | grep '^Tk_'`" = . ]; then
- mv $mp Tk_$mp
- fi
- done
- ) || exit $?
- %endif
- # post-process installation
- strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
- %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std}
- %files -f files
- %clean
- rm -rf $RPM_BUILD_ROOT
|