1 |
%define ffversion 20120731 |
2 |
%define dl_ffversion %{ffversion}-b |
3 |
%define docversion 20120731-b |
4 |
|
5 |
Name: fontforge |
6 |
Version: 1.0 |
7 |
Release: %mkrel 0.%{ffversion}.7 |
8 |
Summary: Font Editor for PostScript, TrueType, OpenType and various fonts |
9 |
License: BSD-like |
10 |
Group: Publishing |
11 |
Source0: http://garr.dl.sourceforge.net/project/fontforge/fontforge-source/fontforge_full-%{dl_ffversion}.tar.bz2 |
12 |
Source2: http://garr.dl.sourceforge.net/project/fontforge/fontforge-docs/fontforge_htdocs-%{docversion}.tar.bz2 |
13 |
Source3: http://fontforge.sourceforge.net/cidmaps.tgz |
14 |
Source4: http://fontforge.sourceforge.net/fontforge-tutorial.pdf |
15 |
Source11: %{name}-16x16.png |
16 |
Source12: %{name}-32x32.png |
17 |
Source13: %{name}-48x48.png |
18 |
Patch0: fontforge-%{version}-uni-nodevel.patch |
19 |
Patch1: fontforge-1.0-20100501-mga-local-helpdir.patch |
20 |
# Patches from Debian |
21 |
Patch10: 008_libgif.diff |
22 |
Patch11: 024_def_background.diff |
23 |
# Patches from OpenSuse: |
24 |
Patch21: libpng16-dynamic.diff |
25 |
URL: http://fontforge.sourceforge.net/ |
26 |
BuildRequires: freetype2-devel |
27 |
BuildRequires: jpeg-devel |
28 |
BuildRequires: png-devel |
29 |
BuildRequires: tiff-devel |
30 |
BuildRequires: libungif-devel |
31 |
BuildRequires: libxml2-devel |
32 |
BuildRequires: libx11-devel |
33 |
# (Abel) it wants either autotrace or potrace |
34 |
Requires: fonttracer |
35 |
# (Abel) libuninameslist.so.0 is a runtime dependency via dlopen() |
36 |
Requires: %{mklibname uninameslist 0} |
37 |
BuildRequires: libuninameslist-devel |
38 |
BuildRequires: chrpath |
39 |
# (tv) libpng is a runtime dependency via dlopen() |
40 |
Requires: %{mklibname png 16 16} |
41 |
|
42 |
%description |
43 |
FontForge is an outline font editor that lets you create your own |
44 |
postscript, truetype, opentype, cid-keyed, multi-master, cff, svg and |
45 |
bitmap (bdf) fonts, or edit existing ones. Also lets you convert one |
46 |
format to another. FontForge has support for many macintosh font formats. |
47 |
|
48 |
%prep |
49 |
%setup -q -n fontforge-%{dl_ffversion} |
50 |
%patch0 -p1 -b .uninames |
51 |
%patch1 -p1 -b .helpdir |
52 |
%patch10 -p1 -b .libgif |
53 |
%patch11 -p1 -b .background |
54 |
%patch21 -p0 -b .libpng2 |
55 |
install -m 644 %{SOURCE4} . |
56 |
|
57 |
mkdir -p htdocs cidmap |
58 |
tar xjf %{SOURCE2} -C htdocs |
59 |
tar xf %{SOURCE3} -C cidmap |
60 |
|
61 |
%build |
62 |
# For the motivation behind --without-freetype-src, see: |
63 |
# http://sourceforge.net/mailarchive/forum.php?thread_name=m3pqthbe44.fsf%%40jhcloos.com&forum_name=fontforge-devel |
64 |
# (Replace the double-percent with a single percent.). |
65 |
%configure2_5x --disable-shared --without-freetype-src |
66 |
%make |
67 |
|
68 |
%install |
69 |
%makeinstall |
70 |
|
71 |
rm -rf %{buildroot}%{_libdir} |
72 |
|
73 |
# XDG compliance |
74 |
mkdir -p %{buildroot}%{_datadir}/applications |
75 |
cat > %{buildroot}%{_datadir}/applications/%{name}.desktop << EOF |
76 |
[Desktop Entry] |
77 |
Name=FontForge |
78 |
Comment=%{Summary} |
79 |
Exec=%{name} |
80 |
Icon=%{name} |
81 |
Terminal=false |
82 |
Type=Application |
83 |
StartupNotify=true |
84 |
Categories=Graphics;Scanning;OCR;Office;Viewer; |
85 |
EOF |
86 |
|
87 |
# icons |
88 |
install -m644 %{SOURCE11} -D %{buildroot}%{_iconsdir}/hicolor/16x16/apps/%{name}.png |
89 |
install -m644 %{SOURCE12} -D %{buildroot}%{_iconsdir}/hicolor/32x32/apps/%{name}.png |
90 |
install -m644 %{SOURCE13} -D %{buildroot}%{_iconsdir}/hicolor/48x48/apps/%{name}.png |
91 |
|
92 |
# added with htdocs in %doc section |
93 |
rm -rf %{buildroot}%{_datadir}/doc/fontforge |
94 |
|
95 |
rm -rf %{buildroot}%{_includedir} |
96 |
|
97 |
chrpath -d %{buildroot}%{_bindir}/%{name} |
98 |
|
99 |
%find_lang FontForge |
100 |
|
101 |
%files -f FontForge.lang |
102 |
%doc LICENSE htdocs README-unix README-Unix.html fontforge-tutorial.pdf |
103 |
%{_bindir}/* |
104 |
%{_mandir}/man1/* |
105 |
%{_iconsdir}/hicolor/16x16/apps/%{name}.png |
106 |
%{_iconsdir}/hicolor/32x32/apps/%{name}.png |
107 |
%{_iconsdir}/hicolor/48x48/apps/%{name}.png |
108 |
%{_datadir}/applications/%{name}.desktop |
109 |
%{_datadir}/fontforge |