-# TODO: it should be reviewed by ac/am specialist and generally
-# by more experienced PLD developers.
-# I stole spec from:
-# http://sacral.c.u-tokyo.ac.jp/~hasimoto/Pineapple/0.2/testing/SPECS/chasen.spec
Summary: Japanese Morphological Analysis System, ChaSen
-Summary(pl): System analizy morfologii japoñskiej, ChaSen
+Summary(pl.UTF-8): System analizy morfologii japońskiej ChaSen
Name: chasen
-Version: 2.2.8
-Release: 1
+Version: 2.4.5
+Release: 2
Epoch: 0
-License: freeware
+License: BSD
Group: Applications/Text
-Source0: http://chasen.aist-nara.ac.jp/stable/chasen/%{name}-%{version}.tar.gz
-# Source0-md5: 492fce8f554d7d2ff720a8b5453ac624
-URL: http://chasen.aist-nara.ac.jp/
+#Source0Download: http://sourceforge.jp/projects/chasen-legacy/
+Source0: http://dl.sourceforge.jp/chasen-legacy/56305/%{name}-%{version}.tar.xz
+# Source0-md5: 8118190078e692884ad1a31927c22371
+URL: http://chasen-legacy.sourceforge.jp/
+BuildRequires: autoconf >= 2.59
+BuildRequires: automake
+BuildRequires: darts
+BuildRequires: iconv
+BuildRequires: libstdc++-devel
+BuildRequires: libtool >= 2:1.4d
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
%description
Japanese Morphological Analysis System.
-%description -l pl
-System analizy morfologii japoñskiej, ChaSen
+%description -l pl.UTF-8
+System analizy morfologii japońskiej ChaSen.
%package devel
-Summary: Libraries and header files for ChaSen developers.
-Summary(pl): Biblioteki i pliki nag³ówkowe dla deweloperów ChaSen.
-Group: Development/Libraries
-
-%package static
-Summary: Static ChaSen library.
-Summary(pl): Biblioteka statyczna ChaSen.
-Group: Development/Libraries
+Summary: Header files for ChaSen developers
+Summary(pl.UTF-8): Pliki nagłówkowe dla programistów używających systemu ChaSen
+Group: Development/Libraries
+Requires: %{name} = %{epoch}:%{version}-%{release}
+Requires: libstdc++-devel
%description devel
-Libraries and header files for ChaSen developers.
+Header files for ChaSen developers.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe dla deweloperów używających systemu ChaSen.
-%description devel -l pl
-Biblioteki i pliki nag³ówkowe dla deweloperów ChaSen.
+%package static
+Summary: Static ChaSen library
+Summary(pl.UTF-8): Biblioteka statyczna ChaSen
+Group: Development/Libraries
+Requires: %{name}-devel = %{epoch}:%{version}-%{release}
%description static
Static ChaSen library.
-%description static -l pl
+%description static -l pl.UTF-8
Biblioteka statyczna ChaSen.
%prep
%setup -q
%build
+%{__libtoolize}
%{__aclocal}
+%{__autoconf}
%{__autoheader}
-%{__libtoolize}
%{__automake}
-%{__autoconf}
%configure
%{__make}
%install
rm -rf $RPM_BUILD_ROOT
+
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
-mv $RPM_BUILD_ROOT%{_datadir}/%{name}/doc/* .
-rm -fr $RPM_BUILD_ROOT%{_datadir}/%{name}/doc
-
%clean
rm -rf $RPM_BUILD_ROOT
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
%files
%defattr(644,root,root,755)
-%doc AUTHORS COPYING ChangeLog NEWS* README* manual*
-%attr(755,root,root) %{_bindir}/%{name}
-%dir %{_datadir}/%{name}
-%{_datadir}/%{name}/*
-%attr(755,root,root) %{_libdir}/*.so*
+%doc AUTHORS COPYING ChangeLog NEWS README
+%lang(ja) %doc doc/manual-j.pdf
+%attr(755,root,root) %{_bindir}/chasen
+%attr(755,root,root) %{_libdir}/libchasen.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libchasen.so.2
%dir %{_libdir}/%{name}
-%attr(755,root,root) %{_libdir}/%{name}/*
+%attr(755,root,root) %{_libdir}/%{name}/makeda
+%attr(755,root,root) %{_libdir}/%{name}/makemat
%files devel
%defattr(644,root,root,755)
-%attr(755,root,root) %{_bindir}/%{name}-config
-%{_includedir}/%{name}.h
-%attr(755,root,root) %{_libdir}/libchasen.la
+%attr(755,root,root) %{_bindir}/chasen-config
+%attr(755,root,root) %{_libdir}/libchasen.so
+%{_libdir}/libchasen.la
+%{_includedir}/chasen.h
%files static
%defattr(644,root,root,755)