%define tarversion 1 Name: liblqr-1 Version: 0.1.0 Release: 1 Summary: LiquidRescale library Group: System Environment/Libraries License: GPLv3 URL: http://liquidrescale.wikidot.com/ Source0: http://liblqr.wikidot.com/local--files/en:download-page/%{name}-%{version}-%{tarversion}.tar.gz Patch0: liblqr-1-0.1.0-pkgconfig.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: patch %description The LiquidRescale (lqr) library provides a C/C++ API for performing non-uniform resizing of images by the seam-carving technique. The library is available as 32-bit and 64-bit. %package devel Summary: LiquidRescale library development kit Group: Development/Libraries License: GPLv3 Requires: %{name} = %{version}-%{release} Requires: pkg-config %description devel The libqr-devel package contains the header files needed to develop applications with liblqr 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 export PATH=/opt/freeware/bin:$PATH %setup -q %patch -p1 -b .pkgconfig %build # 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 make %{?_smp_mflags} cp lqr/.libs/%{name}.so.0 . make distclean # now build the 32-bit version export CC="xlc" ./configure \ --prefix=%{_prefix} \ --enable-shared --disable-static make %{?_smp_mflags} # add the 64-bit shared objects to the shared library containing already the # 32-bit shared objects ${AR} -q lqr/.libs/%{name}.a ./%{name}.so.0 %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} make DESTDIR=${RPM_BUILD_ROOT} install ( cd ${RPM_BUILD_ROOT} for dir in 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} %files %defattr(-,root,system,-) %doc README ChangeLog COPYING %{_libdir}/*.a /usr/lib/*.a %files devel %defattr (-,root,system,-) %doc docs/liblqr_manual.docbook %{_includedir}/* %{_libdir}/*.la %{_libdir}/pkgconfig/*.pc /usr/include/* /usr/lib/*.la %changelog * Wed Aug 20 2008 Michael Perzl - 0.1.0-1 - first version for AIX V5.1 and higher