Sophie

Sophie

distrib > Mandriva > 2008.1 > i586 > media > main-release-src > by-pkgid > 85e123f45b1334439ff511afdd9520ad > files > 7

xterm-232-1mdv2008.1.src.rpm

%define	Summary	The standard terminal emulator for the X Window System

Summary:	%{Summary}
Name:		xterm
Version:	232
Release:	%mkrel 1
Source0:	ftp://invisible-island.net/xterm/%{name}-%{version}.tgz
Source1:	ftp://invisible-island.net/xterm/%{name}-%{version}.tgz.asc
Source11:	%{name}-16x16.png
Source12:	%{name}-32x32.png
Source13:	%{name}-48x48.png

# from http://www.vim.org/scripts/script.php?script_id=1349, public domain
Source20:   colortest.pl

Url:		http://invisible-island.net/xterm/
License:	MIT
Group:		Terminals
BuildRequires: libxrender-devel
BuildRequires: libxmu-devel
BuildRequires: libxext-devel
BuildRequires: libxt-devel
BuildRequires: libxau-devel
BuildRequires: libxdmcp-devel
BuildRequires: libxp-devel
BuildRequires: libxaw-devel
BuildRequires: libxpm-devel
BuildRequires: libxft-devel
BuildRequires: libncurses-devel
BuildRequires: luit
BuildRoot: %{_tmppath}/%{name}-%{version}-%{version}-buildroot
Conflicts: XFree86 < 3.3.6-13mdk
Requires: luit
Requires(post,postun):	update-alternatives

%description
The XTerm program is the standard terminal emulator for the X Window System. It
provides DEC VT102/VT220 and Tektronix 4014 compatible terminals for programs
that can't use the window system directly. If the underlying operating system
supports terminal resizing capabilities (for example, the SIGWINCH signal in
systems derived from 4.3bsd), xterm will use the facilities to notify programs
running in the window whenever it is resized.

The xterm included in this package has support for 256 colors enabled.

%prep
%setup -q
cp %{SOURCE20} .

%build
%configure \
   --disable-full-tgetent \
   --enable-wide-chars \
   --x-includes=%{_includedir}/freetype2 \
   --enable-luit \
   --enable-256-color \
   --with-app-defaults=%{_libdir}/X11/app-defaults

%make

%install
rm -rf $RPM_BUILD_ROOT
make DESTDIR=$RPM_BUILD_ROOT install

# NOTE: encodingMode: locale means to follow the charset encoding of the
# locale. A quite complete unicode font is set as the default (instead of the
# very poor "fixed" one). a quick cat is used instead of patching the sources;
# it shoulmd be made the default imho
# locale: true means to use luit to convert locale encoding to unicode
# for display.
# luit support is needed for it to work -- pablo
cat << EOF >> $RPM_BUILD_ROOT%{_libdir}/X11/app-defaults/XTerm

*.vt100.font: -misc-fixed-medium-r-normal--15-140-75-75-c-90-iso10646-1
*.vt100.encodingMode: locale
*.locale: true
*.PtyInitialErase: on
*.backarrowKeyIsErase: on
EOF

mkdir -p $RPM_BUILD_ROOT%{_datadir}/applications
cat > $RPM_BUILD_ROOT%{_datadir}/applications/mandriva-%{name}.desktop << EOF
[Desktop Entry]
Name=XTerm
Comment=%Summary
Exec=%{name} -name Terminal
Icon=xterm-terminal
Terminal=false
Type=Application
StartupNotify=true
Categories=TerminalEmulator;System;Utility;
EOF

for xpm in xterm{-color_32x32,-color_48x48,_32x32,_48x48}.xpm; do
	rm -f $RPM_BUILD_ROOT%{_datadir}/pixmaps/$xpm
done
mkdir -p $RPM_BUILD_ROOT%{_iconsdir}/hicolor/{16x16,32x32,48x48}/apps
install -m 644 %{_sourcedir}/xterm-16x16.png \
	$RPM_BUILD_ROOT%{_iconsdir}/hicolor/16x16/apps/xterm-terminal.png
install -m 644 %{_sourcedir}/xterm-32x32.png \
	$RPM_BUILD_ROOT%{_iconsdir}/hicolor/32x32/apps/xterm-terminal.png
