File xiterm.spec of Package xiterm

#
# spec file for package xiterm (Version 0.5.20040304)
#
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#



Name:           xiterm
BuildRequires:  fribidi-devel gtk2-devel ncurses-devel update-desktop-files utempter xorg-x11 xorg-x11-devel
%if "%(xft-config --prefix)" == "/usr"
%define	appdefdir  /usr/share/X11
%define xincludes  /usr/include
%define xlibraries /usr/%{_lib}
%else
%define	appdefdir  /usr/X11R6/lib/X11
%define xincludes  /usr/X11R6/include
%define xlibraries /usr/X11R6/%{_lib}
%endif
License:        IBM Public License
Group:          System/X11/Terminals
AutoReqProv:    on
Provides:       locale(xorg-x11:ja;ko;zh)
Version:        0.5.20040304
Release:        259
# cvs -d:pserver:anonymous@www.openi18n.org:/cvsroot login (no password to login)
# cvs -d:pserver:anonymous@www.openi18n.org:/cvsroot co iterm
# tar jcvf iterm-0.5.20040304.tar.bz2 iterm
Source0:        iterm-0.5.20040304.tar.bz2
Source1:        fonts.tar.bz2
Patch0:         xiterm-fontset.patch
Patch1:         fbiterm-enhance.dif
Patch2:         intptr.patch
Patch3:         null-pointer.patch
Patch4:         enable-scrollbar.patch
Patch5:         fbiterm-exit-code.dif
Patch6:         fbiterm-devconsole.dif
Patch7:         fbiterm-combine-optimize.patch
Patch8:         xiterm-implicit-fortify-decl.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Summary:        Internationalized Terminal Emulator for X11

%description
Internationalized Terminal Emulator for X11



Authors:
--------
    Jiro SEKIBA <jir@yamato.ibm.com>

%package -n fbiterm
License:        IBM Public License
Summary:        Internationalized Terminal Emulator for Framebuffers
Group:          System/X11/Terminals
Provides:       locale(ja;ko;zh)

%description -n fbiterm
An internationalized terminal emulator for framebuffers.



Authors:
--------
    Jiro SEKIBA <jir@yamato.ibm.com>
    WASHIZAWA Masahide <washi@jp.ibm.com>

%package -n gtkiterm
License:        IBM Public License
Summary:        Internationalized Terminal Emulator for GTK
Group:          System/X11/Terminals
Provides:       locale(gtk2:ja;ko;zh)

%description -n gtkiterm
An internationalized terminal emulator for GTK.



Authors:
--------
    Jiro SEKIBA <jir@yamato.ibm.com>

%package -n libiterm
License:        IBM Public License
Group:          System/Libraries
Summary:        Internationalized Terminal Emulator Library

%description -n libiterm
This is a portable library for internationalized terminal emulator. All
you need to make terminal emulator is to implements Callback functions,
like a drawing string on specific column and row, or set
fore/background color and so on.



Authors:
--------
    Jiro SEKIBA <jir@yamato.ibm.com>

%package -n libiterm-devel
License:        IBM Public License
Summary:        Header files and development libraries for libiterm
Group:          Development/Libraries/Other
Requires:       libiterm = %{version}

%description -n libiterm-devel
Header files and development libraries for libiterm



Authors:
--------
    Jiro SEKIBA <jir@yamato.ibm.com>

%package -n libXiterm
License:        IBM Public License
Group:          System/Libraries
Summary:        Terminal emulator Xaw widget library based on libiterm

%description -n libXiterm
Terminal emulator Xaw widget library based on libiterm



Authors:
--------
    Jiro SEKIBA <jir@yamato.ibm.com>

%package -n libXiterm-devel
License:        IBM Public License
Summary:        Header files and development libraries for libXiterm
Group:          Development/Libraries/Other
Requires:       libXiterm = %{version}

%description -n libXiterm-devel
Header files and development libraries for libXiterm



Authors:
--------
    Jiro SEKIBA <jir@yamato.ibm.com>

%prep
%setup0 -q -n iterm -a 1
%patch0 -p 1 -b .fontset
%patch1 -p 0
%patch2 -p 0 -b .intptr
%patch3 -p 1 -b .null-pointer
%patch4 -p 1 -b .enable-scrollbar
%patch5 -p 0 -b .exit-code
%patch6 -p 0
%patch7
%patch8
find . -name CVS -type d | xargs rm -rf
find . -name .cvsignore -type f | xargs rm -f
find . -type f | xargs chmod u+w
for i in INSTALL* README*
do
   mv $i $i.framework
done

%build
%{?suse_update_config:%{suse_update_config -f lib unix/Xaw/lib unix/Xaw/src unix/fbiterm }}
export CFLAGS="$RPM_OPT_FLAGS"
pushd lib
    autoreconf --force --install
%configure --with-pic --disable-static --x-includes=%{xincludes} \
		--x-libraries=%{xlibraries} \
		--with-utempter \
		--enable-fribidi
