ghostscript-fonts-grops/ghostscript-fonts-grops.spec
Marguerite Su 9125aafdaa Accepting request 212355 from home:yecril71pl
A version of PostScript® driver for Groff to support characters outside ISO Latin 1 character set (bnc#856842).

OBS-URL: https://build.opensuse.org/request/show/212355
OBS-URL: https://build.opensuse.org/package/show/M17N:fonts/ghostscript-fonts-grops?expand=0&rev=1
2013-12-28 13:33:08 +00:00

56 lines
1.4 KiB
RPMSpec

Name: ghostscript-fonts-grops
Version: 1.22.2
Release: 0
Url: http://www.gnu.org/software/groff/groff.html
Requires: groff = %{version}
Summary: Ghostscript fonts imported to groff for use with grops
License: GPL-2.0
Source: gsalias.txt
BuildArch: noarch
BuildRequires: ghostscript groff-full fontforge
%description
A version of PostScript® driver for Groff to support characters outside ISO Latin 1 character set.
%prep
%build
%define gs_fonts %{_datadir}/ghostscript/fonts
%define import_font() ln -s -T "%{gs_fonts}/%1.afm" "%2.afm" && pfbtopfa "%{gs_fonts}/%1.pfb" "devps/%1.pfa"
cp -t. '%{_datadir}'/ghostscript/*/doc/COPYING
mkdir devps
while read fn fa
# Grops font generator expects conventional font file names;
# the substitutes provided by ghostscript must be linked accordingly.
# The link is needed only at build time.
# Ghostscript substitutes stripped fonts, full fonts must be embedded in the printout.
# Groff only knows how to embed PFA fonts.
do %{import_font $fn $fa}
done < '%{S:0}'
cd devps
ln -s -t. '%{_datadir}/groff/current/font/devps/generate'
make -fgenerate/Makefile afmdir=..
# Register fonts to be embedded
cd ..
for f in *.afm
do pf="$(readlink "${f}")"
pf="${pf##*/}"
pf="${pf:0:-4}.pfa"
read<"devps/${pf}" decl fn ver
echo "${fn}" "${pf}"
done >>devps/download
%install
target='%{buildroot}%{_datadir}/groff/current/font/gs'
install -d "${target}"
mv "-t${target}" devps
%files
%defattr(-,root,root)
%doc COPYING
%{_datadir}/*
%changelog