Blame SPECS/mecab.spec

f91c6b
%{?scl:%scl_package mecab}
f91c6b
%{!?scl:%global pkg_name %{name}}
f91c6b
f91c6b
%define		mainver		0.996
f91c6b
#%%define		betaver		pre3
9d73bf
%define		fedorarel	2
f91c6b
f91c6b
# Note:
f91c6b
# mecab dictionary requires mecab-devel to rebuild it,
f91c6b
# and mecab requires mecab dictionary
f91c6b
f91c6b
Name:		%{?scl_prefix}mecab
f91c6b
Version:	%{mainver}
f91c6b
%if %{?betaver:0}%{!?betaver:1}
9d73bf
Release:	%{fedorarel}%{?dist}
f91c6b
%else
f91c6b
Release:	0.%{fedorarel}.%{betaver}%{?dist}.11
f91c6b
%endif
f91c6b
Summary:	Yet Another Part-of-Speech and Morphological Analyzer
f91c6b
f91c6b
Group:		Applications/Text
f91c6b
License:	BSD or LGPLv2+ or GPL+
f91c6b
URL:		http://mecab.sourceforge.net/
f91c6b
Source0:	http://mecab.googlecode.com/files/%{pkg_name}-%{version}.tar.gz
f91c6b
f91c6b
%{?scl:BuildRequires:%scl_runtime}
f91c6b
%{?scl:Requires:%scl_runtime}
f91c6b
f91c6b
%description
f91c6b
MeCab is a open source morphological analyzer which uses 
f91c6b
CRF (Conditional Random Fields) as the estimation of parameters.
f91c6b
f91c6b
NOTE:
f91c6b
You have to install MeCab dictionary rpm to make use
f91c6b
of MeCab.
f91c6b
f91c6b
%package devel
f91c6b
Summary:	Libraries and Header files for Mecab
f91c6b
Group:		Development/Libraries
f91c6b
Requires:	%{name}%{?isa} = %{version}-%{release}
f91c6b
%{?scl:Requires:%scl_runtime}
f91c6b
f91c6b
%description devel
f91c6b
This is the development package that provides header files and libraries
f91c6b
for MeCab.
f91c6b
f91c6b
%prep
f91c6b
%setup -q -n %{pkg_name}-%{mainver}%{?betaver}
f91c6b
f91c6b
f91c6b
mv doc/doxygen .
f91c6b
find . -name \*.cpp -print0 | xargs -0 %{__chmod} 0644
f91c6b
f91c6b
# compiler flags fix
f91c6b
%{__sed} -i.flags \
f91c6b
	-e '/-O3/s|CFLAGS=\"\(.*\)\"|CFLAGS=\${CFLAGS:-\1}|' \
f91c6b
	-e '/-O3/s|CXXFLAGS=\"\(.*\)\"|CXXFLAGS=\${CFLAGS:-\1}|' \
f91c6b
	-e '/MECAB_LIBS/s|-lstdc++||' \
f91c6b
	configure
f91c6b
f91c6b
# multilib change
f91c6b
%{__sed} -i.multilib \
f91c6b
	-e 's|@prefix@/lib/mecab|%{_libdir}/mecab|' \
f91c6b
	mecab-config.in mecabrc.in
f91c6b
f91c6b
# allow to use some non-number major number in library soname
f91c6b
sed -i -r 's|(major=\.)(\$func_arith_result)|\1$verstring_prefix\2|' ltmain.sh
f91c6b
f91c6b
%build
f91c6b
%{?scl:scl enable %{scl} - << \EOF}
f91c6b
set -x
f91c6b
%configure
f91c6b
# remove rpath from libtool
f91c6b
%{__sed} -i.rpath \
f91c6b
	-e 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' \
f91c6b
	-e 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' \
f91c6b
	libtool
f91c6b
f91c6b
%{?scl_prefix:export verstring_prefix="%{scl_prefix}"}
f91c6b
%{__make} %{?_smp_mflags}
f91c6b
%{?scl:EOF}
f91c6b
f91c6b
%install
f91c6b
%{?scl:scl enable %{scl} - << \EOF}
f91c6b
set -x
f91c6b
%{__make} install \
f91c6b
	DESTDIR=$RPM_BUILD_ROOT \
