# Use --define 'noxlc 1' on the command line to use gcc %{!?noxlc:%define XLC 1} %{?noxlc:%define XLC 0} Name: kdenetwork Summary: K Desktop Environment - Network Applications 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 Patch2: %{name}-%{version}-xlc.patch Group: Applications/Networking Copyright: GPL BuildRoot: %{_tmppath}/%{name}-buildroot Requires: kdelibs BuildPrereq: automake = 1.5, autoconf >= 2.5, kdelibs-devel %description Networking applications for the K Desktop Environment. %prep rm -rf $RPM_BUILD_ROOT %setup -q # Common patches. %patch0 -p0 -b .aix %patch1 -p0 -b .aix # Per-compiler patches. These will break (or are untested) on the other. %if %{XLC} == 1 %patch2 -p0 -b .xlc %endif %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} make %install [ -n "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != / ] && rm -rf $RPM_BUILD_ROOT export DESTDIR=$RPM_BUILD_ROOT # FIXME: The generated dependency file for mail.local.c is messed up # because depcomp can't handle filenames with more than one '.' # So remove "include $(DEPDIR)/mail.local.Po" from the Makefile. ( cd ktalkd/mail.local sed -e '/^include /d' Makefile > Makefile.sed mv Makefile.sed Makefile ) make DESTDIR=$RPM_BUILD_ROOT install mkdir -p $RPM_BUILD_ROOT/usr ln -sf ..%{prefix} $RPM_BUILD_ROOT/usr %if %{XLC} == 0 for i in $RPM_BUILD_ROOT/%{prefix}/bin/* $RPM_BUILD_ROOT/%{prefix}/lib/*.so; do /usr/bin/strip $i || : done %endif 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