# # spec file for package x3270 (Version 3.2.20) # # Copyright (c) 2006 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # # Please submit bugfixes or comments via http://bugs.opensuse.org/ # # norootforbuild Name: x3270 %if %suse_version > 910 BuildRequires: xorg-x11 xorg-x11-devel %else BuildRequires: XFree86 XFree86-devel %endif %if "%(xft-config --prefix)" == "/usr" %define fontdir /usr/share/fonts/misc %define appdefdir /usr/share/X11 %define xbindir /usr/bin %define xmandir /usr/share/man %define xincludes /usr/include %define xlibraries /usr/%{_lib} %else %define fontdir /usr/X11R6/lib/X11/fonts/misc %define appdefdir /usr/X11R6/lib/X11 %define xbindir /usr/X11R6/bin %define xmandir /usr/X11R6/man %define xincludes /usr/X11R6/include %define xlibraries /usr/X11R6/%{_lib} %endif BuildRequires: freetype2 tcl-devel License: X11/MIT, Other License(s), see package Group: System/X11/Terminals Autoreqprov: on Version: 3.2.20 Release: 322 Summary: A Family of IBM 3270 Terminal Emulators URL: http://x3270.bgp.nu Source0: http://x3270.bgp.nu/download/x3270-334p4.tgz Source1: http://x3270.bgp.nu/download/s3270-334p3.tgz Source2: http://x3270.bgp.nu/download/tcl3270-334p3.tgz Source3: http://x3270.bgp.nu/download/pr3287-334.tgz Source4: http://x3270.bgp.nu/download/c3270-334p3.tgz Source5: README.SuSE Source6: http://x3270.bgp.nu/download/x026-1.0.tgz Patch: mknod.patch Patch100: usr_local_bin.patch Patch101: tcl8.4.patch Patch102: x026-offset.diff Patch103: gcc-322.diff Patch104: pr3270-memleak.patch Patch105: gcc4.diff Group: System/X11/Terminals BuildRoot: %{_tmppath}/%{name}-%{version}-build %description This package contains a family of IBM 3270 mainframe terminal emulators: * terminal emulators for interactive use x3270 X Window System c3270 curses based * terminal emulators for scripted use s3270 see the x3270-script man page tcl3270 Tcl based * printer emulator pr3287 * do not miss the punch card puncher emulator x026 x3270 is an IBM 3270 terminal emulator for the X Window System. x3270 runs over a telnet connection (with or without TN3270E) and emulates either an IBM 3279 (color) or 3278 (monochrome). It supports APL2 characters, IND$FILE file transfer, NVT mode, a pop-up keypad for 3270-specific keys, alternative keymaps, 3287 printer sessions, and a scrollbar and has extensive debugging and scripting facilities. c3270 is the curses-based version of x3270. It runs on any dumb terminal (an xterm or a console, for example), and supports (almost) all of the x3270 features. c3270 scripts are compatible with x3270 scripts, and the subset of command line options and resource definitions are also compatible. s3270 is a scripting-only version of x3270. This program is intended primarily for writing "screen-scraping" applications, for example a CGI back-end script that retrieves database information from a mainframe. tcl3270 is a Tcl-based 3270 scripting engine. It lets you write Tcl scripts that manipulate 3270 sessions, and is quite a bit easier to set up and use than s3270. pr3287 is the printer companion for the above tools, and allows printer output from a 3270 session to be directed to a Unix printer queue. x026 is a fun toy which emulates an x026 puncher. Authors: -------- Paul Mattes %prep # the source-packages all extract to corresponding subdirectories. # they are all expanded below a 'all3270' directory. this directory # will also hold the common config.cache # -q uietly -c reate -name all3270 # -a fter changing into all3270, expand sources %setup -q -c -n all3270 -T -a0 -a1 -a2 -a3 -a4 -a6 %patch %patch100 %patch101 %patch102 %patch103 %patch104 %patch105 %build export CFLAGS="$RPM_OPT_FLAGS" export LIBX3270DIR=/etc/x3270 # the tcl variant cd tcl3270-3.3 %{?suse_update_config:%{suse_update_config -f .}} autoconf TCL_VERSION=$(echo 'puts [package require Tcl]' | tclsh) TCLX_VERSION=$(echo 'puts [package require Tclx]' | tclsh) ./configure \ --cache-file=../config.cache \ --bindir=%{_bindir} \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --with-tcl=$TCL_VERSION # --with-tclx=$TCLX_VERSION make LIBX3270DIR=${LIBX3270DIR} cd .. # the X variant cd x3270-3.3 %{?suse_update_config:%{suse_update_config -f .}} # pr3287 is built from the separate source pr3287*.tgz above. ./configure \ --cache-file=../config.cache \ --prefix=%{_prefix} \ --enable-app-defaults \ --without-pr3287 \ --x-includes=%{xincludes} \ --x-libraries=%{xlibraries} \ --mandir=%{xmandir} \ --with-all-xinstall \ --with-fontdir=%{fontdir} xmkmf -a make depend make LIBX3270DIR=${LIBX3270DIR} cd .. # the console variant cd c3270-3.3 %{?suse_update_config:%{suse_update_config -f .}} ./configure \ --cache-file=../config.cache \ --bindir=%{_bindir} \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --without-pr3287 make LIBX3270DIR=${LIBX3270DIR} cd .. # the scripting variant cd s3270-3.3 %{?suse_update_config:%{suse_update_config -f .}} ./configure \ --cache-file=../config.cache \ --bindir=%{_bindir} \ --prefix=%{_prefix} \ --mandir=%{_mandir} make LIBX3270DIR=${LIBX3270DIR} cd .. # the printer cd pr3287-3.3 %{?suse_update_config:%{suse_update_config -f .}} ./configure \ --cache-file=../config.cache \ --bindir=%{_bindir} \ --prefix=%{_prefix} \ --mandir=%{_mandir} make LIBX3270DIR=${LIBX3270DIR} cd .. # the IBM 026 keypunch emulator cd x026-1.0 xmkmf make x026 cd .. %install export LIBX3270DIR=/etc/x3270 # abort on error set -e # if RPM_BUILD_ROOT is set, clean it up ${RPM_BUILD_ROOT:+rm -rf $RPM_BUILD_ROOT} # create the default directory structure in the build root mkdir --parents $RPM_BUILD_ROOT{/usr/bin,%{_mandir}/{man1,man5}} # the X variant cd x3270-3.3 make DESTDIR=$RPM_BUILD_ROOT LIBX3270DIR=${LIBX3270DIR} install make DESTDIR=$RPM_BUILD_ROOT LIBX3270DIR=${LIBX3270DIR} install.man # make install does a mkfontdir, that creates a fonts.dir we don't # want in the package. remove that: rm $RPM_BUILD_ROOT%{fontdir}/fonts.dir install -d -m 755 \ $RPM_BUILD_ROOT%{appdefdir}/app-defaults install -m 644 X3270.xad \ $RPM_BUILD_ROOT%{appdefdir}/app-defaults/X3270 # clean up: # remove remainders of patching the examples rm Examples/*.orig cd .. # the console variant cd c3270-3.3 make DESTDIR=$RPM_BUILD_ROOT LIBX3270DIR=${LIBX3270DIR} install make DESTDIR=$RPM_BUILD_ROOT LIBX3270DIR=${LIBX3270DIR} install.man cd .. # the scripting variant cd s3270-3.3 make DESTDIR=$RPM_BUILD_ROOT LIBX3270DIR=${LIBX3270DIR} install make DESTDIR=$RPM_BUILD_ROOT LIBX3270DIR=${LIBX3270DIR} install.man cd .. # the tcl variant cd tcl3270-3.3 make DESTDIR=$RPM_BUILD_ROOT LIBX3270DIR=${LIBX3270DIR} install make DESTDIR=$RPM_BUILD_ROOT LIBX3270DIR=${LIBX3270DIR} install.man cd .. # the printer cd pr3287-3.3 make DESTDIR=$RPM_BUILD_ROOT LIBX3270DIR=${LIBX3270DIR} install make DESTDIR=$RPM_BUILD_ROOT LIBX3270DIR=${LIBX3270DIR} install.man cd .. # the IBM 026 keypunch emulator cd x026-1.0 make DESTDIR=$RPM_BUILD_ROOT install cd .. # move site config files to the standard locations mkdir -p $RPM_BUILD_ROOT/usr/lib/x3270 # this is a per-site, not a per-machine config file chmod 644 $RPM_BUILD_ROOT/etc/x3270/ibm_hosts cp -a %{S:5} . # remove man-pages in /usr/man rm -rf $RPM_BUILD_ROOT/usr/man/man{1,5} # set permissions correct chmod ugo-x $RPM_BUILD_ROOT/usr/share/man/man{1,5}/* %clean #${RPM_BUILD_ROOT:+rm -rf $RPM_BUILD_ROOT} %files %defattr(-,root,root,755) # common files %dir /etc/x3270 %config(noreplace) /etc/x3270/ibm_hosts %doc /usr/share/man/man5/ibm_hosts.5.gz %doc /usr/share/man/man1/x3270if.1.gz %doc /usr/share/man/man1/x3270-script.1.gz /usr/bin/x3270if # x3270 %{xbindir}/x3270 %config %{appdefdir}/app-defaults/X3270 %dir %{fontdir} %{fontdir}/* %doc %{xmandir}/man1/x3270.1x.gz %doc --parents x3270-3.3/Examples %doc --parents x3270-3.3/html %doc --parents x3270-3.3/Playback # c3270 /usr/bin/c3270 %doc /usr/share/man/man1/c3270.1.gz %doc --parents c3270-3.3/html # pr3287 /usr/bin/pr3287 %doc /usr/share/man/man1/pr3287.1.gz %doc --parents pr3287-3.3/html # s3270 /usr/bin/s3270 %doc /usr/share/man/man1/s3270.1.gz %doc --parents s3270-3.3/Examples %doc --parents s3270-3.3/html # tcl3270 /usr/bin/tcl3270 %doc /usr/share/man/man1/tcl3270.1.gz %doc --parents tcl3270-3.3/Examples %doc --parents tcl3270-3.3/html # x026 %{xbindir}/x026 %doc %attr(644,root,root) README.SuSE %changelog -n x3270 * Fri Nov 10 2006 - ihno@suse.de - fixing wrong permissions of man pages * Thu Aug 10 2006 - mfabian@suse.de - move fonts, binaries, man-pages to the new paths used by X11R7 (fixes build in STABLE). - use RPM_OPT_FLAGS * Thu Feb 16 2006 - ro@suse.de - fix directory permissions * Wed Jan 25 2006 - mls@suse.de - converted neededforbuild to BuildRequires * Mon Jun 20 2005 - yxu@suse.de - fixed patch to apply * Thu Jun 16 2005 - yxu@suse.de - update sources to version 3.3.4 * Thu Apr 21 2005 - coolo@suse.de - fix compilation * Tue May 11 2004 - hare@suse.de - Do not call mkfontsdir to avoid dependency problems (#40318). * Wed Apr 28 2004 - hare@suse.de - Fix memleak in pr3270 (#39528). * Fri Feb 27 2004 - hare@suse.de - Update to 3.3.2p1. * Sat Jan 10 2004 - adrian@suse.de - fix to build as user * Sun Nov 02 2003 - ro@suse.de - updated neededforbuild * Mon Aug 11 2003 - hare@suse.de - Fixed ppc64 build problems. - Fixed gcc-3.3 compilation warnings. * Fri Jul 18 2003 - hare@suse.de - Added freetype2 to prerequisites. * Thu Jun 12 2003 - kukuk@suse.de - Fix filelist * Fri Jun 06 2003 - mmj@suse.de - Remove unwanted files from BuildRoot. * Mon Feb 24 2003 - froh@suse.de - updated to 3.2.20 bug fix only drop which incoroprates all the patches we had on top of 3.2.19 * Wed Nov 27 2002 - sf@suse.de - added patch x3270-3.2.19.x86_64.diff to prevent segfaulting on x86_64 * Thu Sep 26 2002 - ro@suse.de - removed bogus self-provides again (3rd time) * Thu Sep 26 2002 - froh@suse.de - during installation with YaST, mkfontdir will be called by yast automatically. thus added test to %%-post* scripts to not run mkfontdir in case the package is installed from withing YaST. (#20127) * Mon Sep 23 2002 - froh@suse.de - drop use of chroot and relative paths in %%post/%%postun (#20011) and replace xf86 in PreReq by name of mkfontdir binary - fix date in README.SuSE * Tue Aug 20 2002 - ro@suse.de - built tcl3270 without tclx * Tue Aug 13 2002 - froh@suse.de - add pacthes for known bugs * R1: x3270 Not Recognizing crosshair Resource * R2: c3270 Goes Into Tight Loop on End-of-File * R3: Screen Resizing Broken (this one hit us) * R4: Keymap Saved as 'base' * Sun Jul 28 2002 - kukuk@suse.de - Add xf86 again * Sat Jul 27 2002 - adrian@suse.de - fix neededforbuld and PreRequires * Fri Jul 12 2002 - max@suse.de - Fixed tcl3270-3.2/configure.in for tcl8.4 * Mon Jul 01 2002 - froh@suse.de - updated to current release 3.2.19 - added the state of the art IBM 026 keypunch emulator :) * Tue Feb 19 2002 - froh@suse.de - added most recent bugfixes from x3270 site - switched to the new simpler all-in-one-tarball * Fri Jan 25 2002 - froh@suse.de - upgraded to current release 3.2.18 + current bugfixes * Sun Dec 09 2001 - ro@suse.de - there is no /usr/etc allowed in fhs 2.2 * Tue Nov 20 2001 - froh@suse.de - added current patches from x3270 site: * fixed cut&paste if selection is spanning several lines * keymap fix (C-u and C-w definitions had been hidden) * Wed Oct 31 2001 - bk@suse.de - use mode 644 for config file /usr/etc/x3270/ibm_hosts * Thu Oct 18 2001 - bk@suse.de - make ibm_hosts file noreplace(file format was not updated, old can be used) * Mon Jul 30 2001 - froh@suse.de - patched /usr/local/bin to /usr/bin in a new expect script below s3270/Examples/* and checked that no /usr/local are left :) * Wed Jul 25 2001 - froh@suse.de - patched away /usr/local/bin in a new shell script below x3270/Examples/* * Tue Jul 24 2001 - froh@suse.de - upgraded to current release 3.2.17 + current bugfixes * Wed Mar 28 2001 - froh@suse.de - use 'size_t' consistently instead of 'unsigned' to make pr3278 build on axp (use-size_t.diff) * Wed Mar 28 2001 - froh@suse.de - upgraded to current version 3.2.16 - added c3270, tcl3270, s3270 and made them coexist with each other (common config file, shared helpers) * Thu Nov 30 2000 - fober@suse.de - upgraded to current version 3.2.14 - adopted to current FHS - introduced BuildRoot to clean up %%files-section * Fri Oct 27 2000 - fober@suse.de - fixed calling of mkfontdir(needs chroot if no xshared in instsys) in %%postun as well * Mon Oct 09 2000 - bk@suse.de - fixed calling of mkfontdir(needs chroot if no xshared in instsys) in %%postin * Wed Jun 07 2000 - ro@suse.de - fixed path for mkfontdir * Tue Feb 01 2000 - mkraft@suse.de - updated to new (alpha) version 3.2, some changes to spec file - pre- and postinstall scripts to rebuild fonts.dir * Mon Sep 13 1999 - bs@suse.de - ran old prepare_spec on spec file to switch to new prepare_spec. * Wed Mar 17 1999 - ro@suse.de - remove .orig with -f * Sat Sep 19 1998 - ro@suse.de - dont redeclare sys_errlist for glibc * Thu Jul 23 1998 - werner@suse.de - Check exit status of mknod in peer_script.(ba)sh * Mon Nov 17 1997 - ro@suse.de - changes /usr/local/bin/expect to /usr/bin/expect and /bin/ksh to /usr/bin/ksh * Mon Oct 13 1997 - hf@suse.de - ready for autobuild * Fri Jun 06 1997 - bs@suse.de - removed usr/X11R6/lib/X11/fonts/misc/fonts.dir * Mon Jun 02 1997 - hf@suse.de Added the x3270 app-defaults file. * Wed May 21 1997 - hf@suse.de A new version 3.1.1.6 x3270 is an IBM 3278/3279 terminal emulator for X windows.