Summary: X.Org X11 libXpm runtime library Name: libXpm Version: 3.5.8 Release: 1 License: MIT/X11 Group: System Environment/Libraries URL: http://www.x.org BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root Source0: ftp://ftp.x.org/pub/individual/lib/%{name}-%{version}.tar.bz2 BuildRequires: pkg-config, gettext, bash, xorg-compat-aix Requires: xorg-compat-aix %ifos aix6.1 Requires: AIX-rpm >= 6.1.0.0 %else Requires: AIX-rpm < 6.1.0.0 %endif Provides: xpm %description X.Org X11 libXpm runtime library. The library is available as 32-bit and 64-bit. %package devel Summary: X.Org X11 libXpm development package Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: gettext >= 0.17, pkg-config Provides: xpm-devel %description devel X.Org X11 libXpm development package. 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 # 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} \ --mandir=%{_mandir} \ --enable-shared --enable-static make %{?_smp_mflags} cp src/.libs/libXpm.so.4 . make distclean # now build the 32-bit version export CC="xlc" ./configure \ --prefix=%{_prefix} \ --mandir=%{_mandir} \ --enable-shared --enable-static make %{?_smp_mflags} # add the 64-bit shared objects to the shared library containing already the # 32-bit shared objects ${AR} -q src/.libs/libXpm.a ./libXpm.so.4 # add compatibility member for older libXpm version cp src/.libs/libXpm.so.4 shr.o ${AR} -q src/.libs/libXpm.a ./shr.o # correct the xpm.pc file cat xpm.pc | \ grep -v "Requires.private: x11" | \ sed -e "s|Requires: x11|Requires:|" > tmp_xpm.pc mv -f tmp_xpm.pc xpm.pc # build sxpm cd sxpm ${CC} -c -I../include sxpm.c /opt/freeware/bin/bash ../libtool --tag=CC --mode=link xlc sxpm.o -o sxpm -L/opt/freeware/lib -lintl -L../src -lXpm -lXt -lXext %install [ "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install cp sxpm/sxpm $RPM_BUILD_ROOT%{_bindir} chmod 755 $RPM_BUILD_ROOT%{_bindir}/sxpm cp sxpm/sxpm.man $RPM_BUILD_ROOT%{_mandir}/man1/sxpm.1 chmod 644 $RPM_BUILD_ROOT%{_mandir}/man1/sxpm* /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} %files %defattr(-,root,system,-) %doc AUTHORS COPYING README.html INSTALL ChangeLog %{_libdir}/*.a %ifnos aix6.1 /usr/lib/*.a %endif %files devel %defattr(-,root,system,-) %{_bindir}/* %dir %{_includedir}/X11 %{_includedir}/X11/xpm.h %{_libdir}/*.la %{_libdir}/pkgconfig/*.pc %{_mandir}/man1/* /usr/lib/*.la %ifnos aix6.1 /usr/include/X11/xpm.h %endif %changelog * Thu Nov 26 2009 Michael Perzl - 3.5.8-1 - updated to version 3.5.8 * Fri Nov 13 2009 Michael Perzl - 3.5.7-3 - fixed a AIX V6.1 compatibility issue and built a separate AIX V6.1 version * Tue Apr 22 2008 Michael Perzl - 3.5.7-2 - fixed some minor spec file issues * Thu Jan 03 2008 Michael Perzl - 3.5.7-1 - first version for AIX V5.1 and higher