f91c6b
	INSTALL="%{__install} -c -p"
f91c6b
f91c6b
%{__rm} -f $RPM_BUILD_ROOT%{_libdir}/lib*.{a,la}
f91c6b
%{__rm} -f doc/Makefile*
f91c6b
f91c6b
# create directory
f91c6b
%{__mkdir} -p $RPM_BUILD_ROOT%{_libdir}/mecab/dic/
f91c6b
%{?scl:EOF}
f91c6b
f91c6b
%check
f91c6b
# here enable rpath
f91c6b
export LD_LIBRARY_PATH=$(pwd)/src/.libs
f91c6b
cd tests
f91c6b
%{__make} check || :
f91c6b
cd ..
f91c6b
f91c6b
%post -p /sbin/ldconfig
f91c6b
%postun -p /sbin/ldconfig
f91c6b
f91c6b
%files
f91c6b
%defattr(-,root,root,-)
f91c6b
%doc AUTHORS BSD COPYING GPL LGPL
f91c6b
%doc doc/ example/
f91c6b
%{_mandir}/man1/%{pkg_name}.1*
f91c6b
f91c6b
%config(noreplace) %verify(not md5 size mtime) %{_sysconfdir}/mecabrc
f91c6b
%{_bindir}/%{pkg_name}
f91c6b
%{_libexecdir}/%{pkg_name}/
f91c6b
%{_libdir}/lib%{pkg_name}.so.*
f91c6b
# several dictionaries can install data files
f91c6b
# into the following directory.
f91c6b
%dir %{_libdir}/%{pkg_name}/
f91c6b
%dir %{_libdir}/%{pkg_name}/dic/
f91c6b
f91c6b
%files devel
f91c6b
%doc doxygen/
f91c6b
%{_bindir}/%{pkg_name}-config
f91c6b
%{_libdir}/lib%{pkg_name}.so
f91c6b
%{_includedir}/%{pkg_name}.h
f91c6b
f91c6b
%changelog
9d73bf
* Wed Jan 19 2022 Lukas Javorsky <ljavorsk@redhat.com> - 0.996-2
9d73bf
- Rebuild to fix the issue described in #2000986
9d73bf
- Resolves: #2000986
9d73bf
f91c6b
* Wed Dec 13 2017 Honza Horak <hhorak@redhat.com> - 0.996-1.9
f91c6b
- Release bump for rebuilding on new arches
f91c6b
  Related: #1518842
f91c6b
f91c6b
* Tue Oct 25 2016 Jakub Dorňák <jdornak@redhat.com> - 0.996-1.8
f91c6b
- skip %verify of /etc/opt/rh/rh-mysql57/mecabrc
f91c6b
  Resolves: #1382315
