%define major 5.45 %define tclmajor %( rpm -q --qf '%{VERSION}' tcl |sed -e "s,[^.]*\.[^.]*,&#,;s,#.*,," ) Name: expect Version: %major Release: 1ark Summary: A program-script interaction and testing utility URL: http://www.sourceforge.net/projects/expect Source: http://switch.dl.sourceforge.net/project/expect/Expect/%version/expect%version.tar.gz License: BSD Group: Development/Languages BuildRoot: %{_tmppath}/%{name}-root Patch: expect-5.44.1-autoconf.patch %ifarch %ix86 Provides: libexpect.so.0 %else Provides: libexpect.so.0()(64bit) %endif %description Expect is a tcl application for automating and testing interactive applications such as telnet, ftp, passwd, fsck, rlogin, tip, etc. Expect makes it easy for a script to control another program and interact with it. %prep %setup -q -n %name%version %patch -p1 -b .autoconf~ sed -i -e 's,tcl.h,tclInt.h,' exp_inter.c aclocal autoconf ./configure --prefix=%_prefix --libdir=%_libdir --with-tcl=%_libdir --with-tk=%_libdir --enable-gcc --enable-shared --with-tclinclude=/usr/lib/tcl8.5/include/generic %build make %install rm -rf $RPM_BUILD_ROOT %makeinstall libdir=$RPM_BUILD_ROOT%_libdir tcl_libdir=$RPM_BUILD_ROOT%_libdir cd $RPM_BUILD_ROOT%_libdir ln -s libexpect%major.so libexpect.so.0 ln -s libexpect%major.a libexpect.a %files %defattr(-,root,root) %_bindir/* %_includedir/* %_libdir/* %_mandir/*/* %clean rm -rf $RPM_BUILD_ROOT $RPM_BUILD_DIR/%{name}-%{version} %changelog * Sun Jun 26 2011 Bernhard Rosenkraenzer <bero@arklinux.org> 5.45-1ark - 5.45 - Build for tcl/tk 8.5.10 * Fri Jan 8 2010 Bernhard Rosenkraenzer <bero@arklinux.org> 5.44.1-3ark - Rebuild for tcl/tk 8.5.8 * Sun Sep 28 2008 Bernhard Rosenkraenzer <bero@arklinux.org> 5.44.1-2ark - Rebuild for tcl/tk 8.5.4 * Mon Jun 16 2008 Bernhard Rosenkraenzer <bero@arklinux.org> 5.44.1-1ark - 5.44.1 * Thu Dec 8 2005 Bernhard Rosenkraenzer <bero@arklinux.org> 5.43.0-1ark - 5.43.0 * Tue Dec 16 2003 Bernhard Rosenkraenzer <bero@arklinux.org> 5.39.0-2ark - Fix build on x86_64 * Thu Oct 23 2003 Bernhard Rosenkraenzer <bero@arklinux.org> 5.39.0-1ark - initial RPM