From ad1fa838f1eef4bedbbc6ce173248b989f5aa509 Mon Sep 17 00:00:00 2001 From: Mamoru Tasaka Date: Tue, 27 Feb 2007 03:06:55 +0000 Subject: [PATCH] initial importing of mecab (including libexecdir fix) --- .cvsignore | 1 + mecab.spec | 124 +++++++++++++++++++++++++++++++++++++++++++++++++++++ sources | 1 + 3 files changed, 126 insertions(+) create mode 100644 mecab.spec diff --git a/.cvsignore b/.cvsignore index e69de29..44aa863 100644 --- a/.cvsignore +++ b/.cvsignore @@ -0,0 +1 @@ +mecab-0.94pre2.tar.gz diff --git a/mecab.spec b/mecab.spec new file mode 100644 index 0000000..f23c2d6 --- /dev/null +++ b/mecab.spec @@ -0,0 +1,124 @@ +%define mainver 0.94 +%define betaver pre2 +%define fedorarel 4 + +# Note: +# mecab dictionary requires mecab-devel to rebuild it, +# and mecab requires mecab dictionary + +Name: mecab +Version: %{mainver} +%if %{?betaver:0}%{!?betaver:1} +Release: %{fedorarel}%{?dist} +%else +Release: 0.%{fedorarel}.%{betaver}%{?dist} +%endif +Summary: Yet Another Part-of-Speech and Morphological Analyzer + +Group: Applications/Text +License: BSD/LGPL/GPL +URL: http://mecab.sourceforge.net/ +Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{mainver}%{?betaver}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +%description +MeCab is a open source morphological analyzer which uses +CRF (Conditional Random Fields) as the estimation of parameters. + +NOTE: +You have to install MeCab dictionary rpm to make use +of MeCab. + +%package devel +Summary: Libraries and Header files for Mecab +Group: Development/Libraries +Requires: %{name} = %{version}-%{release} + +%description devel +This is the development package that provides header files and libraries +for MeCab. + +%prep +%setup -q -n %{name}-%{mainver}%{?betaver} + +# compiler flags fix +%{__sed} -i.flags \ + -e '/-O3/s|CFLAGS=\"\(.*\)\"|CFLAGS=\${CFLAGS:-\1}|' \ + -e '/-O3/s|CXXFLAGS=\"\(.*\)\"|CXXFLAGS=\${CFLAGS:-\1}|' \ + configure + +# multilib change +%{__sed} -i.multilib \ + -e 's|@prefix@/lib/mecab|%{_libdir}/mecab|' \ + mecab-config.in mecabrc.in + +%build +%configure +# remove rpath from libtool +%{__sed} -i.rpath \ + -e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \ + -e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \ + libtool + +%{__make} %{?_smp_mflags} + +%install +%{__rm} -rf $RPM_BUILD_ROOT +%{__make} install \ + DESTDIR=$RPM_BUILD_ROOT \ + INSTALL="%{__install} -c -p" + +%{__rm} -f $RPM_BUILD_ROOT%{_libdir}/lib*.{a,la} +%{__rm} -f doc/Makefile* + +# create directory +%{__mkdir} -p $RPM_BUILD_ROOT%{_libdir}/mecab/dic/ + +%check || : +# here enable rpath +export LD_LIBRARY_PATH=$(pwd)/src/.libs +cd tests +%{__make} check +cd .. + +%clean +%{__rm} -rf $RPM_BUILD_ROOT + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%files +%defattr(-,root,root,-) +%doc AUTHORS BSD COPYING GPL LGPL +%doc doc/* example/ +%{_mandir}/man1/%{name}.1* + +%config(noreplace) %{_sysconfdir}/mecabrc +%{_bindir}/%{name} +%{_libexecdir}/%{name}/ +%{_libdir}/lib%{name}.so.* +# several dictionaries can install data files +# into the following directory. +%dir %{_libdir}/%{name}/ +%dir %{_libdir}/%{name}/dic/ + +%files devel +%{_bindir}/%{name}-config +%{_libdir}/lib%{name}.so +%{_includedir}/%{name}.h + +%changelog +* Tue Feb 27 2007 Mamoru Tasaka - 0.94-0.4.pre2 +- Fix libexec dir for 64bit. + +* Tue Feb 27 2007 Mamoru Tasaka - 0.94-0.3.pre2 +- Package requirement deps reconstruct + +* Mon Feb 26 2007 Mamoru Tasaka - 0.94-0.2.pre2 +- Remove rpath on 64bit. + +* Fri Feb 23 2007 Mamoru Tasaka - 0.94-0.1.pre2 +- Initial packaging for Fedora. + +* Fri Feb 23 2007 Minokichi Sato +- Initial build. diff --git a/sources b/sources index e69de29..4d3b41f 100644 --- a/sources +++ b/sources @@ -0,0 +1 @@ +8d08fe06e799348f3ded84579eb6c6ed mecab-0.94pre2.tar.gz