| 1 | Summary: Fonts for the Ghostscript PostScript interpreter | 
|---|
| 2 | Name: ghostscript-fonts | 
|---|
| 3 | Version: 6.0 | 
|---|
| 4 | Release: 1%{?dist} | 
|---|
| 5 |  | 
|---|
| 6 | # Contacted Kevin Hartig, who agreed to relicense his fonts under the SIL Open Font | 
|---|
| 7 | # License. Hershey fonts are under the "Hershey Font License", which is not what Fontmap | 
|---|
| 8 | # says (Fontmap is wrong). | 
|---|
| 9 | License: GPLv2+ and Hershey and MIT and OFL and Public Domain | 
|---|
| 10 | Group: Applications/Publishing | 
|---|
| 11 | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) | 
|---|
| 12 | URL: http://www.gnu.org/software/ghostscript/ | 
|---|
| 13 |  | 
|---|
| 14 | Source0: gnu-gs-fonts-other-%{version}.tar.gz | 
|---|
| 15 |  | 
|---|
| 16 | Requires: fontconfig | 
|---|
| 17 | BuildArchitectures: noarch | 
|---|
| 18 |  | 
|---|
| 19 | %define fontdir %{_datadir}/fonts/default/ghostscript | 
|---|
| 20 | %define catalogue %{_sysconfdir}/X11/fontpath.d | 
|---|
| 21 |  | 
|---|
| 22 | %description | 
|---|
| 23 | Ghostscript-fonts contains a set of fonts that Ghostscript, a | 
|---|
| 24 | PostScript interpreter, uses to render text. These fonts are in | 
|---|
| 25 | addition to the fonts shared by Ghostscript and the X Window System. | 
|---|
| 26 |  | 
|---|
| 27 | %prep | 
|---|
| 28 | %setup -q -c ghostscript-fonts-%{version} | 
|---|
| 29 |  | 
|---|
| 30 | %build | 
|---|
| 31 |  | 
|---|
| 32 | %install | 
|---|
| 33 | rm -rf $RPM_BUILD_ROOT | 
|---|
| 34 | mkdir -p $RPM_BUILD_ROOT%{fontdir} | 
|---|
| 35 | cp -p fonts/* $RPM_BUILD_ROOT%{fontdir} | 
|---|
| 36 |  | 
|---|
| 37 | # Touch ghosted files | 
|---|
| 38 | touch $RPM_BUILD_ROOT%{fontdir}/fonts.dir | 
|---|
| 39 | touch $RPM_BUILD_ROOT%{fontdir}/fonts.scale | 
|---|
| 40 |  | 
|---|
| 41 | # Install catalogue symlink | 
|---|
| 42 | mkdir -p $RPM_BUILD_ROOT%{catalogue} | 
|---|
| 43 | ln -sf %{fontdir} $RPM_BUILD_ROOT%{catalogue}/default-ghostscript | 
|---|
| 44 |  | 
|---|
| 45 | #post | 
|---|
| 46 | #{ | 
|---|
| 47 | #   mkfontscale %{fontdir} | 
|---|
| 48 | #   mkfontdir %{fontdir} | 
|---|
| 49 | #   fc-cache %{_datadir}/fonts | 
|---|
| 50 | #} &> /dev/null || : | 
|---|
| 51 |  | 
|---|
| 52 | #postun | 
|---|
| 53 | #{ | 
|---|
| 54 | #   if [ "$1" = "0" ]; then | 
|---|
| 55 | #      fc-cache %{_datadir}/fonts | 
|---|
| 56 | #   fi | 
|---|
| 57 | #} &> /dev/null || : | 
|---|
| 58 |  | 
|---|
| 59 | %clean | 
|---|
| 60 | rm -rf $RPM_BUILD_ROOT | 
|---|
| 61 |  | 
|---|
| 62 | %files | 
|---|
| 63 | %defattr(-,root,root,-) | 
|---|
| 64 | %{_datadir}/fonts/default/ | 
|---|
| 65 | %{catalogue}/default-ghostscript | 
|---|
| 66 | %ghost %verify(not md5 size mtime) %{fontdir}/fonts.dir | 
|---|
| 67 | %ghost %verify(not md5 size mtime) %{fontdir}/fonts.scale | 
|---|
| 68 |  | 
|---|
| 69 | %changelog | 
|---|
| 70 | * Fri Dec 12 2014 yd | 
|---|
| 71 | - initial unixroot build. | 
|---|