Sophie

Sophie

distrib > Mandriva > 8.2 > i586 > media > main-src > by-pkgid > f92dee8a288ff5dfd336bf62d2aa8b1e > files > 3

FreeWnn-1.1.1-0.a017.10mdk.src.rpm

%define version 1.1.1
%define release 0.a017.10mdk
%define src_ver 1.1.1-a017

%define prefix %{_prefix}

Summary: Japanese Input System
Summary(ja): 仮名漢字変換システム
Name: FreeWnn
Version: %{version}
Release: %{release}
Source0: ftp://ftp.freewnn.org/pub/FreeWnn/alpha/FreeWnn-%{src_ver}.tar.bz2
Source1: jserver.init
#
# (fg) Makefiles are really screwy, they suppose that user wnn exists already -
# this patch fixes this.
#
# Also, this removes calls to wnntouch, as they're done in %post
#
Patch0: FreeWnn-st00pid-Makefile.in-fixes.patch.bz2
License: GPL
Group: System/Internationalization
URL: http://www.freewnn.org/
BuildRequires:	ncurses-devel
BuildRoot:	%_tmppath/%name-%version-%release-root
Requires: locales-ja
Obsoletes: Wnn
Provides: Wnn

%description
Wnn is a network-extensible Kana-to-Kanji conversion system.
With it you can type in kana (or romaji) and easily convert to kanji 

%description -l ja
Wnn はネットワーク仮名漢字変換システムです。
このパッケージは日本語変換システムのみ含みます。

%package devel
Summary: development library and header file for Wnn
Group: Development/C
Requires: FreeWnn = %version-%release
Obsoletes: Wnn-devel
Provides: Wnn-devel

%description devel
This package contains the header file and library for building programs
with use Wnn.

%description devel -l ja
このパッケージには Wnn を利用したプログラムをコンパイルするために必要
なヘッダファイルとライブラリを含んでいます。

%prep
%setup -q -n FreeWnn-%{src_ver}

%patch0 -p1

%build
%serverbuild
cd Xsi
#
# (fg) 20000517: moved ./configure here, as I need to patch the st00pid
# Makefile.ins before...
./configure --prefix=%{prefix} --localstatedir=/var --sysconfdir=%{_sysconfdir} \
	--mandir=%{_mandir}/ja
make

%install
rm -rf $RPM_BUILD_ROOT
cd Xsi
make install DESTDIR=$RPM_BUILD_ROOT 
( cd Wnn ; make install.man DESTDIR=$RPM_BUILD_ROOT )

mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d
install -m 755 $RPM_SOURCE_DIR/jserver.init \
	$RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/jserver

# var stuff must go to var; use a symlink
mkdir -p $RPM_BUILD_ROOT/var/lib/wnn/ja_JP/dic/usr
ln -s /var/lib/wnn/ja_JP/dic/usr $RPM_BUILD_ROOT%{_libdir}/wnn/ja_JP/dic

#
# (fg) Completely redone this part: previous scripts were ugly
#

(
	cd $RPM_BUILD_ROOT%{_mandir}/ja && \
	{
		find -type f |xargs perl -pi -e "s,/usr/local,%{prefix},g"
		for i in $(find -type l); do
			dest = $(readlink $i)
			rm $i
			ln $dest $i
		done
	}
)

mkdir -p $RPM_BUILD_ROOT/usr/local/lib
( cd $RPM_BUILD_ROOT/usr/local/lib && ln -s %{_libdir}/wnn )

%clean
rm -fr $RPM_BUILD_ROOT

