Blame SPECS/anthy-unicode.spec

903bfa
%global pkg  anthy-unicode
903bfa
%bcond_with xemacs
903bfa
%bcond_without autoreconf
903bfa
903bfa
Name:  anthy-unicode
903bfa
Version: 1.0.0.20201109
903bfa
Release: 7%{?dist}
903bfa
# The entire source code is LGPLv2+ and dictionaries is GPLv2. the corpus data is under Public Domain.
903bfa
License: LGPLv2+ and GPLv2 and Public Domain
903bfa
URL:  https://github.com/fujiwarat/anthy-unicode/wiki
903bfa
BuildRequires: emacs
903bfa
BuildRequires: gcc
903bfa
BuildRequires: git
903bfa
%if 0%{?rhel} == 0
903bfa
BuildRequires: xemacs
903bfa
%endif
903bfa
%if %{with autoreconf}
903bfa
BuildRequires: autoconf
903bfa
BuildRequires: automake
903bfa
BuildRequires: libtool
903bfa
BuildRequires: make
903bfa
%endif
903bfa
903bfa
Source0: https://github.com/fujiwarat/anthy-unicode/releases/download/%{version}/%{name}-%{version}.tar.gz
903bfa
Source1: %{name}-init.el
903bfa
# Upstreamed patches
903bfa
#Patch0: %%{name}-HEAD.patch
903bfa
Patch0: %{name}-HEAD.patch
903bfa
903bfa
Summary: Japanese character set input library for Unicode
903bfa
903bfa
%description
903bfa
Anthy Unicode is another Anthy project and provides the library to input
903bfa
Japanese on the applications, such as X applications and emacs. and the
903bfa
user dictionaries and the users information which is used for the conversion,
903bfa
is stored into their own home directory. So Anthy Unicode is secure than
903bfa
other conversion server.
903bfa
903bfa
%package -n emacs-%{pkg}
903bfa
Summary: Emacs files for %{pkg}
903bfa
Requires: %{name} = %{version}-%{release}
903bfa
Requires: emacs(bin) >= %{_emacs_version}
903bfa
BuildArch: noarch
903bfa
903bfa
%description -n emacs-%{pkg}
903bfa
This package contains the byte compiled elips packages to run %{pkg}
903bfa
with GNU Emacs.
903bfa
903bfa
%if 0%{?rhel} == 0
903bfa
%package -n xemacs-%{pkg}
903bfa
Summary: XEmacs files for %{pkg}
903bfa
Requires: %{name} = %{version}-%{release}
903bfa
Requires: xemacs(bin) >= %{_xemacs_version}
903bfa
BuildArch: noarch
903bfa
903bfa
%description -n xemacs-%{pkg}
903bfa
This package contains the elips packages to run %{pkg} with GNU XEmacs.
903bfa
%endif
903bfa
903bfa
%package devel
903bfa
Summary: Header files and library for developing programs which uses Anthy Unicode
903bfa
Requires: %{name}%{?_isa} = %{version}-%{release}
903bfa
Requires: pkgconfig
903bfa
903bfa
%description devel
903bfa
The anthy-devel package contains the development files which is needed to build
903bfa
the programs which uses Anthy Unicode.
903bfa
903bfa
903bfa
%prep
903bfa
%autosetup -S git
903bfa
903bfa
%build
903bfa
%if %{with autoreconf}
903bfa
autoreconf -f -i -v
903bfa
%endif
903bfa
%configure --disable-static
903bfa
make %{?_smp_mflags}
903bfa
903bfa
%install
903bfa
make install DESTDIR=$RPM_BUILD_ROOT INSTALL="install -p"
903bfa
903bfa
# remove unnecessary files
903bfa
rm $RPM_BUILD_ROOT%{_libdir}/lib*.la
903bfa
903bfa
## for emacs-anthy
903bfa
mkdir -p $RPM_BUILD_ROOT%{_emacs_sitestartdir}
903bfa
install -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_emacs_sitestartdir}
903bfa
903bfa
%if 0%{?rhel} == 0
903bfa
## for xemacs-anthy
903bfa
mkdir -p $RPM_BUILD_ROOT%{_xemacs_sitestartdir}
903bfa
install -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_xemacs_sitestartdir}
903bfa
# FIXME lisp build
903bfa
%if %{with xemacs}
903bfa
pushd $RPM_BUILD_DIR/%{name}-%{version}/src-util
903bfa
make clean
903bfa
make EMACS=xemacs lispdir="%{_xemacs_sitelispdir}/%{pkg}"
903bfa
make install-lispLISP DESTDIR=$RPM_BUILD_ROOT EMACS=xemacs lispdir="%{_xemacs_sitelispdir}/%{pkg}" INSTALL="install -p"
903bfa
popd
903bfa
%else
903bfa
mkdir -p $RPM_BUILD_ROOT%{_xemacs_sitelispdir}/%{pkg}
903bfa
cp $RPM_BUILD_ROOT%{_emacs_sitelispdir}/%{pkg}/*.el \
903bfa
   $RPM_BUILD_ROOT%{_xemacs_sitelispdir}/%{pkg}/.
903bfa
%endif
903bfa
%endif
903bfa
903bfa
%check
903bfa
sed -e "s|@datadir@|$PWD|" -e "s|@PACKAGE@|mkanthydic|" \
903bfa
  anthy-unicode.conf.in > test.conf
903bfa
_TEST_ENV="LD_LIBRARY_PATH=$PWD/src-main/.libs:$PWD/src-worddic/.libs"
903bfa
_TEST_ENV="$_TEST_ENV CONFFILE=$PWD/test.conf"
903bfa
cd test
903bfa
env $_TEST_ENV ./anthy --all
903bfa
env $_TEST_ENV ./checklib
903bfa
cd ../src-util
903bfa
env $_TEST_ENV ./anthy-dic-tool-unicode --load dic-tool-input
903bfa
diff $HOME/.config/anthy/private_words_default dic-tool-result
903bfa
env $_TEST_ENV ./anthy-dic-tool-unicode --dump
903bfa
mkdir -p $HOME/.anthy
903bfa
mv $HOME/.config/anthy/private_words_default $HOME/.anthy
903bfa
env $_TEST_ENV ./anthy-dic-tool-unicode --migrate
903bfa
diff $HOME/.config/anthy/private_words_default dic-tool-result
903bfa
cd ..
903bfa
903bfa
903bfa
%ldconfig_scriptlets
903bfa
903bfa
%files
903bfa
%doc AUTHORS ChangeLog DIARY NEWS README
903bfa
%license COPYING
903bfa
%{_bindir}/*
903bfa
# If new keywords are added in conf files, "noreplace" flag needs to be deleted
903bfa
%config(noreplace) %{_sysconfdir}/*.conf
903bfa
%{_libdir}/lib*.so.*
903bfa
%{_datadir}/%{pkg}/
903bfa
903bfa
%files -n emacs-%{pkg}
903bfa
%doc doc/ELISP
903bfa
%{_emacs_sitelispdir}/%{pkg}/*.el
903bfa
%{_emacs_sitelispdir}/%{pkg}/*.elc
903bfa
%{_emacs_sitestartdir}/*.el
903bfa
%dir %{_emacs_sitelispdir}/%{pkg}
903bfa
903bfa
%if 0%{?rhel} == 0
903bfa
%files -n xemacs-%{pkg}
903bfa
%doc doc/ELISP
903bfa
%{_xemacs_sitelispdir}/%{pkg}/*.el
903bfa
%if %{with xemacs}
903bfa
%{_xemacs_sitelispdir}/%{pkg}/*.elc
903bfa
%endif
903bfa
%{_xemacs_sitestartdir}/*.el
903bfa
%dir %{_xemacs_sitelispdir}/%{pkg}
903bfa
%endif
903bfa
903bfa
%files devel
903bfa
%doc doc/DICLIB doc/DICUTIL doc/GLOSSARY doc/GRAMMAR doc/GUIDE.english doc/ILIB doc/LEARNING doc/LIB doc/MISC doc/POS doc/SPLITTER doc/TESTING doc/protocol.txt
903bfa
%{_includedir}/*
903bfa
%{_libdir}/lib*.so
903bfa
%{_libdir}/pkgconfig/*.pc
903bfa
903bfa
903bfa
%changelog
903bfa
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1.0.0.20201109-7
903bfa
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
903bfa
  Related: rhbz#1991688
903bfa
903bfa
* Tue Jul 13 2021 Takao Fujiwara <fujiwara@redhat.com> 1.0.0.20201109-6
903bfa
- Fix covscan report. Related: rhbz#1963073
903bfa
903bfa
* Mon May 03 2021 Takao Fujiwara <fujiwara@redhat.com> 1.0.0.20201109-5
903bfa
- Delete unnecessary xemacs in tests/tests.yml. Related: rhbz#1956212
903bfa
903bfa
* Sat May 01 2021 Takao Fujiwara <fujiwara@redhat.com> 1.0.0.20201109-4
903bfa
- Enable CI. Related: rhbz#1956212
903bfa
903bfa
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 1.0.0.20201109-3
903bfa
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
903bfa
903bfa
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0.20201109-2
903bfa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
903bfa
903bfa
* Mon Nov 09 2020 Takao Fujiwara <fujiwara@redhat.com> 1.0.0.20201109-1
903bfa
- Bump 1.0.0.20201109
903bfa
903bfa
* Fri Jul 31 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0.20191015-5
903bfa
- Second attempt - Rebuilt for
903bfa
  https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
903bfa
903bfa
* Mon Jul 27 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0.20191015-4
903bfa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
903bfa
903bfa
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1.0.0.20191015-3
903bfa
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
903bfa
903bfa
* Mon Oct 21 2019 Takao Fujiwara <fujiwara@redhat.com> 1.0.0.20191015-2
903bfa
- Add %%check to run local test programs
903bfa
903bfa
* Tue Oct 15 2019 Takao Fujiwara <fujiwara@redhat.com> 1.0.0.20191015-1
903bfa
- Release anthy-unicode 1.0.0.20191015
903bfa
903bfa
* Wed Aug 07 2019 Takao Fujiwara <fujiwara@redhat.com> 1.0.0.20190412-1
903bfa
- Initial package
903bfa
- Update license
903bfa
- Delete Group tags
903bfa
- Make parse_modify_freq_command() for UTF-8
903bfa
- Revert ptab.h to EUC-JP
903bfa
- BuildRequire: git
903bfa
- Genearate emacs- and xemacs- sub packages
903bfa
- Fix some obsolete warnings in emacs batch-byte-compile
903bfa
- Fix shared-lib-calls-exit
903bfa
- Fix non-conffile-in-etc
903bfa
- Fix description-line-too-long