%define ffversion 20120731 %define dl_ffversion %{ffversion}-b %define docversion 20120731-b %define Summary Font Editor for PostScript, TrueType, OpenType and various fonts Name: fontforge Version: 1.0 Release: %mkrel 0.%{ffversion}.7 Summary: %{Summary} License: BSD-like Group: Publishing Source0: http://garr.dl.sourceforge.net/project/fontforge/fontforge-source/fontforge_full-%{dl_ffversion}.tar.bz2 Source2: http://garr.dl.sourceforge.net/project/fontforge/fontforge-docs/fontforge_htdocs-%{docversion}.tar.bz2 Source3: http://fontforge.sourceforge.net/cidmaps.tgz Source4: http://fontforge.sourceforge.net/fontforge-tutorial.pdf Source11: %{name}-16x16.png Source12: %{name}-32x32.png Source13: %{name}-48x48.png Patch0: fontforge-%{version}-uni-nodevel.patch Patch1: fontforge-1.0-20100501-mga-local-helpdir.patch # Patches from Debian Patch10: 008_libgif.diff Patch11: 024_def_background.diff # Patches from OpenSuse: Patch21: libpng16-dynamic.diff URL: http://fontforge.sourceforge.net/ BuildRequires: freetype2-devel BuildRequires: jpeg-devel BuildRequires: png-devel BuildRequires: tiff-devel BuildRequires: libungif-devel BuildRequires: libxml2-devel BuildRequires: libx11-devel # (Abel) it wants either autotrace or potrace Requires: fonttracer # (Abel) libuninameslist.so.0 is a runtime dependency via dlopen() Requires: %{mklibname uninameslist 0} BuildRequires: libuninameslist-devel BuildRequires: chrpath # (tv) libpng is a runtime dependency via dlopen() Requires: %{mklibname png 16 16} %description FontForge is an outline font editor that lets you create your own postscript, truetype, opentype, cid-keyed, multi-master, cff, svg and bitmap (bdf) fonts, or edit existing ones. Also lets you convert one format to another. FontForge has support for many macintosh font formats. %prep %setup -q -n fontforge-%{dl_ffversion} %patch0 -p1 -b .uninames %patch1 -p1 -b .helpdir %patch10 -p1 -b .libgif %patch11 -p1 -b .background %patch21 -p0 -b .libpng2 install -m 644 %{SOURCE4} . mkdir -p htdocs cidmap tar xjf %{SOURCE2} -C htdocs tar xf %{SOURCE3} -C cidmap %build # For the motivation behind --without-freetype-src, see: # http://sourceforge.net/mailarchive/forum.php?thread_name=m3pqthbe44.fsf%%40jhcloos.com&forum_name=fontforge-devel # (Replace the double-percent with a single percent.). %configure2_5x --disable-shared --without-freetype-src %make %install rm -rf %{buildroot} %makeinstall rm -rf %{buildroot}%{_libdir} # XDG compliance mkdir -p %{buildroot}%{_datadir}/applications cat > %{buildroot}%{_datadir}/applications/%{name}.desktop << EOF [Desktop Entry] Name=FontForge Comment=%{Summary} Exec=%{name} Icon=%{name} Terminal=false Type=Application StartupNotify=true Categories=Graphics;Scanning;OCR;Office;Viewer; EOF # icons install -m644 %{SOURCE11} -D %{buildroot}%{_iconsdir}/hicolor/16x16/apps/%{name}.png install -m644 %{SOURCE12} -D %{buildroot}%{_iconsdir}/hicolor/32x32/apps/%{name}.png install -m644 %{SOURCE13} -D %{buildroot}%{_iconsdir}/hicolor/48x48/apps/%{name}.png # added with htdocs in %doc section rm -rf %{buildroot}%{_datadir}/doc/fontforge rm -rf %{buildroot}%{_includedir} chrpath -d %{buildroot}%{_bindir}/%{name} %find_lang FontForge %files -f FontForge.lang %defattr(-,root,root) %doc LICENSE htdocs README-unix README-Unix.html fontforge-tutorial.pdf %{_bindir}/* %{_mandir}/man1/* %{_iconsdir}/hicolor/16x16/apps/%{name}.png %{_iconsdir}/hicolor/32x32/apps/%{name}.png %{_iconsdir}/hicolor/48x48/apps/%{name}.png %{_datadir}/applications/%{name}.desktop %{_datadir}/fontforge