Name: libmng Version: 1.0.10 Release: 1 URL: http://www.libmng.com/ Summary: Library for Multiple-image Network Graphics support License: BSD-like Source: http://dl.sf.net/libmng/%{name}-%{version}.tar.gz Group: System Environment/Libraries BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildRequires: lcms-devel, libjpeg-devel, zlib-devel, libtool Requires: lcms, libjpeg, zlib %description LibMNG is a library for accessing graphics in MNG (Multi-image Network Graphics) and JNG (JPEG Network Graphics) formats. MNG graphics are basically animated PNGs. JNG graphics are basically JPEG streams integrated into a PNG chunk. The library is available as 32-bit and 64-bit. %package devel Summary: Development files for the Multiple-image Network Graphics library Group: Development/Libraries Requires: %{name} = %{version} Requires: lcms-devel Requires: libjpeg-devel Requires: zlib-devel %description devel LibMNG is a library for accessing MNG and JNG format graphics. The libmng-devel package contains files needed for developing or compiling applications which use MNG graphics. 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 %build cat unmaintained/autogen.sh | tr -d \\r > autogen.sh chmod 755 autogen.sh [ ! -x ./configure ] && ./autogen.sh --help # generate, but don't run # setup environment for 32-bit and 64-bit builds export AR="ar -X32_64" export NM="nm -X32_64" # first build the 64-bit version export CC="xlc -q64" ./configure \ --prefix=%{_prefix} \ --enable-shared --disable-static \ --with-zlib --with-jpeg --with-lcms make %{?_smp_mflags} cp .libs/libmng.so.1 . make distclean # now build the 32-bit version export CC="xlc" ./configure \ --prefix=%{_prefix} \ --enable-shared --disable-static \ --with-zlib --with-jpeg --with-lcms make %{?_smp_mflags} # add the 64-bit shared objects to the shared library containing already the # 32-bit shared objects ${AR} -q .libs/libmng.a ./libmng.so.1 %install [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install ( cd $RPM_BUILD_ROOT for dir in lib include 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,-) %{_libdir}/*.a /usr/lib/*.a %files devel %defattr(-,root,system,-) %{_libdir}/*.la %{_includedir}/* %{_mandir}/man3/* %{_mandir}/man5/* /usr/lib/*.la /usr/include/* %changelog * Tue Mar 18 2008 Michael Perzl - 1.0.10-1 - first version for AIX V5.1 and higher