# Use --define 'noxlc 1' on the command line to use gcc %{!?noxlc:%define XLC 1} %{?noxlc:%define XLC 0} Name: kdeutils Summary: K Desktop Environment - Utilities Prefix: %{_prefix}/kde Version: 3.0 Release: 1 Source: ftp://ftp.kde.org/pub/kde/stable/%{version}/src/%{name}-%{version}.tar.bz2 Patch0: %{name}-%{version}-kde-common.patch Patch1: %{name}-%{version}-aix.patch Group: Applications/System BuildRoot: %{_tmppath}/%{name}-buildroot Copyright: GPL Requires: kdelibs zip unzip BuildPrereq: automake = 1.5, autoconf >= 2.5, kdelibs-devel %description Utilities for the K Desktop Environment. Includes: ark (tar/gzip archive manager); kab (address book); karm (personal time tracker); kcalc (scientific calculator); kedit (simple text editor); kfloppy (floppy formatting tool); khexedit (hex editor); kjots (note taker); klipper (clipboard tool); kljettool(HP printer configuration tool); klpq (print queue manager) knotes (post-it notes for the desktop); kpm (process manager similar to 'top', but more advanced);kwrite (improved text editor). %prep rm -rf $RPM_BUILD_ROOT %setup -q %patch0 -p0 -b .aix %patch1 -p0 -b .aix %if %{XLC} == 0 # Deoptimize. Temporary until compiler is in better shape. for file in `find . -print | xargs grep -l '\-O2'`; do cp $file $file.withO2 sed -e 's/\-O2/-O0/g' < $file.withO2 > $file done %endif %build %{!?noxlc: export CC=xlc CXX=xlC} export KDEDIR=%{prefix} export QTDIR=%{_prefix}/qt export CXXFLAGS="%{!?noxlc: -qrtti=all}" CFLAGS="%{!?noxlc: -Dinline=_Inline}" ./configure --prefix=%{prefix} --disable-debug %{?noxlc: --enable-final} # The behavior for finite is broken on AIX 4.3.3 for C++ sed 's/HAVE_FUNC_FINITE/DO_NOT_USE_FUNC_FINITE/' config.h > config.h.new mv config.h.new config.h make %install [ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT export DESTDIR=$RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install # Stripping decreases size a lot! %if %{XLC} == 0 /usr/bin/strip $RPM_BUILD_ROOT%{prefix}/bin/* || : /usr/bin/strip $RPM_BUILD_ROOT%{prefix}/lib/*.so || : %endif mkdir -p $RPM_BUILD_ROOT/usr ln -sf ..%{prefix} $RPM_BUILD_ROOT/usr chmod a+x $RPM_BUILD_ROOT%{prefix}/lib/* cd $RPM_BUILD_ROOT find .%{prefix} -type d | sed '1,2d;s,^\.,\%attr(-\,root\,root) \%dir ,' > \ $RPM_BUILD_DIR/file.list.%{name} find . -type f | sed -e 's,^\.,\%attr(-\,root\,root) ,' \ -e '/\/config\//s|^|%config |' >> \ $RPM_BUILD_DIR/file.list.%{name} find . -type l | sed 's,^\.,\%attr(-\,root\,root) ,' >> \ $RPM_BUILD_DIR/file.list.%{name} echo "%docdir %{prefix}/share/doc" >> $RPM_BUILD_DIR/file.list.%{name} %clean rm -rf $RPM_BUILD_ROOT $RPM_BUILD_DIR/file.list.%{name} %files -f ../file.list.%{name} %changelog * Tue Apr 2 2002 Reza Arbab - 3.0 - build with xlC * Mon Sep 17 2001 Reza Arbab - 2.2.1 * Mon Aug 13 2001 Reza Arbab - 2.2 * Tue Mar 13 2001 Marc Stephenson - Filter /usr from directory listings - Rebuild against new shared objects - Clean install directory * Fri Mar 2 2001 pkgmgr - 2.1 * Thu Dec 21 2000 pkgmgr - Modify for AIX Freeware distribution * Thu May 11 2000 Bernhard Rosenkraenzer - initial RPM