From a10d494a75940957318894ddbf132bfc2ddfbe9fb5052195acc23216465f280b Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Fri, 31 Aug 2018 12:04:04 +0000 Subject: [PATCH 1/2] Accepting request 632473 from home:qzhao:branches:M17N - Update anthy.spec: Divide openSUSE build with emacs function and SLE doesn't need it. OBS-URL: https://build.opensuse.org/request/show/632473 OBS-URL: https://build.opensuse.org/package/show/M17N/anthy?expand=0&rev=31 --- anthy.changes | 6 ++++++ anthy.spec | 18 +++++++++++++++--- 2 files changed, 21 insertions(+), 3 deletions(-) diff --git a/anthy.changes b/anthy.changes index 4f76626..2e3e489 100644 --- a/anthy.changes +++ b/anthy.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Aug 31 10:19:58 UTC 2018 - qzhao@suse.com + +- Update anthy.spec: Divide openSUSE build with emacs function and + SLE doesn't need it. + ------------------------------------------------------------------- Thu Feb 8 17:26:49 UTC 2018 - msuchanek@suse.com diff --git a/anthy.spec b/anthy.spec index d2e2829..e4c65fb 100644 --- a/anthy.spec +++ b/anthy.spec @@ -16,11 +16,19 @@ # +%if 0%{?is_opensuse} +%define with_emacs 1 +%else +%define with_emacs 0 +%endif + Name: anthy -BuildRequires: emacs-x11 BuildRequires: fdupes BuildRequires: libtool +%if %{with_emacs} +BuildRequires: emacs-x11 BuildRequires: xemacs +%endif Version: 9100h Release: 0 Url: https://osdn.jp/projects/anthy/ @@ -91,6 +99,7 @@ cd test %install %makeinstall +%if %{with_emacs} install -m 644 $RPM_SOURCE_DIR/suse-start-anthy.el $RPM_BUILD_ROOT/usr/share/emacs/site-lisp/ # compile the XEmacs versions of the emacs-lisp files and install them: pushd src-util @@ -100,6 +109,7 @@ pushd src-util mkdir -p $RPM_BUILD_ROOT/usr/share/xemacs/site-packages/lisp/anthy install -m 644 *.el *.elc $RPM_BUILD_ROOT/usr/share/xemacs/site-packages/lisp/anthy popd +%endif %fdupes $RPM_BUILD_ROOT/usr/share %{__rm} -f %{buildroot}%{_libdir}/*.la # remove unneeded Makefiles for documents @@ -111,15 +121,17 @@ rm -f doc/Makefile.* %files %defattr(-, root, root) -%doc AUTHORS COPYING ChangeLog DIARY INSTALL NEWS README -%doc doc +%doc AUTHORS ChangeLog DIARY INSTALL NEWS README doc +%license COPYING %config %{_sysconfdir}/anthy-conf %dir /usr/share/anthy/ /usr/share/anthy/* %{_bindir}/* %{_libdir}/*.so.* +%if %{with_emacs} /usr/share/emacs/site-lisp/* /usr/share/xemacs/* +%endif %files devel %defattr(-, root, root) From 306e72212c0925baf0dd6e89b18cd38a5004b5331300eb64c0aa77f97263aed0 Mon Sep 17 00:00:00 2001 From: Fuminobu Takeyama Date: Sun, 2 Sep 2018 06:23:14 +0000 Subject: [PATCH 2/2] Accepting request 632647 from home:namtrac:branches:M17N - Cleanup spec file with spec-cleaner - Don't install INSTALL file - Use %bcond_with{out} OBS-URL: https://build.opensuse.org/request/show/632647 OBS-URL: https://build.opensuse.org/package/show/M17N/anthy?expand=0&rev=32 --- anthy.changes | 7 +++++ anthy.spec | 81 ++++++++++++++++++++++++--------------------------- 2 files changed, 45 insertions(+), 43 deletions(-) diff --git a/anthy.changes b/anthy.changes index 2e3e489..58311b5 100644 --- a/anthy.changes +++ b/anthy.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Sat Sep 1 12:13:32 UTC 2018 - Ismail Dönmez + +- Cleanup spec file with spec-cleaner +- Don't install INSTALL file +- Use %bcond_with{out} + ------------------------------------------------------------------- Fri Aug 31 10:19:58 UTC 2018 - qzhao@suse.com diff --git a/anthy.spec b/anthy.spec index e4c65fb..9d3c7d2 100644 --- a/anthy.spec +++ b/anthy.spec @@ -17,34 +17,18 @@ %if 0%{?is_opensuse} -%define with_emacs 1 +%bcond_without emacs %else -%define with_emacs 0 +%bcond_with emacs %endif - Name: anthy -BuildRequires: fdupes -BuildRequires: libtool -%if %{with_emacs} -BuildRequires: emacs-x11 -BuildRequires: xemacs -%endif Version: 9100h Release: 0 -Url: https://osdn.jp/projects/anthy/ -Source0: anthy-%{version}.tar.bz2 -Source1: suse-start-anthy.el -Source2: baselibs.conf -Patch2: anthy-last-command-char-xemacs.patch -Patch3: bugzilla-224463-comparison-with-string-literal.patch -# PATCH-FIX-OPENSUSE anthy-use-last-command-event.diff bnc#849211 tiwai@suse.de -Patch4: anthy-use-last-command-event.diff -BuildRoot: %{_tmppath}/%{name}-%{version}-build Summary: Kana-Kanji Conversion Engine # Summary(ja): 仮名漢字変換エンジン # Anthy(旧称Ancy) -# -# PC-Unix用の仮名漢字変換エンジンとしては Canna、 FreeWnn等が有名ですが、 +# +# PC-Unix用の仮名漢字変換エンジンとしては Canna、 FreeWnn等が有名ですが、 # いずれも1990年前後の国産Unixワークステーションのために開発され、 フリー # なものの開発はほぼ停止している状態です。 Hekeプロジェクトでは新たな変 # 換エンジンを辞書を除いてフルスクラッチで 開発を行っています。 @@ -52,22 +36,36 @@ Summary: Kana-Kanji Conversion Engine # 著者: # ------ # 田畑 悠介 -License: GPL-2.0+ and LGPL-2.1+ +License: GPL-2.0-or-later AND LGPL-2.1-or-later Group: System/I18n/Japanese +URL: https://osdn.jp/projects/anthy/ +Source0: anthy-%{version}.tar.bz2 +Source1: suse-start-anthy.el +Source2: baselibs.conf +Patch2: anthy-last-command-char-xemacs.patch +Patch3: bugzilla-224463-comparison-with-string-literal.patch +# PATCH-FIX-OPENSUSE anthy-use-last-command-event.diff bnc#849211 tiwai@suse.de +Patch4: anthy-use-last-command-event.diff +BuildRequires: fdupes +BuildRequires: libtool +%if %{with emacs} +BuildRequires: emacs-x11 +BuildRequires: xemacs +%endif %description Anthy (previously called 'Ancy'): Canna, FreeWnn, and others are famous Kana-Kanji conversion engines usable for Unix on PCs. They were originally developed for Japanese -Unix workstations around 1990 and development has practically stopped. +Unix workstations around 1990 and development has practically stopped. Therefore, the Heke Project is writing a free conversion engine from scratch (apart from the dictionary, which is developed outside of the Heke Project). %package devel Summary: Include Files and Libraries mandatory for Development. -License: GPL-2.0+ +License: GPL-2.0-or-later Group: System/I18n/Japanese Requires: %{name} = %{version} # Summary(ja): Anthy のヘッダファイル及びライブラリです。 @@ -88,8 +86,8 @@ to develop applications that require these. %build autoreconf --force --install -CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" \ -CXXFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" \ +CFLAGS="%{optflags} -fno-strict-aliasing" \ +CXXFLAGS="%{optflags} -fno-strict-aliasing" \ %configure --disable-static --with-pic make %{?_smp_mflags} @@ -98,45 +96,42 @@ cd test ./anthy --all %install -%makeinstall -%if %{with_emacs} -install -m 644 $RPM_SOURCE_DIR/suse-start-anthy.el $RPM_BUILD_ROOT/usr/share/emacs/site-lisp/ +%make_install +%if %{with emacs} +install -m 644 $RPM_SOURCE_DIR/suse-start-anthy.el %{buildroot}%{_datadir}/emacs/site-lisp/ # compile the XEmacs versions of the emacs-lisp files and install them: pushd src-util rm -f *.elc # make EMACS=xemacs EMACS=xemacs ../elisp-comp *.el - mkdir -p $RPM_BUILD_ROOT/usr/share/xemacs/site-packages/lisp/anthy - install -m 644 *.el *.elc $RPM_BUILD_ROOT/usr/share/xemacs/site-packages/lisp/anthy + mkdir -p %{buildroot}%{_datadir}/xemacs/site-packages/lisp/anthy + install -m 644 *.el *.elc %{buildroot}%{_datadir}/xemacs/site-packages/lisp/anthy popd %endif -%fdupes $RPM_BUILD_ROOT/usr/share -%{__rm} -f %{buildroot}%{_libdir}/*.la +%fdupes %{buildroot}%{_datadir} +find %{buildroot} -type f -name "*.la" -delete -print # remove unneeded Makefiles for documents rm -f doc/Makefile.* %post -p /sbin/ldconfig - %postun -p /sbin/ldconfig %files -%defattr(-, root, root) -%doc AUTHORS ChangeLog DIARY INSTALL NEWS README doc +%doc AUTHORS ChangeLog DIARY NEWS README doc %license COPYING %config %{_sysconfdir}/anthy-conf -%dir /usr/share/anthy/ -/usr/share/anthy/* +%dir %{_datadir}/anthy/ +%{_datadir}/anthy/* %{_bindir}/* %{_libdir}/*.so.* -%if %{with_emacs} -/usr/share/emacs/site-lisp/* -/usr/share/xemacs/* +%if %{with emacs} +%{_datadir}/emacs/site-lisp/* +%{_datadir}/xemacs/* %endif %files devel -%defattr(-, root, root) -%dir /usr/include/anthy/ -/usr/include/anthy/* +%dir %{_includedir}/anthy/ +%{_includedir}/anthy/* %{_libdir}/*.so %{_libdir}/pkgconfig/anthy.pc