%define freetype_version 2.3.5 Summary: Font configuration and customization library Name: fontconfig Version: 2.8.0 Release: 2 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} %define _libdir64 %{_prefix}/lib64 %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 mkdir ../32bit mv * ../32bit mv ../32bit . mkdir 64bit cd 32bit && tar cf - . | (cd ../64bit ; tar xpf -) %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 export CC="cc" cd 64bit # first build the 64-bit version export OBJECT_MODE=64 export LDFLAGS="-L/opt/freeware/lib64 -L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib64:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" ./configure \ --prefix=%{_prefix} \ --libdir=%{_libdir64} \ --mandir=%{_mandir} \ --enable-shared --disable-static \ --with-add-fonts=/usr/lib/X11/fonts/TrueType,/usr/lib/X11/fonts/Type1 gmake %{?_smp_mflags} cd ../32bit # now build the 32-bit version export OBJECT_MODE=32 export LDFLAGS="-L/opt/freeware/lib -Wl,-blibpath:/opt/freeware/lib:/usr/lib:/lib -Wl,-bmaxdata:0x80000000" ./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} %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} cd 64bit export OBJECT_MODE=64 make DESTDIR=${RPM_BUILD_ROOT} install ( cd ${RPM_BUILD_ROOT}%{_bindir} for f in * ; do mv -f ${f} ${f}_64 done ) cd ../32bit export OBJECT_MODE=32 make DESTDIR=${RPM_BUILD_ROOT} install /usr/bin/strip -X32_64 ${RPM_BUILD_ROOT}%{_bindir}/* || : ( cd ${RPM_BUILD_ROOT}%{_libdir64} for f in *.a ; do /usr/bin/ar -X64 -x ${f} done cd ${RPM_BUILD_ROOT}%{_libdir} for f in *.a ; do /usr/bin/ar -X32 -x ${f} done ) # add the 64-bit shared objects to the shared libraries containing already the # 32-bit shared objects /usr/bin/ar -X64 -q ${RPM_BUILD_ROOT}%{_libdir}/lib%{name}.a ${RPM_BUILD_ROOT}%{_libdir64}/lib%{name}.so* ( cd ${RPM_BUILD_ROOT} for dir in bin include lib lib64 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 32bit/README 32bit/AUTHORS 32bit/COPYING %doc 32bit/doc/fontconfig-user.txt 32bit/doc/fontconfig-user.html %doc 32bit/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 %{_libdir}/*.so* %{_libdir64}/*.so* %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 /usr/lib/*.so* /usr/lib64/*.so* %files devel %defattr(-,root,system) %doc 32bit/doc/fontconfig-devel.txt 32bit/doc/fontconfig-devel %doc 32bit/doc/fontconfig-devel.pdf %{_libdir}/*.la %{_libdir64}/*.la %{_libdir}/pkgconfig/* %{_libdir64}/pkgconfig/* %{_includedir}/* %{_mandir}/man3/* /usr/lib/*.la /usr/lib64/*.la /usr/include/* %changelog * Mon Jul 04 2011 Michael Perzl - 2.8.0-2 - added missing 64-bit pkg-config file and RTL-style shared libraries * 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