From f3ea0d94333d9dc5077a19b78044bb7e2a3cbd7fdfe39e68e1fe2ccb9e0564fd Mon Sep 17 00:00:00 2001 From: Cor Blom Date: Thu, 3 Sep 2020 19:21:16 +0000 Subject: [PATCH] - Place the math fonts coming with LyX in a separate package and install them in the system font directory OBS-URL: https://build.opensuse.org/package/show/Publishing/lyx?expand=0&rev=194 --- lyx.changes | 6 ++++++ lyx.spec | 25 +++++++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/lyx.changes b/lyx.changes index 7248155..96f0880 100644 --- a/lyx.changes +++ b/lyx.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Thu Sep 3 19:19:34 UTC 2020 - Cor Blom + +- Place the math fonts coming with LyX in a separate package and + install them in the system font directory + ------------------------------------------------------------------- Mon Jun 29 16:43:30 UTC 2020 - Andreas Stieger diff --git a/lyx.spec b/lyx.spec index 8ece5d2..21a5218 100644 --- a/lyx.spec +++ b/lyx.spec @@ -42,6 +42,7 @@ BuildRequires: bc BuildRequires: enchant-devel BuildRequires: fdupes BuildRequires: file-devel +BuildRequires: fontpackages-devel BuildRequires: hicolor-icon-theme BuildRequires: hunspell-devel BuildRequires: libboost_headers-devel @@ -60,6 +61,7 @@ BuildRequires: pkgconfig(Qt5Svg) BuildRequires: pkgconfig(Qt5Widgets) BuildRequires: pkgconfig(Qt5Xml) #!BuildIgnore: lyx +Requires: %{name}-fonts Requires: ImageMagick Requires: ghostscript # Goal is to require/recommends (roughly) everything that is supported in the GUI of LyX @@ -110,6 +112,7 @@ Recommends: texlive-diagbox Recommends: texlive-picinpar Recommends: texlive-shapepar Recommends: texlive-sidecap +%reconfigure_fonts_prereq %description LyX is a document processor that encourages an approach to writing @@ -125,6 +128,14 @@ LyX uses ImageMagick to deal with images. For security reasons (open)SUSE limits the functionaly of ImageMagick. See README.SUSE (in /usr/share/doc/packages/lyx/) for more information. +%package fonts +Summary: Fonts for displaying math. +Group: System/X11/Fonts +BuildArch: noarch + +%description fonts +A collection of Math symbol fonts for LyX. + %prep %setup -q %patch0 -p1 @@ -165,6 +176,11 @@ cp ANNOUNCE COPYING NEWS \ mkdir -p $RPM_BUILD_ROOT$TEXMF/tex/latex ln -s %{_datadir}/lyx/tex $RPM_BUILD_ROOT$TEXMF/tex/latex/lyx +# fonts +install -m 0755 -d %{buildroot}%{_fontsdir}/lyx +mv %{buildroot}%{_datadir}/lyx/fonts/*.ttf %{buildroot}%{_fontsdir}/lyx/ +rm -rf %{buildroot}%{_datadir}/lyx/fonts + install -p -D -m 0644 lib/appdata.xml %{buildroot}%{_datadir}/appdata/lyx.appdata.xml install -p -D -m 0644 lib/scripts/bash_completion %{buildroot}%{_datadir}/bash-completion/completions/lyx @@ -175,6 +191,8 @@ install -p -D -m 0644 lib/scripts/bash_completion %{buildroot}%{_datadir}/bash-c %find_lang %{name} +%reconfigure_fonts_scriptlets -c -n %{name}-fonts + %post %desktop_database_post %icon_theme_cache_post @@ -203,4 +221,11 @@ install -p -D -m 0644 lib/scripts/bash_completion %{buildroot}%{_datadir}/bash-c %{_mandir}/man1/tex2lyx.1%{?ext_man} %{_datadir}/bash-completion/completions/lyx +%files fonts +%dir %{_fontsdir} +%dir %{_fontsdir}/lyx +%{_fontsdir}/lyx/*.ttf +%doc lib/fonts/BaKoMaFontLicense.txt +%doc lib/fonts/ReadmeBaKoMa4LyX.txt + %changelog