%define _libdir64 %{_prefix}/lib64 %define atk_version 1.26.0 %define glib2_version 2.22.5 %define gtk2_version 2.18.5 %define pango_version 1.24.5 %define startup_notification_version 0.10 Summary: Window Navigator Construction Kit Name: libwnck Version: 2.28.0 Release: 2 URL: http://download.gnome.org/sources/libwnck/ Source0: http://download.gnome.org/sources/libwnck/2.28/%{name}-%{version}.tar.bz2 Source1: http://download.gnome.org/sources/libwnck/2.28/%{name}-%{version}.sha256sum Patch0: %{name}-%{version}-aix.patch License: LGPLv2+ Group: System Environment/Libraries BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root BuildRequires: gettext BuildRequires: atk-devel >= %{atk_version} BuildRequires: glib2-devel >= %{glib2_version} BuildRequires: gtk2-devel >= %{gtk2_version} BuildRequires: pango-devel >= %{pango_version} BuildRequires: startup-notification-devel >= %{startup_notification_version} BuildRequires: intltool >= 0.41.1 Requires: gettext Requires: atk >= %{atk_version} Requires: glib2 >= %{glib2_version} Requires: gtk2 >= %{gtk2_version} Requires: pango >= %{pango_version} Requires: startup-notification >= %{startup_notification_version} %description libwnck (pronounced "libwink") is used to implement pagers, tasklists, and other such things. It allows applications to monitor information about open windows, workspaces, their names/icons, and so forth. The library is available as 32-bit and 64-bit. %package devel Summary: Libraries and headers for libwnck Group: Development/Libraries Requires: %{name} = %{version}-%{release} Requires: atk-devel >= %{atk_version} Requires: glib2-devel >= %{glib2_version} Requires: pango-devel >= %{pango_version} Requires: gtk2-devel >= %{gtk2_version} Requires: startup-notification-devel >= %{startup_notification_version} Requires: pkg-config %description devel libwnck (pronounced "libwink") is used to implement pagers, tasklists, and other such things. It allows applications to monitor information about open windows, workspaces, their names/icons, and so forth. You should install the libwnck-devel package if you would like to compile applications that use libwnck. You don't need libwnck-devel just to use precompiled applications. 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 %patch0 mkdir ../32bit mv * ../32bit mv ../32bit . mkdir 64bit cd 32bit && tar cf - . | (cd ../64bit ; tar xpf -) %build export CC="gxlc" export PERL="/opt/freeware/bin/perl" export INTLTOOL_PERL="/opt/freeware/bin/perl" 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} 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} gmake %{?_smp_mflags} %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} cd 64bit export OBJECT_MODE=64 gmake DESTDIR=${RPM_BUILD_ROOT} install for f in ${RPM_BUILD_ROOT}%{_bindir}/* ; do mv ${f} ${f}_64 done cd ../32bit export OBJECT_MODE=32 gmake DESTDIR=${RPM_BUILD_ROOT} install /usr/bin/strip -X32_64 ${RPM_BUILD_ROOT}%{_bindir}/* || : ( 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}/libwnck-1.a ${RPM_BUILD_ROOT}%{_libdir64}/libwnck-1.so.22 ( 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 32bit/AUTHORS 32bit/COPYING 32bit/README 32bit/NEWS %{_bindir}/wnck-urgency-monitor* %{_libdir}/*.a %{_libdir}/*.so* %{_libdir64}/*.so* %{_datadir}/locale/*/*/* /usr/bin/wnck-urgency-monitor* /usr/lib/*.a /usr/lib/*.so* /usr/lib64/*.so* %files devel %defattr(-,root,system) %doc %{_datadir}/gtk-doc/html/libwnck %{_bindir}/wnckprop* %{_includedir}/* %{_libdir}/*.la %{_libdir64}/*.la %{_libdir}/pkgconfig/* %{_libdir64}/pkgconfig/* /usr/bin/wnckprop* /usr/include/* /usr/lib/*.la /usr/lib64/*.la %changelog * Thu Dec 16 2010 Michael Perzl - 2.28.0-2 - removed dependency on gettext >= 0.17 * Wed Nov 10 2010 Michael Perzl - 2.28.0-1 - first version for AIX V5.1 and higher