2016-11-05 16:58:31 +01:00
|
|
|
|
#
|
|
|
|
|
# spec file for package int10h-oldschoolpc-fonts
|
|
|
|
|
#
|
2020-10-29 12:51:48 +01:00
|
|
|
|
# Copyright (c) 2020 SUSE LLC
|
2016-11-05 16:58:31 +01:00
|
|
|
|
#
|
|
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
|
2019-01-23 00:15:06 +01:00
|
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2016-11-05 16:58:31 +01:00
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Name: int10h-oldschoolpc-fonts
|
2020-11-24 23:26:17 +01:00
|
|
|
|
Version: 2.2
|
2016-11-05 16:58:31 +01:00
|
|
|
|
Release: 0
|
|
|
|
|
Summary: Remakes of old computer hardware fonts
|
|
|
|
|
License: CC-BY-SA-4.0
|
|
|
|
|
Group: System/X11/Fonts
|
2019-01-23 00:15:06 +01:00
|
|
|
|
URL: http://int10h.org/oldschool-pc-fonts/
|
2016-11-05 16:58:31 +01:00
|
|
|
|
|
2020-11-24 23:26:17 +01:00
|
|
|
|
Source: https://int10h.org/oldschool-pc-fonts/download/oldschool_pc_font_pack_v2.2_FULL.zip
|
2019-01-23 00:15:06 +01:00
|
|
|
|
Source8: ratio.txt
|
2016-11-05 16:58:31 +01:00
|
|
|
|
BuildRequires: fontpackages-devel
|
2020-11-03 13:05:10 +01:00
|
|
|
|
BuildRequires: lcdf-typetools
|
2016-11-05 16:58:31 +01:00
|
|
|
|
BuildRequires: unzip
|
|
|
|
|
%reconfigure_fonts_prereq
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
|
|
%description
|
2020-10-29 13:55:52 +01:00
|
|
|
|
This fontpack contains remakes of various type styles from text-mode
|
|
|
|
|
era PCs — in modern Unicode-compatible TrueType form (plus straight
|
|
|
|
|
bitmap versions). The main focus is on hardware character sets: the
|
|
|
|
|
kind that's located in a ROM and shown by default when working in
|
|
|
|
|
text (or graphics) mode.
|
2016-11-05 16:58:31 +01:00
|
|
|
|
|
2019-01-23 00:15:06 +01:00
|
|
|
|
[ Classic hardware text mode stretches the fonts to fit the screen!
|
|
|
|
|
To recreate the same visuals of that, a stretch factor must be
|
|
|
|
|
applied. For details, see ratio.txt inside the package. ]
|
2016-11-05 16:58:31 +01:00
|
|
|
|
|
2020-10-29 13:55:52 +01:00
|
|
|
|
%package stretched
|
|
|
|
|
Summary: Pre-stretched versions of int10h-oldschoolpc-fonts
|
|
|
|
|
Group: System/X11/Fonts
|
2020-11-03 13:05:10 +01:00
|
|
|
|
Conflicts: %name < %version
|
|
|
|
|
Conflicts: %name > %version
|
|
|
|
|
%reconfigure_fonts_prereq
|
2020-10-29 13:55:52 +01:00
|
|
|
|
|
|
|
|
|
%description stretched
|
|
|
|
|
This package contains aspect-corrected and non-corrected-but-stretched
|
|
|
|
|
variants of the main font files.
|
|
|
|
|
|
2016-11-05 16:58:31 +01:00
|
|
|
|
%prep
|
|
|
|
|
%setup -Tcqa0
|
2019-01-23 00:15:06 +01:00
|
|
|
|
cp "%_sourcedir/ratio.txt" .
|
2016-11-05 16:58:31 +01:00
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
iconv -f cp437 -t utf-8 <README.NFO | perl -i -pe 's{\r}{}g' >readme.txt
|
|
|
|
|
mv LICENSE.TXT license.txt
|
|
|
|
|
|
|
|
|
|
%install
|
2020-11-03 13:05:10 +01:00
|
|
|
|
mkdir mxs
|
|
|
|
|
mv */Mx*-2[xy]*.ttf mxs/
|
|
|
|
|
|
|
|
|
|
c="%buildroot/%_sharedir/fontconfig/conf.avail"
|
|
|
|
|
tt="%buildroot/%_ttfontsdir"
|
|
|
|
|
mkdir -p "$c" "$tt"
|
|
|
|
|
|
|
|
|
|
genalias()
|
|
|
|
|
{
|
|
|
|
|
echo "<?xml version='1.0'?>"
|
|
|
|
|
echo '<!DOCTYPE'" fontconfig SYSTEM 'fonts.dtd'>"
|
|
|
|
|
echo "<fontconfig>"
|
|
|
|
|
for i in "$@"; do
|
|
|
|
|
mx="$(otfinfo -i "$i" | perl -lne 'if(/^Family:\s*(.*)/){$_=$1;s{&}{&}g;print}')"
|
|
|
|
|
px="Px${mx:2}"
|
|
|
|
|
echo "<alias><family>$px</family><prefer><family>$mx</family></prefer></alias>"
|
|
|
|
|
done
|
|
|
|
|
echo "</fontconfig>"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
genalias mxs/Mx*.ttf >31-int10h-stretch-alias.conf
|
|
|
|
|
mv mxs/*.ttf "$tt/"
|
|
|
|
|
genalias */Mx*.ttf >31-int10h-alias.conf
|
|
|
|
|
mv */Ac*.ttf */Mx*.ttf "$tt/"
|
|
|
|
|
%install_fontsconf 31-int10h-alias.conf
|
|
|
|
|
%install_fontsconf 31-int10h-stretch-alias.conf
|
2016-11-05 16:58:31 +01:00
|
|
|
|
|
|
|
|
|
%reconfigure_fonts_scriptlets
|
2020-11-03 13:05:10 +01:00
|
|
|
|
%reconfigure_fonts_scriptlets -n %name-stretched
|
2016-11-05 16:58:31 +01:00
|
|
|
|
|
|
|
|
|
%files
|
2020-11-03 13:05:10 +01:00
|
|
|
|
%license license.txt
|
|
|
|
|
%doc readme.txt ratio.txt
|
|
|
|
|
%_ttfontsdir/Mx*
|
2020-10-29 13:57:02 +01:00
|
|
|
|
%exclude %_ttfontsdir/*-2x.ttf
|
|
|
|
|
%exclude %_ttfontsdir/*-2y.ttf
|
2020-11-03 13:05:10 +01:00
|
|
|
|
%dir %_sysconfdir/fonts
|
|
|
|
|
%dir %_sysconfdir/fonts/conf.d
|
|
|
|
|
%files_fontsconf_availdir
|
|
|
|
|
%files_fontsconf_file -l 31-int10h-alias.conf
|
2020-10-29 13:55:52 +01:00
|
|
|
|
|
|
|
|
|
%files stretched
|
|
|
|
|
%dir %_ttfontsdir/
|
|
|
|
|
%_ttfontsdir/Ac*
|
2020-11-03 13:05:10 +01:00
|
|
|
|
%_ttfontsdir/Mx*-2x.ttf
|
|
|
|
|
%_ttfontsdir/Mx*-2y.ttf
|
|
|
|
|
%dir %_sysconfdir/fonts
|
|
|
|
|
%dir %_sysconfdir/fonts/conf.d
|
|
|
|
|
%files_fontsconf_availdir
|
|
|
|
|
%files_fontsconf_file -l 31-int10h-stretch-alias.conf
|
2016-11-05 16:58:31 +01:00
|
|
|
|
|
|
|
|
|
%changelog
|