Summary:     Multilingual Console for Linux Frame Buffer Device
Summary(ja): Linux フレームバッファデバイス用多言語対応コンソール
Name:        jfbterm
Version:     0.4.7
Release:     0vl3
License:     distributable
Group:       Applications/System
Source:      %{name}-%{version}.tar.gz
Source1:     termcap.jfbterm
Source2:     terminfo.jfbterm
Patch10:     %{name}-%{version}-sigchld.patch
Patch11:     %{name}-%{version}-Makefile.patch
BuildRoot:   %{_tmppath}/%{name}-%{version}-root
URL:         http://jfbterm.sourceforge.jp/

Source10:    jfbterm.conf.vine

# following fonts derived from shinonome-0.9.10 and efont-unicode-bdf-0.4.2
Source20:    efont-for-jfbterm.tar.bz2

%description
Multilingual Console for Linux Frame Buffer Device

%description -l ja
Linux フレームバッファ用多言語対応コンソール


%prep
%setup -q -a 20
%patch10 -p1
%patch11 -p1

install -m 644  %{SOURCE1} .
install -m 644  %{SOURCE2} .


%build
%{__libtoolize} --copy --force
%ifarch i386 
%configure --enable-direct-color
%else
%configure --enable-direct-color --disable-vga16fb
%endif

make


%install
rm -rf ${RPM_BUILD_ROOT}

make DESTDIR=${RPM_BUILD_ROOT} install

install -d ${RPM_BUILD_ROOT}%{_sysconfdir}
install -m 644 %{SOURCE10} \
	${RPM_BUILD_ROOT}%{_sysconfdir}/jfbterm.conf

install -m 644 efont-for-jfbterm/*.pcf.gz \
	${RPM_BUILD_ROOT}%{_datadir}/fonts/jfbterm/

%clean
rm -rf ${RPM_BUILD_ROOT}


%post
if [ ! -f %{_datadir}/terminfo/j/jfbterm ]; then
	/usr/bin/tic %{_docdir}/%{name}-%{version}/terminfo.jfbterm
fi

if [ -f %{_sysconfdir}/termcap ]; then
	if [ `grep -c '^jfbterm|Japanized framebuffer terminal' %{_sysconfdir}/termcap` -eq 0 ]; then
		mv %{_sysconfdir}/termcap %{_sysconfdir}/termcap.orig
		cp %{_sysconfdir}/termcap.orig %{_sysconfdir}/termcap
		cat %{_docdir}/%{name}-%{version}/termcap.jfbterm >> %{_sysconfdir}/termcap
	fi
fi


%files
%defattr(-,root,root)
%doc AUTHORS COPYING ChangeLog INSTALL* NEWS README*
%doc termcap.jfbterm terminfo.jfbterm jfbterm.conf.sample*
%doc efont-for-jfbterm/README* efont-for-jfbterm/COPYRIGHT
%attr(6755,root,utmp) %{_bindir}/jfbterm
%config %{_sysconfdir}/jfbterm.conf
%dir %{_datadir}/fonts/jfbterm
%{_datadir}/fonts/jfbterm/*


%changelog
* Thu Oct 18 2007 Daisuke SUZUKI <daisuke@linux.or.jp> 0.4.7-0vl3
- include shinm7x14r for romakana font
- include b14/b16 for unicode font (from efont-unicode-bdf-0.4.2)
- update jfbterm.conf

* Tue Oct 16 2007 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 0.4.7-0vl2
- rebuilt with new toolchain for VineSeed
- include shinonome 14/16 fonts

* Sat Oct 21 2006 MATSUBAYASHI Kohji <shaolin@vinelinux.org> 0.4.7-0vl1
- updated to 0.4.7 release (current upstream is at sourceforge.jp)
- added sigchld patch to fix lockup problem (borrowed from debian)

* Wed Aug 02 2000 MATSUBAYASHI 'Shaolin' Kohji <shaolin@rhythmaning.org>
- 0.3.10-1vl1
- merged a patch (by Mr. AMANO Kazuhiro) to fix some problems

* Thu Jan 27 2000 AMANO Kazuhiro <amano@uv.rism.tohoku.ac.jp>
- updated jfbterm to 0.3.10.

* Mon Jan 17 2000 AMANO Kazuhiro <amano@uv.rism.tohoku.ac.jp>
- updated jfbterm to 0.3.8.

* Fri Dec 03 1999 AMANO Kazuhiro <amano@uv.rism.tohoku.ac.jp>
- changed the name of TERM to jfbterm.

* Thu Nov 30 1999 AMANO Kazuhiro <amano@uv.rism.tohoku.ac.jp>
- updated jfbterm to 0.3.7.

* Thu Nov 25 1999 AMANO Kazuhiro <amano@uv.rism.tohoku.ac.jp>
- updated jfbterm to 0.3.6.
- enabled direct-color for ppc.

* Tue Nov 02 1999 AMANO Kazuhiro <amano@uv.rism.tohoku.ac.jp>
- updated jfbterm to 0.3.3.

* Wed Oct 27 1999 AMANO Kazuhiro <amano@uv.rism.tohoku.ac.jp>
- added install script for terminfo and termcap data.

* Mon Oct 25 1999 AMANO Kazuhiro <amano@uv.rism.tohoku.ac.jp>
- added terminfo and termcap data.
- updated jfbterm to 0.3.2.

* Sat Oct 23 1999 AMANO Kazuhiro <amano@uv.rism.tohoku.ac.jp>
- updated jfbterm to 0.2.1

* Wed Jul 14 1999 KUSUNOKI Masanori <masanori@linux.or.jp>
- first release

