Blame SPECS/mecab-ipadic.spec

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