summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2021-10-21 16:41:33 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2021-10-21 16:41:56 +0900
commitae2ccfecaa276ff1ad82692d5beda6073f63244c (patch)
tree33057484c46618eb30f378dd3143c65415ee9e0d
parentd9fead2bd551129a4e8d5097a3cd7de1fee057c6 (diff)
downloadexpect-ae2ccfecaa276ff1ad82692d5beda6073f63244c.tar.gz
expect-ae2ccfecaa276ff1ad82692d5beda6073f63244c.tar.bz2
expect-ae2ccfecaa276ff1ad82692d5beda6073f63244c.zip
Change-Id: Iafc6fc8d34a93171bbcd6c57db6ef875eabac066 Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
-rw-r--r--packaging/add_pie_compile_option.patch14
-rw-r--r--packaging/expect-rpmlintrc3
-rw-r--r--packaging/expect.manifest5
-rw-r--r--packaging/expect.spec69
4 files changed, 91 insertions, 0 deletions
diff --git a/packaging/add_pie_compile_option.patch b/packaging/add_pie_compile_option.patch
new file mode 100644
index 0000000..f7b7495
--- /dev/null
+++ b/packaging/add_pie_compile_option.patch
@@ -0,0 +1,14 @@
+diff --git a/Makefile.in b/Makefile.in
+index 2d36791..6bd4219 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -396,7 +396,8 @@ expect: exp_main_exp.o $(PKG_LIB_FILE)
+ @TCL_LIB_SPEC@ \
+ @TCL_DL_LIBS@ @PKG_LIBS@ @MATH_LIBS@ \
+ @TCL_CC_SEARCH_FLAGS@ \
+- @EXP_CC_SEARCH_FLAGS@
++ @EXP_CC_SEARCH_FLAGS@ \
++ -pie
+ $(SETUID) expect
+
+ expectk:
diff --git a/packaging/expect-rpmlintrc b/packaging/expect-rpmlintrc
new file mode 100644
index 0000000..17314dc
--- /dev/null
+++ b/packaging/expect-rpmlintrc
@@ -0,0 +1,3 @@
+addFilter("no-soname")
+addFilter("files-duplicate")
+addFilter("package-with-huge-docs")
diff --git a/packaging/expect.manifest b/packaging/expect.manifest
new file mode 100644
index 0000000..017d22d
--- /dev/null
+++ b/packaging/expect.manifest
@@ -0,0 +1,5 @@
+<manifest>
+ <request>
+ <domain name="_"/>
+ </request>
+</manifest>
diff --git a/packaging/expect.spec b/packaging/expect.spec
new file mode 100644
index 0000000..50b2ae9
--- /dev/null
+++ b/packaging/expect.spec
@@ -0,0 +1,69 @@
+Name: expect
+Version: 5.45.4
+Release: 0
+Summary: A Tool for Automating Interactive Programs
+License: Public-Domain
+Group: Development/Languages/Tcl
+Url: http://expect.nist.gov
+Source: %{name}%{version}.tar.gz
+Source1: expect-rpmlintrc
+Source2: add_pie_compile_option.patch
+Source1001: expect.manifest
+
+BuildRequires: autoconf
+BuildRequires: tcl-devel
+
+%description
+Expect is a tool primarily for automating interactive applications,
+such as telnet, ftp, passwd, fsck, rlogin, tip, and more. Expect
+really makes this stuff trivial. Expect is also useful for testing
+these applications. It is described in many books, articles, papers,
+and FAQs. There is an entire book on it available from O'Reilly.
+
+%package devel
+Summary: Header Files and C API Documentation for expect
+Group: Development/Libraries/Tcl
+
+%description devel
+This package contains header files and documentation needed for linking
+to expect from programs written in compiled languages like C, C++, etc.
+This package is not needed for developing scripts that run under the
+/usr/bin/expect interpreter, or any other Tcl interpreter with the
+expect package loaded.
+
+%prep
+%setup -q -n %name%version
+cp %{SOURCE1001} .
+%{__patch} -p1 < %{SOURCE2}
+
+%build
+%reconfigure \
+ --with-tcl=%_libdir \
+ --with-tk=no_tk \
+ --with-tclinclude=%_includedir \
+ --enable-shared
+
+make %{?_smp_mflags} all
+
+# %check
+# make test
+
+%install
+make install DESTDIR=$RPM_BUILD_ROOT
+# Remove some executables and manpages we don't want to ship
+rm $RPM_BUILD_ROOT%_prefix/bin/*passwd
+rm $RPM_BUILD_ROOT%_mandir/*/*passwd*
+
+%{remove_docs}
+
+%files
+%manifest %{name}.manifest
+%{_prefix}/bin/*
+%{_libdir}/%{name}%{version}/lib*.so
+%{_libdir}/%{name}%{version}/pkgIndex.tcl
+
+%files devel
+%manifest %{name}.manifest
+%{_includedir}/*
+
+%changelog