1 |
Name: unifont |
2 |
Version: 16.0.01 |
3 |
Release: %mkrel 1 |
4 |
Summary: Tools and glyph descriptions in a very simple text format |
5 |
License: GPLv2+ and GFDL |
6 |
Group: System/Fonts/True type |
7 |
Url: https://savannah.gnu.org/projects/unifont |
8 |
Source0: https://ftp.gnu.org/gnu/%{name}/%{name}-%{version}/%{name}-%{version}.tar.gz |
9 |
Source1: unifont.metainfo.xml |
10 |
Patch1: unifont-fix-build.patch |
11 |
|
12 |
BuildRequires: pkgconfig(fontutil) |
13 |
BuildRequires: pkgconfig(libbsd) |
14 |
BuildRequires: bdftopcf |
15 |
BuildRequires: fontforge |
16 |
BuildRequires: fontpackages-devel |
17 |
BuildRequires: texinfo |
18 |
BuildRequires: fontconfig |
19 |
BuildRequires: freetype-tools |
20 |
|
21 |
%description |
22 |
Unifont is a Unicode font with a glyph for every visible Unicode Basic |
23 |
Multilingual Plane code point and more, with supporting utilities to |
24 |
modify the font. This package contains tools and glyph descriptions. |
25 |
|
26 |
%package viewer |
27 |
BuildArch: noarch |
28 |
Summary: Graphical viewer for unifont |
29 |
|
30 |
%description viewer |
31 |
A graphical viewer for unifont. |
32 |
|
33 |
%package -n fonts-ttf-%{name} |
34 |
Summary: TrueType GNU Unifont glyphs |
35 |
Group: System/Fonts/True type |
36 |
BuildArch: noarch |
37 |
|
38 |
%description -n fonts-ttf-%{name} |
39 |
GNU Unifont provides glyphs for every printable code point in the |
40 |
Unicode 5.1 Basic Multilingual Plane (BMP). The BMP occupies the |
41 |
first 65,536 code points of the Unicode space, denoted as |
42 |
U+0000..U+FFFF. |
43 |
|
44 |
%package -n fonts-otf-%{name} |
45 |
Summary: OpenType GNU Unifont glyphs |
46 |
Group: System/Fonts/True type |
47 |
BuildArch: noarch |
48 |
|
49 |
%description -n fonts-otf-%{name} |
50 |
GNU Unifont provides glyphs for every printable code point in the |
51 |
Unicode 5.1 Basic Multilingual Plane (BMP). The BMP occupies the |
52 |
first 65,536 code points of the Unicode space, denoted as |
53 |
U+0000..U+FFFF. |
54 |
|
55 |
%prep |
56 |
%autosetup -p1 |
57 |
# Disable rebuilding during installation |
58 |
sed -i 's/^install: .*/install:/' Makefile |
59 |
sed -i 's/install -s/install/' src/Makefile |
60 |
|
61 |
%build |
62 |
# Makefile is broken with parallel builds |
63 |
make CFLAGS='%{build_cflags}' LDFLAGS='%{build_ldflags}' |
64 |
make CFLAGS='%{build_cflags}' LDFLAGS='%{build_ldflags}' -C font truetype opentype |
65 |
%make_build -C doc unifont.info |
66 |
|
67 |
%install |
68 |
%make_install USRDIR=%{_prefix} COMPRESS=0 TTFDEST='$(DESTDIR)%{_datadir}/fonts/TTF/%{name}' OTFDEST='$(DESTDIR)%{_datadir}/fonts/OTF/%{name}' |
69 |
|
70 |
find %{buildroot}%{_datadir}/unifont/ -type f \! -name %{name}.hex -delete |
71 |
rm -rv %{buildroot}%{_datadir}/fonts/X11 |
72 |
rm -v %{buildroot}%{_datadir}/fonts/OTF/%{name}/*sample* |
73 |
rm -v %{buildroot}%{_datadir}/fonts/OTF/%{name}/unifont_*csur*.otf |
74 |
install -p -m644 doc/unifont.info -D %{buildroot}%{_infodir}/unifont.info |
75 |
install -Dm0644 %{SOURCE1} %{buildroot}%{_metainfodir}/unifont.metainfo.xml |
76 |
# Remove APL font for now |
77 |
#rm %%{buildroot}%%{_datadir}/consolefonts/Unifont-APL8x16.psf.gz |
78 |
|
79 |
|
80 |
ttmkfdir %{buildroot}%{_datadir}/fonts/TTF/%{name} > %{buildroot}%{_datadir}/fonts/TTF/%{name}/fonts.dir |
81 |
ln -s fonts.dir %{buildroot}%{_datadir}/fonts/TTF/%{name}/fonts.scale |
82 |
|
83 |
mkdir -p %{buildroot}%{_sysconfdir}/X11/fontpath.d/ |
84 |
ln -s ../../..%{_datadir}/fonts/TTF/%{name} \ |
85 |
%{buildroot}%{_sysconfdir}/X11/fontpath.d/ttf-%{name}:pri=50 |
86 |
|
87 |
ln -s ../../..%{_datadir}/fonts/OTF/%{name} \ |
88 |
%{buildroot}%{_sysconfdir}/X11/fontpath.d/otf-%{name}:pri=50 |
89 |
|
90 |
%files |
91 |
%doc NEWS README |
92 |
%license COPYING |
93 |
%{_bindir}/* |
94 |
%{_datadir}/%{name}/ |
95 |
%{_mandir}/man1/* |
96 |
%{_mandir}/man5/* |
97 |
%{_infodir}/%{name}.info* |
98 |
%exclude %{_bindir}/unifont-viewer |
99 |
%{_metainfodir}/%{name}.metainfo.xml |
100 |
|
101 |
%files viewer |
102 |
%{_bindir}/unifont-viewer |
103 |
|
104 |
%files -n fonts-ttf-%{name} |
105 |
%dir %{_datadir}/fonts/TTF/%{name} |
106 |
%{_datadir}/fonts/TTF/%{name}/*.ttf |
107 |
%verify(not mtime) %{_datadir}/fonts/TTF/%{name}/fonts.dir |
108 |
%{_datadir}/fonts/TTF/%{name}/fonts.scale |
109 |
%{_sysconfdir}/X11/fontpath.d/ttf-%{name}:pri=50 |
110 |
|
111 |
%files -n fonts-otf-%{name} |
112 |
%dir %{_datadir}/fonts/OTF/%{name} |
113 |
%{_datadir}/fonts/OTF/%{name}/*.otf |
114 |
%{_sysconfdir}/X11/fontpath.d/otf-%{name}:pri=50 |