Browse Source

expect 5.44.1.15-1

git-svn-id: http://trac.vinelinux.org/repos/projects/specs@7290 ec354946-7b23-47d6-9f5a-488ba84defc7
iwaim 11 years ago
parent
commit
008eee1f64
1 changed files with 89 additions and 34 deletions
  1. 89 34
      e/expect/expect-vl.spec

+ 89 - 34
e/expect/expect-vl.spec

@@ -1,27 +1,50 @@
+%{!?tcl_version: %define tcl_version %(echo 'puts $tcl_version' | tclsh)}
+%{!?tcl_sitearch: %define tcl_sitearch %{_libdir}/tcl%{tcl_version}}
+
 %define tcl_major 8.4
 %define thread_major 2.5
-%define majorver 5.43
+%define majorver 5.44
 
 Summary: A Tcl/Tk development environment: expect 
 Summary(ja): Tcl/Tk 開発環境: expect
 Name: expect
-Version: %{majorver}.0
-Release: 5%{?_dist_release}
+Version: %{majorver}.1.15
+Release: 1%{?_dist_release}
 Group: Development/Languages
 URL: http://expect.nist.gov/
-License: BSD
-Source0: http://expect.nist.gov/src/%{name}-%{version}.tar.gz
-Patch0: expect-5.32.2-random.patch
-Patch6: expect-5.38.0-spawn-43310.patch
-Patch8: expect-5.32.2-setpgrp.patch
-Patch10: expect-5.38.0-lib-spec.patch
-Patch11: expect-5.39.0-libdir.patch
+License: Public Domain
+Source0: http://expect.nist.gov/src/%{name}-%{version}.tar.bz2
+# Patch500: fixes change log file permissions
+Patch500: expect-5.43.0-log_file.patch
+# Patch501: fixes install location, change pkgIndex
+Patch501: expect-5.43.0-pkgpath.patch
+# Patch502: fixes bz456738, expectk is unsupported by upstream actually,
+#	but the patch is under discussion (patch by Sergei Golovan)
+Patch502: expect-5.44.1.15-tk-init.patch
+# Patch503: fixes bz742911
+Patch503: expect-5.44.1.15-match-gt-numchars-segfault.patch
+# Patch504: bz674866, proposed upstream, not accepted yet
+# https://sourceforge.net/tracker/?func=detail&aid=3404934&group_id=13179&atid=113179
+Patch504: expect-5.45-man-page.patch
+# examples patches
+# Patch600: changes random function
+Patch600: expect-5.32.2-random.patch
+# Patch601: bz547686, no response from upstream
+Patch601: expect-5.44.1.15-unbuffer-exit-code.patch
+# Patch602: bz735962, proposed to upstream, not accepted yet
+# https://sourceforge.net/tracker/?func=detail&aid=3404914&group_id=13179&atid=113179
+Patch602: expect-5.45-passmass-su-full-path.patch
 
 Buildroot: %{_tmppath}/%{name}-%{version}-root
 BuildRequires: tcl >= %{tcl_major}
+BuildRequires: tk >= %{tcl_major}
 BuildRequires: thread >= %{thread_major}
-BuildRequires: autoconf213
+BuildRequires: autoconf
 BuildRequires: libX11-devel
+BuildRequires: chrpath
+
+Vendor: Project Vine
+Distribution: Vine Linux
 
 %description -n expect
 Expect is a tcl extension for automating interactive applications such
@@ -52,37 +75,49 @@ Obsoletes: expect <= 5.43-0vl4
 This package contains expectk and some scripts that use it.
 
 %prep
-%setup -q -n %{name}-%{majorver}
-%patch0 -p1 -b .random
-%patch6 -p2 -b .spawn
-%patch8 -p2 -b .pgrp
-%patch10 -p1 -b .libspec
-%patch11 -p1 -b .libdir
-
-# patch10 touch configure.in
-autoconf-2.13
+%setup -q
+%patch500 -p1 -b .log_file
+%patch501 -p1 -b .pkgpath
+%patch502 -p1 -b .tk-init
+%patch503 -p1 -b .match-gt-numchars-segfault
+%patch504 -p1 -b .man-page
+# examples fixes
+%patch600 -p1 -b .random
+%patch601 -p1 -b .unbuffer-exit-code
+%patch602 -p1 -b .passmass-su-full-path
+# -pkgpath.patch touch configure.in
+aclocal
+autoconf
+( cd testsuite
+  autoconf -I.. )
 
 %build
