8e398332a0e31a2ab1cb8a6c7a5389cc2012b052
[platform/upstream/expect.git] / packaging / expect.spec
1 Url:            http://expect.nist.gov
2 Name:           expect
3 BuildRequires:  autoconf
4 BuildRequires:  tcl-devel
5 Version:        5.45
6 Release:        0
7 Summary:        A Tool for Automating Interactive Programs
8 License:        SUSE-Public-Domain
9 Group:          Development/Languages/Tcl
10 Source:         %{name}%{version}.tar.gz
11 Source1:        expect-rpmlintrc
12
13 %description
14 Expect is a tool primarily for automating interactive applications,
15 such as telnet, ftp, passwd, fsck, rlogin, tip, and more.  Expect
16 really makes this stuff trivial.  Expect is also useful for testing
17 these applications.  It is described in many books, articles, papers,
18 and FAQs.  There is an entire book on it available from O'Reilly.
19
20 %package devel
21 Summary:        Header Files and C API Documentation for expect
22 Group:          Development/Libraries/Tcl
23
24 %description devel
25 This package contains header files and documentation needed for linking
26 to expect from programs written in compiled languages like C, C++, etc.
27
28 This package is not needed for developing scripts that run under the
29 /usr/bin/expect interpreter, or any other Tcl interpreter with the
30 expect package loaded.
31
32 %prep
33 %setup -q -n %name%version
34
35 %build
36 autoreconf
37 %configure \
38         --with-tcl=%_libdir \
39         --with-tk=no_tk \
40         --with-tclinclude=%_includedir \
41         --enable-shared
42 make %{?_smp_mflags} all pkglibdir=%_libdir/tcl/%name%version
43
44
45 %check
46 make test
47
48 %install
49 # set the right path to the expect binary...
50 sed -i \
51     -e '1s,^#![^ ]*expectk,#!/usr/bin/wish\npackage require Expect,' \
52     -e '1s,^#![^ ]*expect,#!/usr/bin/expect,' \
53     example/*
54 make install DESTDIR=$RPM_BUILD_ROOT pkglibdir=%_libdir/tcl/%name%version
55 # Remove some executables and manpages we don't want to ship
56 rm $RPM_BUILD_ROOT%_prefix/bin/*passwd
57 rm $RPM_BUILD_ROOT%_mandir/*/*passwd*
58
59 %files
60 %defattr(-,root,root)
61 %_prefix/bin/*
62 %_libdir/tcl/*
63 %_libdir/lib*.so
64 %doc %_mandir/man1/*
65
66 %files devel
67 %defattr(-,root,root)
68 %_includedir/*
69 %doc %_mandir/man3/*
70
71 %changelog