install -m 644 %{_sourcedir}/xterm-48x48.png \
	$RPM_BUILD_ROOT%{_iconsdir}/hicolor/48x48/apps/xterm-terminal.png

%if 0
## strange, if xterm isn't launched with -name xxxx parameter it doesn't
## take in account the ressources --> wrong font in unicode mode --> segfault
## there is not time to fix the sources; using a script to ensure there
## is always a -nae xxxx used (pablo)
mv $RPM_BUILD_ROOT%{_bindir}/xterm $RPM_BUILD_ROOT%{_bindir}/xterm.real
cat << EOF >> $RPM_BUILD_ROOT%{_bindir}/xterm
#!/bin/bash

if echo "\$@" | grep -- '-name' >&/dev/null ; then
	 exec %{_bindir}/xterm.real "\$@"
else exec %{_bindir}/xterm.real -name Terminal "\$@"
fi
EOF
chmod a+rx $r%{_bindir}/xterm
%endif

%clean
rm -rf $RPM_BUILD_ROOT

%post
%update_menus
%update_icon_cache hicolor
update-alternatives --install %{_bindir}/xvt xvt %{_bindir}/xterm 18 || :

%postun
%clean_menus
%update_icon_cache hicolor
[[ "$1" = "0" ]] && update-alternatives --remove xvt %{_bindir}/xterm || :

%files
%defattr(-,root,root)
%doc ctlseqs.txt colortest.pl
%{_bindir}/*
%{_mandir}/*/*
%{_libdir}/X11/app-defaults/*
%_datadir/applications/mandriva-*
%{_iconsdir}/hicolor/*/apps/xterm-terminal.png


%changelog
* Thu Jan 31 2008 Funda Wang <fundawang@mandriva.org> 232-1mdv2008.1
+ Revision: 160760
- update to new version 232

* Wed Jan 09 2008 Jérôme Soyer <saispo@mandriva.org> 231-1mdv2008.1
+ Revision: 147242
- New release

* Sat Jan 05 2008 Jérôme Soyer <saispo@mandriva.org> 230-1mdv2008.1
+ Revision: 145857
- New release

  + Olivier Blin <oblin@mandriva.com>
    - restore BuildRoot

  + Thierry Vignaud <tvignaud@mandriva.com>
    - kill re-definition of %%buildroot on Pixel's request
    - kill file require on update-alternatives

* Thu Oct 11 2007 Thierry Vignaud <tvignaud@mandriva.com> 229-3mdv2008.1
+ Revision: 97133
- do not package useless doc

