2022-10-10 10:03:11 +08:00
|
|
|
# This spec file is very similar with mecab-jumandic
|
|
|
|
|
|
|
|
|
|
%define majorver 2.7.0
|
|
|
|
|
%define date 20070801
|
|
|
|
|
|
|
|
|
|
%define mecabver 0.96
|
|
|
|
|
|
|
|
|
|
# The data in MeCab dic are compiled by arch-dependent binaries
|
|
|
|
|
# and the created data are arch-dependent.
|
|
|
|
|
# However, this package does not contain any executable binaries
|
|
|
|
|
# so debuginfo rpm is not created.
|
|
|
|
|
%define debug_package %{nil}
|
|
|
|
|
|
|
|
|
|
Name: mecab-ipadic
|
|
|
|
|
Version: %{majorver}.%{date}
|
2024-12-10 17:25:18 +08:00
|
|
|
Release: 23
|
2022-10-10 10:03:11 +08:00
|
|
|
Summary: IPA dictionary for MeCab
|
|
|
|
|
|
2024-12-10 17:25:18 +08:00
|
|
|
License: NAIST-2003
|
2022-10-10 10:03:11 +08:00
|
|
|
URL: http://mecab.sourceforge.net/
|
|
|
|
|
Source0: http://downloads.sourceforge.net/mecab/%{name}-%{majorver}-%{date}.tar.gz
|
|
|
|
|
#Source2: http://www.icot.or.jp/ARCHIVE/terms-and-conditions-for-IFS-J.html
|
|
|
|
|
Source2: http://www.jipdec.or.jp/icot/ARCHIVE/terms-and-conditions-for-IFS-J.html
|
|
|
|
|
Source3: LICENSE.Fedora
|
|
|
|
|
|
|
|
|
|
BuildRequires: make
|
|
|
|
|
BuildRequires: mecab-devel >= %{mecabver}
|
|
|
|
|
Requires: mecab >= %{mecabver}
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
MeCab IPA is a dictionary for MeCab using CRF estimation
|
|
|
|
|
based on IPA corpus.
|
|
|
|
|
This dictionary is for UTF-8 use.
|
|
|
|
|
|
|
|
|
|
%package EUCJP
|
|
|
|
|
Summary: IPA dictionary for Mecab with encoded by EUC-JP
|
|
|
|
|
Requires: mecab >= %{mecabver}
|
|
|
|
|
|
|
|
|
|
%description EUCJP
|
|
|
|
|
|
|
|
|
|
MeCab IPA is a dictionary for MeCab using CRF estimation
|
|
|
|
|
based on IPA corpus.
|
|
|
|
|
This dictionary is for EUC-JP use.
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%setup -q -n %{name}-%{majorver}-%{date}
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
# First build on UTF-8
|
|
|
|
|
%configure \
|
|
|
|
|
--with-mecab-config=%{_bindir}/mecab-config \
|
|
|
|
|
--with-charset=utf8
|
|
|
|
|
%{__make} %{?_smp_mflags}
|
|
|
|
|
# Preserve them
|
|
|
|
|
%{__mkdir} UTF-8
|
|
|
|
|
%{__cp} -p \
|
|
|
|
|
*.bin *.dic *.def dicrc \
|
|
|
|
|
UTF-8/
|
|
|
|
|
|
|
|
|
|
# Next build on EUC-JP
|
|
|
|
|
# This is the default, however Fedora uses UTF-8 so
|
|
|
|
|
# for Fedora this must be the option.
|
|
|
|
|
%{__make} clean
|
|
|
|
|
%configure \
|
|
|
|
|
--with-mecab-config=%{_bindir}/mecab-config
|
|
|
|
|
%{__make} %{?_smp_mflags}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
# First install EUC-JP
|
|
|
|
|
%{__rm} -rf $RPM_BUILD_ROOT
|
|
|
|
|
%{__make} install DESTDIR=$RPM_BUILD_ROOT
|
|
|
|
|
%{__mv} $RPM_BUILD_ROOT%{_libdir}/mecab/dic/ipadic \
|
|
|
|
|
$RPM_BUILD_ROOT%{_libdir}/mecab/dic/ipadic-EUCJP
|
|
|
|
|
|
|
|
|
|
# Next install UTF-8
|
|
|
|
|
%{__mv} -f UTF-8/* .
|
|
|
|
|
%{__make} install DESTDIR=$RPM_BUILD_ROOT
|
|
|
|
|
|
|
|
|
|
%{__cp} -p %{SOURCE2} LICENSE.jp.html
|
|
|
|
|
%{__cp} -p %{SOURCE3} .
|
|
|
|
|
|
|
|
|
|
%post
|
|
|
|
|
# Note: post should be okay. mecab-dic expects that
|
|
|
|
|
# mecab is installed in advance.
|
|
|
|
|
if test -f %{_sysconfdir}/mecabrc ; then
|
|
|
|
|
%{__sed} -i -e 's|^dicdir.*|dicdir = %{_libdir}/mecab/dic/ipadic|' \
|
|
|
|
|
%{_sysconfdir}/mecabrc || :
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
%post EUCJP
|
|
|
|
|
# Note: post should be okay. mecab-dic expects that
|
|
|
|
|
# mecab is installed in advance.
|
|
|
|
|
if test -f %{_sysconfdir}/mecabrc ; then
|
|
|
|
|
%{__sed} -i -e 's|^dicdir.*|dicdir = %{_libdir}/mecab/dic/ipadic-EUCJP|' \
|
|
|
|
|
%{_sysconfdir}/mecabrc || :
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%doc COPYING LICENSE.* README
|
|
|
|
|
%{_libdir}/mecab/dic/ipadic/
|
|
|
|
|
|
|
|
|
|
%files EUCJP
|
|
|
|
|
%doc COPYING LICENSE.* README
|
|
|
|
|
%{_libdir}/mecab/dic/ipadic-EUCJP/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
2024-12-10 17:25:18 +08:00
|
|
|
* Tue Dec 10 2024 peijiankang <peijiankang@kylinos.cn> - 2.7.0.20070801-23
|
|
|
|
|
- fix license info
|
|
|
|
|
|
2022-10-10 10:03:11 +08:00
|
|
|
* Mon Oct 10 2022 peijiankang <peijiankang@kylinos.cn> - 2.7.0.20070801-22
|
|
|
|
|
- Init package for mecab-ipadic
|
|
|
|
|
|