-%define pre pre44
Summary: Free versions of the 35 standard PostScript fonts
Summary(pl.UTF-8): Wolnodostępne wersje 35 standardowych fontów postscriptowych
Name: fonts-Type1-urw
-Version: 1.0.7
-Release: 0.%{pre}.1
-License: GPL v2
+Version: 20151005
+Release: 1
+License: AGPL v3 with PS/PDF embedding exception
Group: Fonts
-Source0: https://distfiles.macports.org/urw-fonts/urw-fonts-%{version}%{pre}.tar.bz2
-# Source0-md5: 51c6c2690593cd9bd92f197a6f2ff8bd
+Source0: http://downloads.ghostscript.com/public/fonts/urw-base35-%{version}.zip
+# Source0-md5: e221e1dbff1f2141fad6e6b8ac80a3bf
Source1: %{name}.Fontmap
+# fonts.scale from 1.0.7-pre44 (pre)release, contains traditional names (other than guessed by mkfontscale)
+Source2: %{name}.scale
+BuildRequires: unzip
BuildRequires: xorg-app-mkfontscale
Requires(post,postun): fontpostinst >= 0.1-6
Requires: %{_fontsdir}/Type1
%build
%{_bindir}/mkfontscale .
-tail -n +2 fonts.dir > fonts.dir.raw
-LC_ALL=C sort -t- -k1,13 -u fonts.dir.raw > fonts.dir.sorted
-join -j1 -t- -o1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,1.9,1.10,1.11,1.12,1.13,2.14,2.15 fonts.dir.sorted fonts.scale > fonts.scale.add
-LC_ALL=C sort -u fonts.dir.raw fonts.scale.add > fonts.scale.urw
+# generated file: skip count
+tail -n +2 fonts.scale | LC_ALL=C sort > fonts.scale-cur.sorted
+# traditional names: skip count, leave only one unique name (with single encoding)
+tail -n +2 %{SOURCE2} | LC_ALL=C sort -t- -k1,13 -u > fonts.scale-trad.sorted
+# apply autogenerated encodings list to each tranditional name
+join -j1 -t- -o1.1,1.2,1.3,1.4,1.5,1.6,1.7,1.8,1.9,1.10,1.11,1.12,1.13,2.14,2.15 fonts.scale-trad.sorted fonts.scale-cur.sorted > fonts.scale.add
+# merge all lists
+LC_ALL=C sort -u fonts.scale-cur.sorted fonts.scale-trad.sorted fonts.scale.add > fonts.scale.urw
%install
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
-%doc README* ChangeLog
+%doc LICENSE
%{t1fontsdir}/Fontmap.urw
%{t1fontsdir}/fonts.scale.urw
%{t1fontsdir}/a0100??l.pfb