Blame SPECS/mecab-ipadic.spec

2d4ca0
%{?scl:%scl_package mecab-ipadic}
2d4ca0
%{!?scl:%global pkg_name %{name}}
2d4ca0
2d4ca0
# This spec file is very similar with mecab-jumandic
2d4ca0
2d4ca0
%define		majorver	2.7.0
2d4ca0
%define		date		20070801
2d4ca0
2d4ca0
%define		mecabver	0.96
2d4ca0
2d4ca0
# The data in MeCab dic are compiled by arch-dependent binaries
2d4ca0
# and the created data are arch-dependent.
2d4ca0
# However, this package does not contain any executable binaries
2d4ca0
# so debuginfo rpm is not created.
2d4ca0
%define		debug_package	%{nil}
2d4ca0
2d4ca0
Name:		%{?scl_prefix}mecab-ipadic
2d4ca0
Version:	%{majorver}.%{date}
2d4ca0
Release:	16%{?dist}
2d4ca0
Summary:	IPA dictionary for MeCab
2d4ca0
2d4ca0
Group:		Applications/Text
2d4ca0
License:	mecab-ipadic
2d4ca0
URL:		http://mecab.sourceforge.net/
2d4ca0
Source0:	http://downloads.sourceforge.net/mecab/%{pkg_name}-%{majorver}-%{date}.tar.gz
2d4ca0
#Source2:	http://www.icot.or.jp/ARCHIVE/terms-and-conditions-for-IFS-J.html
2d4ca0
Source2:	http://www.jipdec.or.jp/icot/ARCHIVE/terms-and-conditions-for-IFS-J.html
2d4ca0
Source3:	LICENSE.Fedora
2d4ca0
BuildRoot:	%{_tmppath}/%{pkg_name}-%{version}-%{release}-root-%(%{__id_u} -n)
2d4ca0
2d4ca0
BuildRequires:	%{?scl_prefix}mecab-devel >= %{mecabver}
2d4ca0
%{?scl:BuildRequires:%scl_runtime}
2d4ca0
Requires:	%{?scl_prefix}mecab >= %{mecabver}
2d4ca0
%{?scl:Requires:%scl_runtime}
2d4ca0
2d4ca0
%description
2d4ca0
MeCab IPA is a dictionary for MeCab using CRF estimation
2d4ca0
based on IPA corpus.
2d4ca0
This dictionary is for UTF-8 use.
2d4ca0
2d4ca0
%package 	EUCJP
2d4ca0
Summary:	IPA dictionary for Mecab with encoded by EUC-JP
2d4ca0
Group:		Applications/Text
2d4ca0
Requires:	%{?scl_prefix}mecab >= %{mecabver}
2d4ca0
%{?scl:Requires:%scl_runtime}
2d4ca0
2d4ca0
%description EUCJP
2d4ca0
2d4ca0
MeCab IPA is a dictionary for MeCab using CRF estimation
2d4ca0
based on IPA corpus.
2d4ca0
This dictionary is for EUC-JP use.
2d4ca0
2d4ca0
%prep
2d4ca0
%setup -q -n %{pkg_name}-%{majorver}-%{date}
2d4ca0
2d4ca0
%build
2d4ca0
# First build on UTF-8
2d4ca0
%{?scl:scl enable %{scl} - << \EOF}
2d4ca0
set -x
2d4ca0
%configure \
2d4ca0
	--with-mecab-config=%{_bindir}/mecab-config \
2d4ca0
	--with-charset=utf8
2d4ca0
%{__make} %{?_smp_mflags}
2d4ca0
# Preserve them
2d4ca0
%{__mkdir} UTF-8
2d4ca0
%{__cp} -p \
2d4ca0
	*.bin *.dic *.def dicrc \
2d4ca0
	UTF-8/
2d4ca0
2d4ca0
# Next build on EUC-JP
2d4ca0
# This is the default, however Fedora uses UTF-8 so
2d4ca0
# for Fedora this must be the option.
2d4ca0
%{__make} clean
2d4ca0
%configure \
2d4ca0
	--with-mecab-config=%{_bindir}/mecab-config
2d4ca0
%{__make} %{?_smp_mflags}
2d4ca0
%{?scl:EOF}
2d4ca0
2d4ca0
%install
2d4ca0
# First install EUC-JP
2d4ca0
%{?scl:scl enable %{scl} - << \EOF}
2d4ca0
set -x
2d4ca0
%{__rm} -rf $RPM_BUILD_ROOT
2d4ca0
%{__make} install DESTDIR=$RPM_BUILD_ROOT
2d4ca0
%{__mv} $RPM_BUILD_ROOT%{_libdir}/mecab/dic/ipadic \
2d4ca0
	$RPM_BUILD_ROOT%{_libdir}/mecab/dic/ipadic-EUCJP
