From c2b8ec507034a2bfe95e6117574e435224ba81c2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Arkadiusz=20Mi=C5=9Bkiewicz?= Date: Wed, 24 Aug 2011 20:15:10 +0000 Subject: [PATCH] rel 2; use pe script from fedora Changed files: fonts-TTF-RedHat-liberation.spec -> 1.22 generate.pe -> 1.1 --- fonts-TTF-RedHat-liberation.spec | 16 +++++++++------- generate.pe | 19 +++++++++++++++++++ 2 files changed, 28 insertions(+), 7 deletions(-) create mode 100644 generate.pe diff --git a/fonts-TTF-RedHat-liberation.spec b/fonts-TTF-RedHat-liberation.spec index 6556fb8..24c9157 100644 --- a/fonts-TTF-RedHat-liberation.spec +++ b/fonts-TTF-RedHat-liberation.spec @@ -2,13 +2,14 @@ Summary: Fonts to replace commonly used Microsoft Windows Fonts Summary(pl.UTF-8): Fonty zastępujące popularne fonty z Microsoft Windows Name: fonts-TTF-RedHat-liberation Version: 1.07.0 -Release: 1 +Release: 2 Epoch: 1 License: GPL v2 + exceptions Group: Fonts Source0: https://fedorahosted.org/releases/l/i/liberation-fonts/liberation-fonts-%{version}.tar.gz # Source0-md5: 87ba9eea831ebc6fab9578abcebda9a5 Source1: %{name}.fontconfig +Source2: generate.pe URL: https://fedorahosted.org/liberation-fonts/ BuildRequires: fontforge >= 20090923 BuildRequires: unzip @@ -42,9 +43,11 @@ Bitstream Vera Sans Mono). %prep %setup -q -n liberation-fonts-%{version} +install -m755 %{SOURCE2} . %build -%{__make} +rm -f *.ttf + ./generate.pe src/*.sfd %install rm -rf $RPM_BUILD_ROOT @@ -52,7 +55,7 @@ install -d $RPM_BUILD_ROOT%{_ttffontsdir} install -d $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.avail install -d $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d -cp -a liberation-*/*.ttf $RPM_BUILD_ROOT%{_ttffontsdir} +cp -a *.ttf $RPM_BUILD_ROOT%{_ttffontsdir} install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.avail/60-liberation.conf ln -s ../conf.avail/60-liberation.conf $RPM_BUILD_ROOT%{_sysconfdir}/fonts/conf.d @@ -68,9 +71,8 @@ fontpostinst TTF %files %defattr(644,root,root,755) %doc AUTHORS ChangeLog License.txt README -%{_ttffontsdir}/LiberationMono-*.ttf -%{_ttffontsdir}/LiberationSans-*.ttf -%{_ttffontsdir}/LiberationSansNarrow-*.ttf -%{_ttffontsdir}/LiberationSerif-*.ttf +%{_ttffontsdir}/LiberationMono*.ttf +%{_ttffontsdir}/LiberationSans*.ttf +%{_ttffontsdir}/LiberationSerif*.ttf %{_sysconfdir}/fonts/conf.avail/60-liberation.conf %{_sysconfdir}/fonts/conf.d/60-liberation.conf diff --git a/generate.pe b/generate.pe new file mode 100644 index 0000000..bf9bcb2 --- /dev/null +++ b/generate.pe @@ -0,0 +1,19 @@ +#!/usr/bin/env fontforge + +# script file for FontForge for TTF generation +# usage: +# mkdir TTFfiles +# chmod +x generate.pe +# ./generate.pe *.sfd + +if ($version < "20061220") + Error("Your version of FontForge is too old - 20061220 or newer is required"); +endif +i = 1 +while ( i < $argc ) + Open($argv[i], 1) + #Use gen_flags=Defualt fmflags value as -1 + gen_flags = -1 + Generate("" + $fontname + ".ttf", "", gen_flags) + i++ +endloop -- 2.43.0