%{__make} %{?jobs:-j%jobs}
popd
pushd unix/Xaw/lib
    autoreconf --force --install
%configure --with-pic --disable-static --x-includes=%{xincludes} \
		--x-libraries=%{xlibraries}
    %{__make} %{?jobs:-j%jobs} 'INCLUDES=-I../../../lib/include -I../lib'
popd
pushd unix/Xaw/src
autoreconf --force --install
%configure --with-pic --disable-static --x-includes=%{xincludes} \
		--x-libraries=%{xlibraries}
    %{__make} %{?jobs:-j%jobs} 'INCLUDES=-I../../../lib/include -I../lib' 'LDFLAGS=-L../../../lib/src/.libs -L../lib/.libs'
popd
pushd unix/fbiterm
    autoreconf -I /opt/gnome/share/aclocal --force --install
    export LIBS="-lfreetype -lm"
%configure --with-pic --disable-static \
		--x-includes=%{xincludes} \
		--x-libraries=%{xlibraries}
    %{__make} %{?jobs:-j%jobs}  'INCLUDES=-I../../../lib/include' \
         'LDFLAGS=-L../../../lib/src/.libs'
popd
pushd unix/gtk
    %{__make} %{?jobs:-j%jobs} CFLAGS="$CFLAGS -I../../../lib/include -L../../../lib/src/.libs"
popd

%install
pushd lib
   make DESTDIR=$RPM_BUILD_ROOT install
popd
pushd unix/Xaw/lib
   make DESTDIR=$RPM_BUILD_ROOT install
popd
pushd unix/Xaw/src
   make DESTDIR=$RPM_BUILD_ROOT install
popd
pushd unix/fbiterm
   make DESTDIR=$RPM_BUILD_ROOT install
popd
pushd unix/gtk
    install -m 755 src/gtkiterm $RPM_BUILD_ROOT/usr/bin
popd
# install terminfo entry-description
mkdir -p $RPM_BUILD_ROOT/usr/share/terminfo/i
tic -o $RPM_BUILD_ROOT/usr/share/terminfo/ unix/terminfo/iterm.terminfo
mkdir -p $RPM_BUILD_ROOT%{appdefdir}/{ja,ja_JP.UTF-8,}/app-defaults
install -m 644 unix/Xaw/src/XIterm $RPM_BUILD_ROOT%{appdefdir}/app-defaults/XIterm
install -m 644 unix/Xaw/src/XIterm.ja $RPM_BUILD_ROOT%{appdefdir}/ja/app-defaults/XIterm
iconv -f EUC-JP -t UTF-8 < unix/Xaw/src/XIterm.ja > unix/Xaw/src/XIterm.ja.UTF-8
install -m 644 unix/Xaw/src/XIterm.ja.UTF-8 $RPM_BUILD_ROOT%{appdefdir}/ja_JP.UTF-8/app-defaults/XIterm
# install fallback fonts for fbiterm:
mkdir -p $RPM_BUILD_ROOT/usr/share/fbiterm/fonts
pushd fonts
    for i in *.bdf
    do
	bdftopcf ${i} | gzip --best --stdout --force > $RPM_BUILD_ROOT/usr/share/fbiterm/fonts/${i%.bdf}.pcf.gz
    done