-%configure --enable-64bit \
-	--with-tcl=%{_libdir} --with-tk=%{_libdir} \
-	--with-tclinclude=%{_includedir}/tcl-private/generic \
-	--with-tkinclude=%{_includedir}/tk-private/generic \
-	--enable-shared --enable-threads --with-x=yes --enable-gcc
-make
+%configure --with-tcl=%{_libdir} --with-tk=%{_libdir} --enable-shared \
+	--with-tclinclude=%{_includedir}/tcl-private
+make %{?_smp_mflags}
+
+%check
+make test
 
 %install
 rm -rf ${RPM_BUILD_ROOT}
-mkdir -p ${RPM_BUILD_ROOT}
-make INSTALL_ROOT=%{buildroot} install
+make install DESTDIR="$RPM_BUILD_ROOT"
+
+# move
+mv "$RPM_BUILD_ROOT"%{tcl_sitearch}/expect%{version}/libexpect%{version}.so "$RPM_BUILD_ROOT"%{_libdir}
 
 # for linking with -lexpect
-ln -s libexpect%{majorver}.so "$RPM_BUILD_ROOT"%{_libdir}/libexpect.so
+ln -s libexpect%{majorver}.1.15.so "$RPM_BUILD_ROOT"%{_libdir}/libexpect.so
 
 # remove cryptdir/decryptdir, as Linux has no crypt command (bug 6668).
 rm -f "$RPM_BUILD_ROOT"%{_bindir}/{cryptdir,decryptdir}
 rm -f "$RPM_BUILD_ROOT"%{_mandir}/man1/{cryptdir,decryptdir}.1*
 rm -f "$RPM_BUILD_ROOT"%{_bindir}/autopasswd
 
+# remove rpath
+chrpath --delete $RPM_BUILD_ROOT%{_libdir}/libexpect%{version}.so
+
+
 %post -p /sbin/ldconfig -n expect
 
 %postun -p /sbin/ldconfig -n expect
@@ -108,9 +143,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_bindir}/unbuffer
 %{_bindir}/weather
 %{_bindir}/xkibitz
-%dir %{_libdir}/expect%{majorver}
-%{_libdir}/expect%{majorver}/pkgIndex.tcl
-%{_libdir}/libexpect%{majorver}.so
+%dir %{tcl_sitearch}/expect%{version}
+%{tcl_sitearch}/expect%{version}/pkgIndex.tcl
+%{_libdir}/libexpect%{version}.so
 %{_mandir}/man1/autoexpect.1.gz
 %{_mandir}/man1/dislocate.1.gz
 %{_mandir}/man1/expect.1.gz
@@ -123,8 +158,6 @@ rm -rf $RPM_BUILD_ROOT
 
 %files devel
 %defattr(-,root,root,-)
-%exclude %{_libdir}/expect%{majorver}/libexpect%{majorver}.a
-%exclude %{_libdir}/libexpect%{majorver}.a
 %{_libdir}/libexpect.so
 %{_mandir}/man3/libexpect.3*
 %{_includedir}/*
@@ -142,6 +175,28 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Fri Jan  4 2013 IWAI, Masaharu <iwai@alib.jp> 5.44.1.15-1
+- update to 5.44.1.15:sync ed Hat Enterprise Linux 6 expect-5.44.1.15-4.el6
+- add BuildRequires: tk, chrpath
+- update License: Public Domain
+- drop obsolete patches
+ - random patch (Patch0)
+ - spawn-43310 patch (Patch6)
+ - setpgrp patch (Patch8)
+ - lib spec patch (Patch10)
+ - libdir patch (Patch11)
+- add some patches from RHEL expect-5.44.1.15-4.el6
+ - fixes log file permissions patch (Patch500)
+ - fixes install location patch (Patch501)
+ - tk init patch (Patch502)
+ - match gt numchars segfault patch (Patch503)
+ - man page patch (Patch504)
+ - random patch (Patch600)
+ - unbuffer exit code patch (Patch601)
+ - passmass su full path Patch (Patch602)
+- update build and install section: sync RHEL expect-5.44.1.15-4.el6
+- add Vendor and Distribution tags
+
 * Tue Apr 19 2011 MATSUBAYASHI Kohji <shaolin@vinelinux.org> - 5.43-5
 - add missing BuildRequires: libX11-devel