%define _libdir64 %{_prefix}/lib64 Summary: Library for tracking application startup Name: startup-notification Version: 0.10 Release: 1 URL: http://www.freedesktop.org/software/startup-notification/ Source0: http://www.freedesktop.org/software/startup-notification/releases/%{name}-%{version}.tar.gz Patch0: 0001-Support-APPLICATION_ID-key.patch Patch1: %{name}-%{version}-aix.patch License: LGPLv2 Group: System Environment/Libraries BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: make BuildRequires: libxcb-devel >= 1.7 BuildRequires: xcb-util-devel >= 0.3.6 BuildRequires: xorg-compat-aix >= 1.1 Requires: libxcb >= 1.7 Requires: xcb-util >= 0.3.6 %description This package contains libstartup-notification which implements a startup notification protocol. Using this protocol a desktop environment can track the launch of an application and provide feedback such as a busy cursor, among other features. The library is available as 32-bit and 64-bit. %package devel Summary: Development portions of startup-notification Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: pkg-config %description devel Header files and static libraries for libstartup-notification. 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_r -q64" or "gcc -maix64". %prep %setup -q export PATH=/opt/freeware/bin:$PATH %patch0 -p1 %patch1 mkdir examples cp -p test/*.c test/*.h examples mkdir ../32bit mv * ../32bit mv ../32bit . mkdir 64bit cd 32bit && tar cf - . | (cd ../64bit ; tar xpf -) %build export CC="xlc_r" 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} \ --enable-shared --disable-static 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} \ --enable-shared --disable-static gmake %{?_smp_mflags} %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} cd 64bit export OBJECT_MODE=64 gmake DESTDIR=${RPM_BUILD_ROOT} install cd ../32bit export OBJECT_MODE=32 gmake DESTDIR=${RPM_BUILD_ROOT} install ( cd ${RPM_BUILD_ROOT}%{_libdir} for f in *.a ; do /usr/bin/ar -X32 -x ${f} done cd ${RPM_BUILD_ROOT}%{_libdir64} for f in *.a ; do /usr/bin/ar -X64 -x ${f} done ) # add the 64-bit shared objects to the shared library containing already the # 32-bit shared objects export AR="ar -X32_64" ${AR} -q ${RPM_BUILD_ROOT}%{_libdir}/lib%{name}-1.a ${RPM_BUILD_ROOT}%{_libdir64}/lib%{name}-1.so.0 ( cd ${RPM_BUILD_ROOT} for dir in 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 32bit/AUTHORS 32bit/COPYING 32bit/ChangeLog 32bit/NEWS %doc 32bit/doc/startup-notification.txt %{_libdir}/*.a %{_libdir}/*.so* %{_libdir64}/*.so* /usr/lib/*.a /usr/lib/*.so* /usr/lib64/*.so* %files devel %defattr(-,root,system,-) %doc 32bit/examples %{_includedir}/* %{_libdir}/*.la %{_libdir64}/*.la %{_libdir}/pkgconfig/* /usr/include/* /usr/lib/*.la /usr/lib64/*.la %changelog * Wed Nov 10 2010 Michael Perzl - 0.10-1 - first version for AIX V5.1 and higher