2d4ca0
2d4ca0
# Next install UTF-8
2d4ca0
%{__mv} -f UTF-8/* .
2d4ca0
%{__make} install DESTDIR=$RPM_BUILD_ROOT
2d4ca0
2d4ca0
%{__cp} -p %{SOURCE2} LICENSE.jp.html
2d4ca0
%{__cp} -p %{SOURCE3} LICENSE.rhel
2d4ca0
%{?scl:EOF}
2d4ca0
2d4ca0
%clean
2d4ca0
%{__rm} -rf $RPM_BUILD_ROOT
2d4ca0
2d4ca0
%post
2d4ca0
# Note: post should be okay. mecab-dic expects that
2d4ca0
# mecab is installed in advance.
2d4ca0
if test -f %{_sysconfdir}/mecabrc ; then
2d4ca0
	%{__sed} -i -e 's|^dicdir.*|dicdir = %{_libdir}/mecab/dic/ipadic|' \
2d4ca0
		%{_sysconfdir}/mecabrc || :
2d4ca0
fi
2d4ca0
2d4ca0
%post EUCJP
2d4ca0
# Note: post should be okay. mecab-dic expects that
2d4ca0
# mecab is installed in advance.
2d4ca0
if test -f %{_sysconfdir}/mecabrc ; then
2d4ca0
	%{__sed} -i -e 's|^dicdir.*|dicdir = %{_libdir}/mecab/dic/ipadic-EUCJP|' \
2d4ca0
		%{_sysconfdir}/mecabrc || :
2d4ca0
fi
2d4ca0
2d4ca0
%files
2d4ca0
%defattr(-,root,root,-)
2d4ca0
%doc COPYING LICENSE.* README
2d4ca0
%{_libdir}/mecab/dic/ipadic/
2d4ca0
2d4ca0
%files EUCJP
2d4ca0
%defattr(-,root,root,-)
2d4ca0
%doc COPYING LICENSE.* README
2d4ca0
%{_libdir}/mecab/dic/ipadic-EUCJP/
2d4ca0
2d4ca0
%changelog
2d4ca0
* Wed Jul 18 2018 Honza Horak <hhorak@redhat.com> - 2.7.0.20070801-16
2d4ca0
- Rename the LICENSE.fedora to LICENSE.rhel
2d4ca0
2d4ca0
* Thu Dec 14 2017 Honza Horak <hhorak@redhat.com> - 2.7.0.20070801-15
2d4ca0
- Release bump for rebuilding on new arches
2d4ca0
  Related: #1518842
2d4ca0
2d4ca0
* Fri Jul 15 2016 Honza Horak <hhorak@redhat.com> - 2.7.0.20070801-14.1
2d4ca0
- Require runtime package from the scl
2d4ca0
2d4ca0
* Fri Jul 15 2016 Honza Horak <hhorak@redhat.com> - 2.7.0.20070801-13.1
2d4ca0
- Convert to SCL package
2d4ca0
2d4ca0
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 2.7.0.20070801-12.1
2d4ca0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
2d4ca0
2d4ca0
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.0.20070801-11.1
2d4ca0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
2d4ca0
2d4ca0
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.0.20070801-10.1
2d4ca0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
2d4ca0
2d4ca0
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.0.20070801-9.1
2d4ca0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
2d4ca0
2d4ca0
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.0.20070801-8.1
2d4ca0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
2d4ca0
2d4ca0
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.0.20070801-7.1
2d4ca0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
2d4ca0
2d4ca0
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.0.20070801-6.1
2d4ca0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
2d4ca0
2d4ca0
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.0.20070801-5.1
2d4ca0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
2d4ca0
2d4ca0
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.7.0.20070801-4.1
2d4ca0
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
2d4ca0
2d4ca0
* Wed Jan 13 2010 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp>
2d4ca0
- Fix URL for Source2
2d4ca0
2d4ca0
* Sat Jul 25 2009 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 2.7.0.20070801-3
2d4ca0
- F-12: Mass rebuild
2d4ca0
2d4ca0
* Tue Feb 24 2009 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 2.7.0.20070801-2
2d4ca0
- F-11: Mass rebuild
2d4ca0
2d4ca0
* Fri Aug  3 2007 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 2.7.0.20070801.dist.1
2d4ca0
- License update
2d4ca0
2d4ca0
* Wed Aug  1 2007 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 2.7.0.20070801
2d4ca0
- New release 2.7.0-20070801
2d4ca0
2d4ca0
* Mon Jun 11 2007 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 2.7.0.20070610
2d4ca0
- New release 2.7.0-20070610
2d4ca0
2d4ca0
* Sat Mar 24 2007 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 2.7.0.20060707-2
2d4ca0
- Fix typo
2d4ca0
2d4ca0
* Thu Mar  8 2007 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 2.7.0.20060707-1
2d4ca0
- Initial packaging, based on mecab-jumandic spec file