Blame SPECS/anthy-unicode.spec

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