Sophie

Sophie

distrib > Mandriva > 2009.0 > i586 > by-pkgid > f4246b06d84022f6db6a5e7c4fa38c0b > files > 10

expect-5.43.0-14mdv2009.0.src.rpm

%define	name	expect
%define	version	5.43.0
%define major	5.43
%define libname	%mklibname %{name} %{major}

Summary:	A tcl extension for simplifying program-script interaction
Name:		%{name}
Version:	%{version}
Release:	%mkrel 14
Group:		System/Libraries
License:	BSD
URL:		http://expect.nist.gov/
Source:		http://expect.nist.gov/src/%{name}-%{version}.tar.bz2
Patch10:	expect-5.32.2-random.patch
Patch13:	expect-5.32.2-fixcat.patch
Patch16:	expect-5.32.2-spawn.patch
Patch18:	expect-5.32.2-setpgrp.patch
Patch19:	expect-5.32-libdir.patch
Patch20:	expect-5.43.0.configure.patch
Patch21:	expect-5.43-soname.diff
# from fedora core
Patch22:	expect-5.43.0-tcl8.5.patch
BuildRequires:	tcl tcl-devel
BuildRequires:	tk tk-devel
BuildRequires:	libxscrnsaver-devel
BuildRequires:	autoconf2.1
Requires:	tcl
Epoch:		1
Requires:	%{libname} = %{epoch}:%{version}
Buildroot:	%{_tmppath}/%{name}-%{version}

%description
Expect is a tcl extension for automating interactive applications such
as telnet, ftp, passwd, fsck, rlogin, tip, etc.  Expect is also useful
for testing the named applications.  Expect makes it easy for a script
to control another program and interact with it.

Install the expect package if you'd like to develop scripts which interact
with interactive applications.  You'll also need to install the tcl
package.

%package -n	%{libname}
Summary:	Shared libraries for %{name}
Group:		System/Libraries

%description -n %{libname}
Expect is a tcl extension for automating interactive applications such
as telnet, ftp, passwd, fsck, rlogin, tip, etc.  Expect is also useful
for testing the named applications.  Expect makes it easy for a script
to control another program and interact with it.

Install the expect package if you'd like to develop scripts which interact
with interactive applications.  You'll also need to install the tcl
package.

%package -n	%{libname}-devel 
Summary:	Development files for %{name}
Group:		Development/Other
Requires:	%{libname} = %{epoch}:%{version}
Provides:	%{name}-devel = %{epoch}:%{version}-%{release}
Provides:	lib%{name}-devel = %{epoch}:%{version}-%{release}

%description -n	%{libname}-devel
This package contains development files for %{name}.

%package	examples
Summary:	Example scripts for %{name}
Group:		System/Libraries

%description	examples
This package contains example scripts for Expect.

Expect is a tcl extension for automating interactive applications such
as telnet, ftp, passwd, fsck, rlogin, tip, etc.  Expect is also useful
for testing the named applications.  Expect makes it easy for a script
to control another program and interact with it.

Install the expect package if you'd like to develop scripts which interact
with interactive applications.  You'll also need to install the tcl
package.

%prep

%setup -q -n %{name}-%{major}
%patch10 -p1 -b .random
%patch13 -p1 -b .fixcat
%patch16 -p1 -b .spawn
%patch18 -p2
%patch19 -p1 -b .libdir
%patch20
%patch21 -p1
%patch22 -p1 -b .tcl8.5

%build
autoconf-2.13

for f in config.guess config.sub ; do
        test -f /usr/share/libtool/$f || continue
        find . -type f -name $f -exec cp /usr/share/libtool/$f \{\} \;
done

chmod u+w testsuite/configure
. %{_libdir}/tclConfig.sh

%configure \
    --enable-gcc \
    --enable-shared \
    --with-tclinclude=$TCL_SRC_DIR

%make

%install
rm -rf %{buildroot}

# If %{_libdir} is not %{_prefix}/lib, then define EXTRA_TCLLIB_FILES
# which contains actual non-architecture-dependent tcl code.
if [ "%{_libdir}" != "%{_prefix}/lib" ]; then
    EXTRA_TCLLIB_FILES="%{buildroot}%{_prefix}/lib/*"
fi

%makeinstall tcl_libdir=%{buildroot}%{_libdir} \
	libdir=%{buildroot}%{_libdir}/expect%{major} \
	TKLIB_INSTALLED="-L%{buildroot}%{_libdir} -ltk" \
	TCLLIB_INSTALLED="-L%{buildroot}%{_libdir} -ltcl"