* Mon Sep 17 2007 Thierry Vignaud <tvignaud@mandriva.com> 229-2mdv2008.0
+ Revision: 89093
- add Utility category to menu entry (#33640)

* Tue Sep 04 2007 Funda Wang <fundawang@mandriva.org> 229-1mdv2008.0
+ Revision: 78946
- New version 229

  + Thierry Vignaud <tvignaud@mandriva.com>
    - kill desktop-file-validate's 'warning: key "Encoding" in group "Desktop Entry" is deprecated'

* Sun Jul 01 2007 Funda Wang <fundawang@mandriva.org> 227-1mdv2008.0
+ Revision: 46277
- New version

* Tue Jun 19 2007 Herton Ronaldo Krzesinski <herton@mandriva.com.br> 226-1mdv2008.0
+ Revision: 41155
- Updated to version 226.
- Removed old menu and place icons in freedesktop hicolor-theme
  directories.

* Sun May 27 2007 Gustavo De Nardin <gustavodn@mandriva.com> 225-4mdv2008.0
+ Revision: 31732
- make xterm use libncurses instead of libtermcap, allowing -tn option to
  work for terminal types existing only in terminfo database (like xterm-256color)

* Thu May 17 2007 Ademar de Souza Reis Jr <ademar@mandriva.com.br> 225-3mdv2008.0
+ Revision: 27700
- Enable support for 256 colors
- It's 2007, no reason to support only 16 colors. :)
- Also added a script to test/show the colors as part of the
  package documentation (colortest.pl)

* Mon May 07 2007 Gustavo De Nardin <gustavodn@mandriva.com> 225-2mdv2008.0
+ Revision: 24866
- finegrained X11 build requires
- include ctlseqs.txt in package (xterm ESC control sequences reference)

* Mon May 07 2007 Herton Ronaldo Krzesinski <herton@mandriva.com.br> 225-1mdv2008.0
+ Revision: 24575
- Updated to version 225.
- Dropped old patches from alt linux, they aren't even used anymore by
  them (meta-mod patch also breaks build).


* Fri Nov 17 2006 Pablo Saratxaga <pablo@mandriva.com> 215-6mdv2007.0
+ Revision: 85242
- rebuild to use the new path for luit

  + Helio Chissini de Castro <helio@mandriva.com>
    - Recompile to match correct luit place

  + Nicolas Lécureuil <neoclust@mandriva.org>
    - Fix xdg menu under KDE Original menu

* Tue Aug 15 2006 Götz Waschk <waschk@mandriva.org> 215-3mdv2007.0
+ Revision: 56016
- add xdg menu file
- release
- xdg menu

  + Pixel <pixel@mandriva.com>
    - with build xterm to use luit, so require luit

  + Thierry Vignaud <tvignaud@mandriva.com>
    - new release

  + Gustavo Pichorim Boiko <boiko@mandriva.com>
    - rebuild against new libXaw package

  + Helio Chissini de Castro <helio@mandriva.com>
    - Added svn warning message to avoid wrong uploads
    - import xterm-212-3mdv2007.0

* Tue May 23 2006 Helio Chissini de Castro 212-3mdk
- Move to /usr as a new base for Xorg

* Sat May 20 2006 Thierry Vignaud <tvignaud@mandriva.com> 212-2mdk
- fix buildrequires

* Sun Apr 23 2006 Thierry Vignaud <tvignaud@mandriva.com> 212-1mdk
- new release
- drop patch 2 (merged upstream)

* Wed Mar 22 2006 Thierry Vignaud <tvignaud@mandriva.com> 211-1mdk
- new release

* Thu Jan 05 2006 Thierry Vignaud <tvignaud@mandriva.com> 208-1mdk
- new release

* Sat Nov 05 2005 Per Øyvind Karlsen <pkarlsen@mandriva.com> 206-2mdk
- fix menu section & longtitle
- fix prereq
- don't bzip2 icons
- cosmetics

* Thu Nov 03 2005 Thierry Vignaud <tvignaud@mandriva.com> 206-1mdk
- new release

* Sat Jul 30 2005 Thierry Vignaud <tvignaud@mandriva.com> 203-1mdk
- new release

* Fri Feb 25 2005 Pablo Saratxaga <pablo@mandrakesoft.com> 200-2mdk
- enabled luit support

* Fri Feb 11 2005 Thierry Vignaud <tvignaud@mandrakesoft.com> 200-1mdk
- new release

* Mon Jan 31 2005 Thierry Vignaud <tvignaud@mandrakesoft.com> 199-1mdk
- new release
- rediff patches 1 & 2

* Wed Jan 05 2005 Thierry Vignaud <tvignaud@mandrakesoft.com> 197-1mdk
- new release
- rediff patch 3

* Mon Nov 22 2004 Thierry Vignaud <tvignaud@mandrakesoft.com> 196-1mdk
- new release

* Sat Jul 31 2004 Thierry Vignaud <tvignaud@mandrakesoft.com> 194-1mdk
- new release

* Wed Jun 16 2004 Thierry Vignaud <tvignaud@mandrakesoft.com> 191-2mdk
- fix build with aa font managment (#10021)

* Thu Jun 10 2004 Thierry Vignaud <tvignaud@mandrakesoft.com> 191-1mdk
- new release

* Sat Apr 03 2004 Thierry Vignaud <tvignaud@mandrakesoft.com> 185-1mdk
- new release

* Mon Jan 19 2004 Thierry Vignaud <tvignaud@mandrakesoft.com> 184-1mdk
- new release

* Mon Dec 29 2003 Thierry Vignaud <tvignaud@mandrakesoft.com> 182-3mdk
- patch 3: fix meta key managment (#6651)
  [patch from Jeremie Lenfant-Engelmann <jlenfant@mandrakesoft.com>]

* Tue Dec 16 2003 Thierry Vignaud <tvignaud@mandrakesoft.com> 182-2mdk
- rebuild against latest libxfree86 (fix #6558)

* Wed Dec 10 2003 Thierry Vignaud <tvignaud@mandrakesoft.com> 182-1mdk
- new release