%define _libdir64 %{_prefix}/lib64 Name: librsvg2 License: GPL Group: System/Libraries Autoreqprov: on Version: 2.32.1 Release: 1 Summary: A Library for Rendering SVG Data Source0: http://ftp.gnome.org/pub/GNOME/sources/%{name}/2.32/librsvg-%{version}.tar.bz2 Source1: http://ftp.gnome.org/pub/GNOME/sources/%{name}/2.32/librsvg-%{version}.sha256sum URL: http://librsvg.sourceforge.net/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: glib2-devel >= 2.22.5 BuildRequires: gtk2-devel >= 2.18.5 BuildRequires: libart_lgpl-devel >= 2.3.20 BuildRequires: libcroco-devel >= 0.6.2 BuildRequires: libxml2-devel >= 2.6.32-2 BuildRequires: make Requires: glib2 >= 2.22.5 Requires: gtk2 >= 2.18.5 Requires: libart_lgpl >= 2.3.20 Requires: libcroco >= 0.6.2 Requires: libxml2 >= 2.6.32-2 %description This package contains a library to render SVG (scalable vector graphics) data. This format has been specified by the W3C, see http://www.w3c.org. The library is available as 32-bit and 64-bit. %package devel Summary: Include Files and Libraries mandatory for Development. Group: Development/Libraries/C and C++ Requires: %{name} = %{version} Requires: glib2-devel >= 2.22.5 Requires: gtk2-devel >= 2.18.5 Requires: libart_lgpl-devel >= 2.3.20 Requires: libcroco-devel >= 0.6.2 Requires: libxml2-devel >= 2.6.32-2 %description devel This package contains all necessary include files and libraries needed to develop applications that require these. 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 "xlc -q64" or "gcc -maix64". %prep %setup -q -n librsvg-%{version} mkdir ../32bit mv * ../32bit mv ../32bit . mkdir 64bit cd 32bit && tar cf - . | (cd ../64bit ; tar xpf -) %build export CC="gxlc" 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} \ --localstatedir=/var/lib \ --with-svgz \ --with-croco \ --with-html-dir=%{_docdir}/%{name} 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} \ --localstatedir=/var/lib \ --with-svgz \ --with-croco \ --with-html-dir=%{_docdir}/%{name} gmake %{?_smp_mflags} %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} cd 64bit export OBJECT_MODE=64 gmake install DESTDIR=${RPM_BUILD_ROOT} for f in ${RPM_BUILD_ROOT}%{_bindir}/* ; do mv ${f} ${f}_64 done cd ../32bit export OBJECT_MODE=32 gmake install DESTDIR=${RPM_BUILD_ROOT} /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}/librsvg-2.a ${RPM_BUILD_ROOT}%{_libdir64}/librsvg-2.so* mkdir -p ${RPM_BUILD_ROOT}%{_docdir} cp AUTHORS COPYING ChangeLog NEWS README ${RPM_BUILD_ROOT}%{_docdir}/%{name} ( cd ${RPM_BUILD_ROOT}%{_libdir}/gtk-2.0/2.10.0 for d in engines loaders ; do cd ${d} for f in *.a ; do /usr/bin/ar -X32 -x ${f} rm -f ${f} *.la done cd .. done cd ${RPM_BUILD_ROOT}%{_libdir64}/gtk-2.0/2.10.0 for d in engines loaders ; do cd ${d} for f in *.a ; do /usr/bin/ar -X64 -x ${f} rm -f ${f} *.la done cd .. done ) ( 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} %files %defattr(-,root,system) %doc %dir %{_docdir}/%{name} %doc %{_docdir}/%{name}/AUTHORS %doc %{_docdir}/%{name}/COPYING %doc %{_docdir}/%{name}/ChangeLog %doc %{_docdir}/%{name}/NEWS %doc %{_docdir}/%{name}/README %{_bindir}/* %{_libdir}/*.a %{_libdir}/*.so* %{_libdir64}/*.so* %{_libdir}/gtk-2.0/2.10.0/engines/* %{_libdir64}/gtk-2.0/2.10.0/engines/* %{_libdir}/gtk-2.0/2.10.0/loaders/* %{_libdir64}/gtk-2.0/2.10.0/loaders/* %{_datadir}/pixmaps/* %{_mandir}/man1/* /usr/bin/* /usr/lib/*.a /usr/lib/*.so* /usr/lib64/*.so* %files devel %defattr(-,root,system) %doc %{_docdir}/%{name}/rsvg-2.0/style.css %doc %{_docdir}/%{name}/rsvg-2.0/*.html %doc %{_docdir}/%{name}/rsvg-2.0/*.png %doc %{_docdir}/%{name}/rsvg-2.0/*.sgml %doc %{_docdir}/%{name}/rsvg-2.0/*.devhelp* %{_includedir}/* %{_libdir}/*.la %{_libdir64}/*.la %{_libdir}/pkgconfig/*.pc %{_libdir64}/pkgconfig/*.pc /usr/include/* /usr/lib/*.la /usr/lib64/*.la %changelog * Wed Apr 27 2011 Michael Perzl - 2.32.1-1 - updated to version 2.32.1 * Mon Nov 16 2009 Michael Perzl - 2.26.0-1 - first version for AIX V5.1 and higher