expect/expect.spec

163 lines
5.0 KiB
RPMSpec
Raw Permalink Normal View History

2019-09-30 10:38:44 -04:00
%{!?tcl_version: %global tcl_version %(echo 'puts $tcl_version' | tclsh)}
%{!?tcl_sitearch: %global tcl_sitearch %{_libdir}/tcl%{tcl_version}}
Name: expect
Epoch: 1
Version: 5.45.4
Release: 9
2019-09-30 10:38:44 -04:00
Summary: A tool for automating interactive applications
License: Public Domain
URL: https://core.tcl.tk/expect/index
Source0: http://downloads.sourceforge.net/%{name}/%{name}%{version}.tar.gz
2022-06-09 02:27:54 +00:00
Buildrequires: gcc tcl-devel autoconf automake chrpath
2019-09-30 10:38:44 -04:00
Provides: expectk
Obsoletes: expectk
# Patch0: fixes change log file permissions
Patch0: expect-5.43.0-log_file.patch
# Patch1: fixes install location, change pkgIndex
Patch1: expect-5.43.0-pkgpath.patch
# Patch2: fixes minor man page formatting issue
Patch2: expect-5.45-man-page.patch
# Patch3: fixes segmentation fault during matching characters
Patch3: expect-5.45-match-gt-numchars-segfault.patch
# Patch4: fixes memory leak when using -re, http://sourceforge.net/p/expect/patches/13/
Patch4: expect-5.45-re-memleak.patch
# Patch5: use vsnprintf instead of vsprintf to avoid buffer overflow
Patch5: expect-5.45-exp-log-buf-overflow.patch
# Patch6: fixes segfaults if Tcl is built with stubs and Expect is used directly
# from C program rhbz#1091060
Patch6: expect-5.45-segfault-with-stubs.patch
# Patch7: fixes leaked fd, patch by Matej Mužila, rhbz#1001220
Patch7: expect-5.45-fd-leak.patch
# examples patches
# Patch100: changes random function
Patch100: expect-5.32.2-random.patch
# Patch101: fixes bz674184 - mkpasswd fails randomly
Patch101: expect-5.45-mkpasswd-dash.patch
# Patch103: use full path to 'su', it's safer
Patch103: expect-5.45-passmass-su-full-path.patch
# Patch104: rhbz 963889, fixes inaccuracy in mkpasswd man page
Patch104: expect-5.45-mkpasswd-man.patch
# Patch105: Fix error with -Werror=format-security
Patch105: expect-5.45-format-security.patch
Patch6000: backport-expect-5.45-headers.patch
2019-09-30 10:38:44 -04:00
%description
Expect is a tool for automating interactive applications
such as telnet, ftp, passwd, fsck, rlogin, tip, etc.
Expect is also useful for testing these same applications.
This package contains expect utility.
%package devel
Summary: Header files for expect library
Requires: %{name} = %{epoch}:%{version}-%{release}
%description devel
Expect is a tool for automating interactive applications
such as telnet, ftp, passwd, fsck, rlogin, tip, etc.
Expect is also useful for testing these same applications.
This package contains header files for the expect library.
%package help
Summary: Man pages and other related documents for expect
BuildArch: noarch
%description help
Expect is a tool for automating interactive applications
such as telnet, ftp, passwd, fsck, rlogin, tip, etc.
Expect is also useful for testing these same applications.
This package contains man pages and other related documents for expect.
%prep
2021-09-09 10:01:40 +08:00
%autosetup -n %{name}%{version} -p1
2019-09-30 10:38:44 -04:00
%build
%configure \
--with-tcl=%{_libdir} \
--with-tk=%{_libdir} --enable-shared \
--with-tclinclude=%{_includedir}/tcl-private/generic
%make_build
%check
make test
%install
%make_install
# move
mv "$RPM_BUILD_ROOT"%{tcl_sitearch}/expect%{version}/libexpect%{version}.so "$RPM_BUILD_ROOT"%{_libdir}
# for linking with -lexpect
ln -s libexpect%{version}.so "$RPM_BUILD_ROOT"%{_libdir}/libexpect.so
2019-09-30 10:38:44 -04:00
# remove cryptdir/decryptdir, as Linux has no crypt command (bug 6668).
rm -f "$RPM_BUILD_ROOT"%{_bindir}/{cryptdir,decryptdir,autopasswd}
rm -f "$RPM_BUILD_ROOT"%{_mandir}/man1/{cryptdir,decryptdir}.1*
# remove rpath
chrpath --delete $RPM_BUILD_ROOT%{_libdir}/libexpect%{version}.so
chrpath --delete $RPM_BUILD_ROOT%{_bindir}/expect
2019-09-30 10:38:44 -04:00
mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d
echo "%{_libdir}" > $RPM_BUILD_ROOT/etc/ld.so.conf.d/%{name}-%{_arch}.conf
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
2019-09-30 10:38:44 -04:00
%files
%doc ChangeLog FAQ HISTORY NEWS README
%{_bindir}/*
%dir %{tcl_sitearch}/expect%{version}
%{tcl_sitearch}/expect%{version}/pkgIndex.tcl
%{_libdir}/libexpect*.so
%config(noreplace) /etc/ld.so.conf.d/*
2019-09-30 10:38:44 -04:00
%files devel
%{_includedir}/*
%files help
%{_mandir}/man1/*
%{_mandir}/man3/libexpect.3*
%changelog
* Wed Jul 31 2024 hongjinghao <hongjinghao@huawei.com> - 1:5.45.4-9
- sync patch from upstream
backport-expect-5.45-headers.patch
* Thu Feb 22 2024 hongjinghao <hongjinghao@huawei.com> - 1:5.45.4-8
- remove rpath and runpath of exec files and libraries
2022-06-09 02:27:54 +00:00
* Thu Jun 9 2022 yangzhao1 <yangzhao1@kylinos.cn> - 1:5.45.4-7
- Remove unnecessary Buildrequires git
2021-09-09 10:01:40 +08:00
* Thu Sep 9 2021 wangchen <wangchen137@huawei.com> - 1:5.45.4-6
- Delete -S git from %autosetup
* Tue Jun 22 2021 panxiaohe <panxiaohe@huawei.com> - 1:5.45.4-5
- Delete the telnet patch to remove the dependency on telnet
* Mon Apr 20 2020 openEuler Buildteam <buildteam@openeuler.org> - 1:5.45.4-4
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:fix ln error due to missing definition of majorver
2019-12-13 15:14:38 +08:00
* Thu Nov 21 2019 chengquan <chengquan3@huawei.com> - 1:5.45.4-3
- Type:bugfix
- ID:NA
- SUG:NA
- DESC:add buildrequire of git
2019-09-30 10:38:44 -04:00
* Fri Sep 20 2019 openEuler Buildteam <buildteam@openeuler.org> - 1:5.45.4-2
- Delete redundant information
* Thu Aug 29 2019 openEuler Buildteam <buildteam@openeuler.org> - 1:5.45.4-1
- Package init