%post
%_post_service jserver
cd %{_libdir}/wnn && \
{
	( 
		cd ja_JP/dic && \
		%{_bindir}/Wnn4/wnntouch {pubdic,wnncons,gerodic}/*
	);
#
# (fg) 20000518 This stuff should be uncommented when Korean and Chinese
# clients use Wnn... Thanks Pablo
#
#	(
#		cd zh_CN && \
#		%{_bindir}/cWnn4/cwnntouch sys/*
#	);
#	(
#		cd zh_TW && \
#		%{_bindir}/cWnn4/cwnntouch sys/*
#	);
#	(
#		cd ko_KR && \
#		%{_bindir}/kWnn4/kwnntouch sys/*
#	);
}

%preun
%_preun_service jserver
if [ $1 = 0 ]; then
	# if FreeWnn is removed, remove its user data file too
	rm -rf /var/lib/wnn/ja_JP/dic/usr/*
fi

%files
%defattr (-,root,root,755)
%doc Xsi/COPYRIGHT* Xsi/CONTRIBUTORS Xsi/PubdicPlus/PUBDICPLUS* Xsi/olddoc 
%config %attr(755,root,root) %{_sysconfdir}/rc.d/init.d/jserver
%defattr (-,root,wnn,755)
%{_libdir}/wnn/
%dir %{_bindir}/Wnn4/
%{_bindir}/Wnn4/atod
%{_bindir}/Wnn4/atof
%{_bindir}/Wnn4/dtoa
%attr(4711,root,wnn) %{_bindir}/Wnn4/jserver
%{_bindir}/Wnn4/oldatonewa
%{_bindir}/Wnn4/wddel
%{_bindir}/Wnn4/wdreg
%{_bindir}/Wnn4/wnnkill
%{_bindir}/Wnn4/wnnstat
%{_bindir}/Wnn4/wnntouch
%attr(644,root,root) %{_mandir}/ja/man[145]/*
%dir /var/lib/wnn
%dir /var/lib/wnn/ja_JP
%dir /var/lib/wnn/ja_JP/dic/usr
# compatibility symlink; to remove sometime in the future
# kinput2 still looks there... (pablo)
%{prefix}/local/lib/wnn

%files devel
%defattr(-,root,root,755)
%{_libdir}/libjd.a
%{_libdir}/libwnn.a
%{_includedir}/wnn/
%{_mandir}/ja/man3/*

%changelog
* Mon Jul 23 2001 Stefan van der Eijk <stefan@eijk.nu> 1.1.1-0.a017.10mdk
- BuildRequires:	ncurses-devel

* Fri Apr 06 2001 David BAUDENS <baudens@mandrakesoft.com> 1.1.1-0.a017.9mdk
- devel: Requires: %%version-%%release and not only %%version
- Use %%_tmppath for BuildRoot (so, allow build as user)

* Wed Apr  4 2001 Frederic Lepied <flepied@mandrakesoft.com> 1.1.1-0.a017.8mdk
- use server macros

* Tue Mar 06 2001 Pablo Saratxaga <pablo@mandrakesoft.com> 1.1.1-0.a017.7mdk
- rebuild with new environment
- added %preun to clean data files
- converted Japanese description to UTF-8

* Fri Sep 22 2000 Stefan van der Eijk <s.vandereijk@chello.nl> 1.1.1-0.a017.6mdk
- BM
- some macro's

* Thu May 18 2000 Francis Galiegue <fg@mandrakesoft.com> 1.1.1-0.a017.5mdk
- Put back %config in front of /etc/rc.d/init.d/jserver

* Wed May 17 2000 Francis Galiegue <fg@mandrakesoft.com> 1.1.1-0.a017.4mdk
- Spec cleanup
- Makefile.in patches - were badly needed
- Now %defattr(-,root,wnn,755) and not %defattr(-,wnn,wnn,-)
- /etc/rc.d/init.d/jserver should not be %config

* Mon May 15 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 1.1.1-0.a017.3mdk
- Fix build.
- Remove some stupid %pre.

* Fri Apr 15 2000 Pablo Saratxaga <pablo@mandrakesoft.com> 1.1.1-0.a017.2mdk
- changed %%pre section to add a 'jserver' entry to /etc/services
- improved /etc/rc.d/init.d/jserver script (it now uses wnnstatus for
  status, and displays [OK] or [FAILED] properly) 

* Wed Mar 29 2000 Pablo Saratxaga <pablo@mandrakesoft.com> 1.1.1-0.a017.1mdk
- first Mandrake version
- spec file losely adapted from previous 'Wnn' package