f91c6b
f91c6b
* Sun Jul 17 2016 Honza Horak <hhorak@redhat.com> - 0.996-1.7
f91c6b
- Prefix library major number with SCL name in soname
f91c6b
f91c6b
* Fri Jul 15 2016 Honza Horak <hhorak@redhat.com> - 0.996-1.6
f91c6b
- Require runtime package from the scl
f91c6b
f91c6b
* Fri Jul 15 2016 Honza Horak <hhorak@redhat.com> - 0.996-1.5
f91c6b
- Convert to SCL package
f91c6b
f91c6b
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.996-1.4
f91c6b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
f91c6b
f91c6b
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.996-1.3
f91c6b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
f91c6b
f91c6b
* Sat May 02 2015 Kalev Lember <kalevlember@gmail.com> - 0.996-1.2
f91c6b
- Rebuilt for GCC 5 C++11 ABI change
f91c6b
f91c6b
* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.996-1.1
f91c6b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
f91c6b
f91c6b
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.996-1.1
f91c6b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
f91c6b
f91c6b
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.996-1
f91c6b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
f91c6b
f91c6b
* Fri Feb 22 2013 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.996-1
f91c6b
- 0.996
f91c6b
f91c6b
* Sun Feb 10 2013 Mamoru TASAKA <mtasaka@fedoraproject.org> - 0.995-1
f91c6b
- 0.995
f91c6b
f91c6b
* Mon Aug  6 2012 Mamoru Tasaka <mtasaka@fedoraproject.org> - 0.994-2
f91c6b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
f91c6b
f91c6b
* Mon Jul  2 2012 Mamoru Tasaka <mtasaka@fedoraproject.org> - 0.994-1
f91c6b
- 0.994
f91c6b
f91c6b
* Thu Mar 29 2012 Mamoru Tasaka <mtasaka@fedoraproject.org> - 0.993-1
f91c6b
- 0.993
f91c6b
f91c6b
* Tue Feb 28 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.991-1
f91c6b
- Rebuilt for c++ ABI breakage
f91c6b
f91c6b
* Sun Jan 15 2012 Mamoru Tasaka <mtasaka@fedoraproject.org> - 0.991-1
f91c6b
- 0.991
f91c6b
f91c6b
* Mon Jan  9 2012 Mamoru Tasaka <mtasaka@fedoraproject.org> - 0.99-1
f91c6b
- 0.99
f91c6b
f91c6b
* Thu Jan  5 2012 Mamoru Tasaka <mtasaka@fedoraproject.org> - 0.98-2
f91c6b
- F-17: rebuild against gcc47
f91c6b
f91c6b
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.98-1
f91c6b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
f91c6b
f91c6b
* Tue Sep 29 2009 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.98-1
f91c6b
- 0.98
f91c6b
f91c6b
* Wed Jul 29 2009 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.98-0.5.pre3
f91c6b
- Enable tests on ppc{,64} again
f91c6b
f91c6b
* Sat Jul 25 2009 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.98-0.4.pre3
f91c6b
- Kill tests on ppc, ppc64 for now as tests hang
f91c6b
f91c6b
* Thu Jun  4 2009 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.98-0.3.pre3
f91c6b
- 0.98 pre3
f91c6b
f91c6b
* Thu Apr 23 2009 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.98-0.2.pre2
f91c6b
- 0.98 pre2
f91c6b
f91c6b
* Mon Mar  9 2009 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.98-0.1.pre1
f91c6b
- Update to 0.98pre1
f91c6b
f91c6b
* Tue Feb 24 2009 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.97-4
f91c6b
- F-11: Mass rebuild
f91c6b
f91c6b
* Sun Jun  1 2008 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.97-3
f91c6b
- Remove ancient || : after %%check
f91c6b
f91c6b
* Sun Feb  3 2008 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.97-1
f91c6b
- 0.97
f91c6b
f91c6b
* Thu Oct 25 2007 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.96-2
f91c6b
- License fix
f91c6b
f91c6b
* Wed Aug 22 2007 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.96-1.dist.2
f91c6b
- Mass rebuild (buildID or binutils issue)
f91c6b
f91c6b
* Fri Aug  3 2007 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.96-1.dist.1
f91c6b
- License update
f91c6b
f91c6b
* Mon Jun 11 2007 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.96-1
f91c6b
- 0.96 release
f91c6b
f91c6b
* Fri May  4 2007 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.95-2.dist.2
f91c6b
- rebuild
f91c6b
f91c6b
* Sun Apr  1 2007 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.95-2
f91c6b
- remove -lstdc++ from mecab-config (#233424)
f91c6b
f91c6b
* Sun Mar 11 2007 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.95-1
f91c6b
- 0.95
f91c6b
f91c6b
* Thu Mar  8 2007 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.95-0.1.pre1.1
f91c6b
- 0.95 pre1
f91c6b
f91c6b
* Tue Feb 27 2007 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.94-0.4.pre2
f91c6b
- Fix libexec dir for 64bit.
f91c6b
f91c6b
* Tue Feb 27 2007 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.94-0.3.pre2
f91c6b
- Package requirement deps reconstruct
f91c6b
f91c6b
* Mon Feb 26 2007 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.94-0.2.pre2
f91c6b
- Remove rpath on 64bit.
f91c6b
f91c6b
* Fri Feb 23 2007 Mamoru Tasaka <mtasaka@ioa.s.u-tokyo.ac.jp> - 0.94-0.1.pre2
f91c6b
- Initial packaging for Fedora.
f91c6b
f91c6b
* Fri Feb 23 2007 Minokichi Sato <m-sato@rc.kyushu-u.ac.jp>
f91c6b
- Initial build.