%define freetype_version 2.3.5 Summary: Font configuration and customization library Name: fontconfig Version: 2.8.0 Release: 1 License: MIT Group: System Environment/Libraries Source0: http://fontconfig.org/release/%{name}-%{version}.tar.gz URL: http://fontconfig.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: gawk, make BuildRequires: expat-devel >= 2.0.0 BuildRequires: freetype2-devel >= %{freetype_version} Requires: expat >= 2.0.0 Requires: freetype2 >= %{freetype_version} %description Fontconfig is designed to locate fonts within the system and select them according to requirements specified by applications. The library is available as 32-bit and 64-bit. %package devel Summary: Font configuration and customization library Group: Development/Libraries Requires: fontconfig = %{version}-%{release} Requires: expat-devel >= 2.0.0 Requires: freetype2-devel >= %{freetype_version} Requires: pkg-config %description devel The fontconfig-devel package includes the header files, and developer docs for the fontconfig package. Install fontconfig-devel if you want to develop programs which will use fontconfig. If you are compiling a 32-bit program, no special compiler options are needed. If you are compiling a 64-bit program, you have to compile and link your application with "cc -q64" or "gcc -maix64". %prep %setup -q %build export PATH=/opt/freeware/bin:$PATH # We don't want to rebuild the docs, but we want to install the included ones. export HASDOCBOOK=no # setup environment for 32-bit and 64-bit builds export AR="/usr/bin/ar -X32_64" export NM="/usr/bin/nm -X32_64" # first build the 64-bit version export CC="cc -q64" ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --enable-shared --disable-static \ --with-add-fonts=/usr/lib/X11/fonts/TrueType,/usr/lib/X11/fonts/Type1 gmake %{?_smp_mflags} cp src/.libs/libfontconfig.so.1 . gmake distclean # now build the 32-bit version export CC="cc" ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --enable-shared --disable-static \ --with-add-fonts=/usr/lib/X11/fonts/TrueType,/usr/lib/X11/fonts/Type1 gmake %{?_smp_mflags} # add the 64-bit shared objects to the shared library containing already the # 32-bit shared objects ${AR} -q src/.libs/libfontconfig.a ./libfontconfig.so.1 %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} gmake DESTDIR=${RPM_BUILD_ROOT} install /usr/bin/strip ${RPM_BUILD_ROOT}%{_bindir}/* || : ( cd ${RPM_BUILD_ROOT} for dir in bin include lib do mkdir -p usr/$dir cd usr/$dir ln -sf ../..%{_prefix}/$dir/* . cd - done ) %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %post umask 0022 mkdir -p %{_localstatedir}/cache/fontconfig # Remove stale caches rm -f %{_localstatedir}/cache/fontconfig/????????????????????????????????.cache-2 rm -f %{_localstatedir}/cache/fontconfig/stamp # Force regeneration of all fontconfig cache files # The check for existance is needed on dual-arch installs (the second # copy of fontconfig might install the binary instead of the first) # The HOME setting is to avoid problems if HOME hasn't been reset if [ -x /usr/bin/fc-cache ] && /usr/bin/fc-cache --version 2>&1 | grep -q %{version} ; then HOME=/ /usr/bin/fc-cache -f fi %files %defattr(-,root,system) %doc README AUTHORS COPYING %doc doc/fontconfig-user.txt doc/fontconfig-user.html doc/fontconfig-user.pdf %{_bindir}/* %dir %{_sysconfdir}/fonts/conf.avail %config(noreplace) %{_sysconfdir}/fonts/conf.d/*.conf %config %{_sysconfdir}/fonts/fonts.conf %{_sysconfdir}/fonts/fonts.dtd %{_libdir}/*.a %doc %{_sysconfdir}/fonts/conf.d/README %config %{_sysconfdir}/fonts/conf.avail/*.conf %dir %{_localstatedir}/cache/fontconfig %{_mandir}/man1/* %{_mandir}/man5/* /usr/bin/* /usr/lib/*.a %files devel %defattr(-,root,system) %doc doc/fontconfig-devel.txt doc/fontconfig-devel doc/fontconfig-devel.pdf %{_libdir}/*.la %{_libdir}/pkgconfig/* %{_includedir}/* %{_mandir}/man3/* /usr/lib/*.la /usr/include/* %changelog * Thu Nov 19 2009 Michael Perzl - 2.8.0-1 - updated to version 2.8.0 * Thu Nov 19 2009 Michael Perzl - 2.7.3-1 - updated to version 2.7.3 * Wed Sep 02 2009 Michael Perzl - 2.7.2-1 - updated to version 2.7.2 * Mon Jul 06 2009 Michael Perzl - 2.7.0-1 - updated to version 2.7.0 * Tue Jul 08 2008 Michael Perzl - 2.6.0-1 - updated to version 2.6.0 * Wed Apr 23 2008 Michael Perzl - 2.5.0-2 - some minor spec file fixes * Tue Apr 01 2008 Michael Perzl - 2.5.0-1 - first version for AIX V5.1 and higher