# fix the shared libname
rm -f %{buildroot}%{_libdir}/lib%{name}%{major}.so*
install -m0755 lib%{name}%{major}.so %{buildroot}%{_libdir}/lib%{name}%{major}.so.1
ln -snf lib%{name}%{major}.so.1 %{buildroot}%{_libdir}/lib%{name}%{major}.so

# remove cryptdir/decryptdir, as Linux has no crypt command (bug 6668).
rm -f %{buildroot}%{_bindir}/{cryptdir,decryptdir}
rm -f %{buildroot}%{_mandir}/man1/{cryptdir,decryptdir}.1*

# cleanup
rm -f %{buildroot}%{_libdir}/%{name}%{major}/*.a

# (fc) make sure .so files are writable by root
chmod 755 %{buildroot}%{_libdir}/*.so

%if %mdkversion < 200900
%post -n %{libname} -p /sbin/ldconfig
%endif

%if %mdkversion < 200900
%postun -n %{libname} -p /sbin/ldconfig
%endif

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root)
%doc ChangeLog FAQ HISTORY NEWS README
%{_bindir}/*
%{_libdir}/%{name}%{major}
%{_mandir}/man1/*
%{_mandir}/man3/*

%files -n %{libname}
%defattr(-,root,root)
%{_libdir}/lib*.so.*

%files -n %{libname}-devel
%defattr(-,root,root)
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/*.a

%files examples
%doc example/*


%changelog
* Tue Jul 01 2008 Gustavo De Nardin <gustavodn@mandriva.com> 1:5.43.0-14mdv2009.0
+ Revision: 230451
- include expect's examples in an expect-examples subpackage

* Tue Jun 17 2008 Thierry Vignaud <tvignaud@mandriva.com> 1:5.43.0-13mdv2009.0
+ Revision: 220736
- rebuild

  + Pixel <pixel@mandriva.com>
    - do not call ldconfig in %%post/%%postun, it is now handled by filetriggers

* Sat Jan 12 2008 Thierry Vignaud <tvignaud@mandriva.com> 1:5.43.0-12mdv2008.1
+ Revision: 149708
- rebuild
- kill re-definition of %%buildroot on Pixel's request

  + Olivier Blin <oblin@mandriva.com>
    - restore BuildRoot

* Fri Sep 07 2007 Anssi Hannula <anssi@mandriva.org> 1:5.43.0-11mdv2008.0
+ Revision: 82146
- buildrequires autoconf2.1
- rebuild for fixed soname of tcl

* Tue Jun 12 2007 Christiaan Welvaart <spturtle@mandriva.org> 1:5.43.0-10mdv2008.0
+ Revision: 38243
- add BuildRequires: libxscrnsaver-devel
- Patch22: work around build problems with tcl 8.5


* Mon Nov 06 2006 Thierry Vignaud <tvignaud@mandriva.com> 5.43.0-9mdv2007.0
+ Revision: 76911
- Import expect

* Mon Nov 06 2006 Thierry Vignaud <tvignaud@mandriva.com> 5.43.0-9mdv2007.1
- fix requires
- fix doc perms

* Wed Sep 20 2006 Oden Eriksson <oeriksson@mandriva.com> 5.43.0-8mdv2007.0
- fix deps

* Fri Jan 06 2006 Oden Eriksson <oeriksson@mandriva.com> 5.43.0-7mdk
- fix deps (i need thicker glasses)

* Fri Jan 06 2006 Oden Eriksson <oeriksson@mandriva.com> 5.43.0-6mdk
- fix deps

* Fri Jan 06 2006 Buchan Milne <bgmilne@mandriva.org> 5.43.0-5mdk
- bump epoch so it upgrades old bundled-with-tcl package

* Sun Jan 01 2006 Oden Eriksson <oeriksson@mandriva.com> 5.43.0-4mdk
- fix deps

* Sun Jan 01 2006 Oden Eriksson <oeriksson@mandriva.com> 5.43.0-3mdk
- fix library-without-ldconfig-postin

* Sun Jan 01 2006 Oden Eriksson <oeriksson@mandriva.com> 5.43.0-2mdk
- fix soname (P21) after looking at debian
- misc lib64 and spec file fixes

* Thu Dec 29 2005 Guillaume Rousse <guillomovitch@mandriva.org> 5.43.0-1mdk
- first release as a standalone package
- drop unused patches