diff --git a/mecab-0.996.tar.gz b/mecab-0.996.tar.gz new file mode 100644 index 0000000..09e3d30 Binary files /dev/null and b/mecab-0.996.tar.gz differ diff --git a/mecab.spec b/mecab.spec new file mode 100644 index 0000000..93b3d69 --- /dev/null +++ b/mecab.spec @@ -0,0 +1,87 @@ +Name: mecab +Version: 0.996 +Release: 2 +Summary: Morphological Analyzer and Yet Another Part-of-Speech +License: BSD or LGPLv2+ or GPL+ +URL: https://sourceforge.net/projects/mecab/ +Source0: https://src.fedoraproject.org/lookaside/pkgs/mecab/mecab-0.996.tar.gz/7603f8975cea2496d88ed62545ba973f/mecab-%{version}.tar.gz +BuildRequires: gcc-c++ +%description +MeCab is a open source morphological analyzer whichi estimate +of parameters by CRF (Conditional Random Fields). +You will need to install MeCab dictionary rpm, if you want use +MeCab. + +%package devel +Summary: Libraries and Header files for Mecab +Requires: mecab = %{version}-%{release} +%description devel +This package provides header files and libraries of MeCab. + +%package help +Summary: Help docs for use of mecab. +Requires: mecab = %{version}-%{release} +%description help +This packages provides header files and libraries for the develop of MeCab. + +%prep +%autosetup -n mecab-0.996 -p1 +mv doc/doxygen . +find . -name \*.cpp -print0 | xargs -0 %{__chmod} 0644 +%{__sed} -i.flags \ + -e '/-O3/s|CFLAGS=\"\(.*\)\"|CFLAGS=\${CFLAGS:-\1}|' \ + -e '/-O3/s|CXXFLAGS=\"\(.*\)\"|CXXFLAGS=\${CFLAGS:-\1}|' \ + -e '/MECAB_LIBS/s|-lstdc++||' \ + configure +%{__sed} -i.multilib \ + -e 's|@prefix@/lib/mecab|%{_libdir}/mecab|' \ + mecab-config.in mecabrc.in + +%build +%configure +%{__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_build + +%install +%make_install INSTALL="%{__install} -c -p" +%delete_la +install -d $RPM_BUILD_ROOT%{_libdir}/mecab/dic/ + +%check +export LD_LIBRARY_PATH=$(pwd)/src/.libs +cd tests +%{__make} check || : +cd - + +%post +/sbin/ldconfig + +%postun +/sbin/ldconfig + +%files +%doc doc/ example/ AUTHORS BSD COPYING GPL LGPL +%config(noreplace) %{_sysconfdir}/mecabrc +%{_bindir}/mecab +%{_libexecdir}/mecab/ +%{_libdir}/libmecab.so.2* +%dir %{_libdir}/mecab/ +%dir %{_libdir}/mecab/dic/ +%exclude %{_libdir}/libmecab.a +%exclude %{_datadir}/doc/mecab/doc/{Makefile,Makefile.in,Makefile.am} + +%files devel +%doc doxygen/ +%{_bindir}/mecab-config +%{_libdir}/libmecab.so +%{_includedir}/mecab.h + +%files help +%{_mandir}/man1/mecab.1* + +%changelog +* Fri Jun 5 2020 Jeffery.Gao - 0.996-2 +- Package init diff --git a/mecab.yaml b/mecab.yaml new file mode 100644 index 0000000..caf4227 --- /dev/null +++ b/mecab.yaml @@ -0,0 +1,4 @@ +version-control: NA +src_repo: NA +tag_prefix: NA +seperator: NA