popd
rm -f %{buildroot}%{_libdir}/*.la

%post -n libiterm -p /sbin/ldconfig

%postun -n libiterm -p /sbin/ldconfig

%post -n libXiterm -p /sbin/ldconfig

%postun -n libXiterm -p /sbin/ldconfig

%clean

%files
%defattr(-, root, root)
%doc unix/Xaw/README* unix/Xaw/src/{COPYING,ChangeLog,INSTALL*}
%attr(555,root,tty) %{_bindir}/xiterm
%{appdefdir}/app-defaults/*
%dir %{appdefdir}/ja/
%dir %{appdefdir}/ja/app-defaults/
%dir %{appdefdir}/ja_JP.UTF-8/
%dir %{appdefdir}/ja_JP.UTF-8/app-defaults/
%{appdefdir}/*/app-defaults/*

%files -n fbiterm
%defattr(-, root, root)
%doc unix/fbiterm/{AUTHORS,COPYING,ChangeLog,INSTALL,NEWS,README*}
%attr(555,root,tty) %{_bindir}/fbiterm
%dir /usr/share/fbiterm/
%dir /usr/share/fbiterm/fonts
/usr/share/fbiterm/fonts/*

%files -n gtkiterm
%defattr(-, root, root)
%doc unix/gtk/README*
%attr(555,root,tty) %{_bindir}/gtkiterm

%files -n libiterm
%defattr(-, root, root)
%{_libdir}/libiterm*.so.*
/usr/share/terminfo/i/iterm*

%files -n libiterm-devel
%defattr(-, root, root)
%doc README* INSTALL* RELNOTES* lib/{COPYING,README*,INSTALL*,ChangeLog} lib/docs/
%doc unix/terminfo/
%{_libdir}/libiterm*.so
/usr/include/iterm/

%files -n libXiterm
%defattr(-, root, root)
%{_libdir}/libXiterm*.so.*

%files -n libXiterm-devel
%defattr(-, root, root)
%doc unix/Xaw/lib/ChangeLog
%{_libdir}/libXiterm*.so
/usr/include/Iterm*.h

%changelog
* Wed Oct 15 2008 crrodriguez@suse.de
- fix implicit-fortify-decl issues
- remove static libraries and "la" files
* Mon Mar 03 2008 mfabian@suse.de
- make rpmlint happy:
  • add post-scripts with ldconfig calls for the library packages.
  • remove BuildRequires for suse_version <= 910.
* Fri Mar 30 2007 ro@suse.de
- added ncurses-devel to buildreq
* Fri Feb 02 2007 uli@suse.de
- fbiterm: add support for combining characters (fixes Thai, Lao),
  remove getenv() call from inner loop, minor optimizations
* Tue Aug 15 2006 mfabian@suse.de
- prefer fonts in /usr/share/fonts over fonts in
  /usr/lib/X11/fonts (move to X11R7).
* Mon Aug 07 2006 mfabian@suse.de
- fix build for SUSE LINUX 10.0 in the openSUSE build service
  (aclocal.m4 was not writeable).
* Fri Aug 04 2006 mfabian@suse.de
- adapt for Xorg X11R7 (paths changed).
* Tue Feb 28 2006 mfabian@suse.de
- add "Provides: locale(...)".
* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
* Tue Aug 02 2005 ro@suse.de
- use gtk2-devel-packages in nfb
* Mon May 10 2004 tiwai@suse.de
- allow to run fbiterm on /dev/console (bug #40134).
- reverted the last fix for libXfont and freetype linking.
* Mon Apr 19 2004 tiwai@suse.de
- link libXfont and freetype statically with fbiterm
  (bug #39141)
* Mon Apr 05 2004 mfabian@suse.de
- Bugzilla 38365: add 8x16.bdf (from XFree86) and b16.bdf
  (from efont-unicode) as fallback fonts.
* Fri Apr 02 2004 tiwai@suse.de
- return the exit code of the child process.
* Thu Apr 01 2004 tiwai@suse.de
- enhancement to fbiterm: allow direct invokation of commands,
  default font lists, -s option to accept font size via cmdline.
- fixed handling of fonts in fbiterm.  now GNU unifont works fine.
* Tue Mar 09 2004 mfabian@suse.de
- Bugzilla #34267: enable fribidi on x86_64 again, the problem
  was fixed by compiling fribidy with "-fno-strict-aliasing".
* Fri Mar 05 2004 mfabian@suse.de
- disable fribidi for the moment on x86_64, because xiterm and
  fbiterm crash immediately on this platform when fribidi is
  enabled.
- add intptr.patch to remove some compile warnings.
* Thu Mar 04 2004 mfabian@suse.de
- update to 0.5.20040304.
- remove first-column-missing.patch, xiterm.patch
  (included upstream).
* Wed Nov 05 2003 ro@suse.de
- fix build
* Sat Sep 20 2003 mfabian@suse.de
- Bugzilla #31448: the first character of each line/row
  was always missing in fbiterm.
* Mon Aug 25 2003 mfabian@suse.de
- update to 0.5.20030825.
- remove fbiterm-no-suid.patch, gtkiterm.patch (included upstream).
- fix typo in xiterm-fontset.patch
  (VT*fontSet1 had a trailing ',').
* Mon Jul 14 2003 sbrabec@suse.cz
- GNOME prefix change to /opt/gnome.
* Sat Jun 14 2003 mfabian@suse.de
- fix "directory not owned by any package".
* Thu Jan 30 2003 mfabian@suse.de
- update to 0.5.20030129
- add fbiterm-no-suid.patch and remove suid root bit from
  /usr/bin/fbiterm (with help from Gerd Knorr <kraxel@suse.de>
- add gtkiterm
* Sun Dec 22 2002 mfabian@suse.de
- remove xiterm.patch, xiterm-screen_visual_row.c.patch
  (included upstream)
- add --with-utempter configure option and 'utempter' to
  '# neededforbuild'
* Wed Dec 11 2002 mfabian@suse.de
- update to 0.4.20021206
- merge libiterm.spec and libXiterm.spec into xiterm.spec
- add xiterm.patch (thanks Gerd Knorr <kraxel@suse.de>)
  and xiterm-screen_visual_row.c.patch to make it work on x86_64.
* Wed Oct 23 2002 mfabian@suse.de
- update to 0.3.20021023
* Wed Oct 23 2002 mfabian@suse.de
- update to 0.3.20021022
* Thu Oct 03 2002 mfabian@suse.de
- new packages: xiterm and fbiterm version 0.2.20021001