# Use --define 'nossl 1' on the command line to disable SSL detection %{!?nossl:%define SSL 1} %define ssldir %{_prefix} Summary: K Desktop Environment - Libraries Name: kdelibs Prefix: %{_prefix}/kde Version: 2.2.1 Source: ftp://ftp.kde.org/pub/kde/stable/%{version}/distribution/tar/generic/source/%{name}-%{version}.tar.bz2 Patch0: %{name}-%{version}-aix.patch Patch1: %{name}-%{version}-ltdl.patch Release: 3%{!?nossl:ssl} Group: System Environment/Libraries License: LGPL BuildRoot: %{_tmppath}/%{name}-buildroot Requires: qt >= 2.3.1, libxml2 >= 2.3.13, audiofile, pcre, %{!?nossl:prngd, openssl} BuildRequires: qt-devel >= 2.3.1, kdoc, libxml2-devel >= 2.3.13, audiofile-devel, pcre-devel, %{!?nossl:openssl-devel} Obsoletes: kdesupport %description Libraries for the K Desktop Environment: KDE Libraries included: kdecore (KDE core library), kdeui (user interface), khtml (HTML widget), kfile (file access), kspell (spelling checker), kssl (secure web browsing), kab (addressbook), kimgio (image manipulation), arts (sound, mixing and animation), kstyles, kparts, kjs (JavaScript), kio, kdesu and ksgmltools. %package devel Group: Development/Libraries Summary: Header files and documentation for compiling KDE applications. Requires: qt-devel >= 2.2.1, %{name} = %{version} %description devel This package includes the header files you will need to compile applications for KDE. Also included is the KDE API documentation in HTML format for easy browsing. %package sound Group: System Environment/Libraries Summary: K Desktop Environment - Libraries for sound support Requires: %{name} = %{version} %description sound Libraries for sound support in the K Desktop Environment: arts and libkmid. %package sound-devel Group: Development/Libraries Summary: Header files and documentation for compiling KDE applications with sound Requires: qt-devel >= 2.2.1, %{name}-sound = %{version}, %{name} = %{version}, %{name}-devel = %{version} %description sound-devel This package includes the header files you will need to compile applications using the KDE sound libraries, arts and libkmid. Also included is the API documentation for these libraries, in HTML format for easy browsing. %prep rm -rf $RPM_BUILD_ROOT %setup -q -n %{name}-%{version} %patch1 -p1 -b .ltdl %patch0 -p2 -b .aix # 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 %build export QTDIR=%{_prefix}/qt ulimit -d unlimited ulimit -s unlimited export FLAGS="-DNDEBUG=1 -UDEBUG_ASYNC_TRANSFER -UVPORT_DEBUG -UDEBUG_IO -UDEBUG_MESSAGES -UDEBUG_AUTH -UIOMANAGER_DEBUG_LATENCY -UARTSWRAPPER_DEBUG -DNODEBUG=1 -UNETWMDEBUG -UDEBUG_LAYOUT -UBOX_DEBUG -UDEBUG_LINEBREAKS -UTABLE_DEBUG -UCSS_STYLESHEET_DEBUG -UCSS_DEBUG -UPARSER_DEBUG -UTOKEN_DEBUG -UCACHE_DEBUG" CXXFLAGS="$FLAGS" CFLAGS="$FLAGS" ./configure \ --prefix=%{prefix} \ --with-distribution="AIX toolbox for Linux applications" \ --enable-mitshm --disable-debug --enable-final \ %{?nossl:--without-ssl} %{!?nossl:--with-ssl-dir=%{ssldir}} # 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 sed 's/ac_cv_lib_m_finite=yes/ac_cv_lib_m_finite=no/' config.cache > config.cache.new mv config.cache.new config.cache make %install export DESTDIR=$RPM_BUILD_ROOT make DESTDIR=$RPM_BUILD_ROOT install # Stripping decreases size a lot! /usr/bin/strip $RPM_BUILD_ROOT%{prefix}/bin/* || : /usr/bin/strip $RPM_BUILD_ROOT%{prefix}/lib/*.so || : mkdir -p $RPM_BUILD_ROOT/usr ln -sf ..%{prefix} $RPM_BUILD_ROOT/usr chmod a+x $RPM_BUILD_ROOT%{prefix}/lib/* # Generate documentation export PATH=%{prefix}/bin:$PATH makekdedoc=`whence makekdedoc` if [ ! -z "$makekdedoc" ]; then kdocdir=$RPM_BUILD_ROOT%{_docdir}/%{name}-devel-%{version} mkdir -p $kdocdir qt2kdoc=`whence qt2kdoc` if [ ! -z "$qt2kdoc" ]; then $qt2kdoc -o $kdocdir %{_docdir}/qt-devel-*/html fi $makekdedoc --rule-file=kdoc.rules --outputdir=$kdocdir \ --libdir=$kdocdir fi # Create file list for sound... ( cd arts; make DESTDIR=$RPM_BUILD_ROOT/sound install cd ../libkmid; make DESTDIR=$RPM_BUILD_ROOT/sound install cd $RPM_BUILD_ROOT/sound mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}-sound-devel-%{version} ( cd $kdocdir for dir in arts libkmid; do if [ -d $dir ]; then mv $kdocdir/$dir $RPM_BUILD_ROOT%{_docdir}/%{name}-sound-devel-%{version} fi done ) find . -type f -name '*.h' |sed -e 's|^\.|\%attr(-,root,root) \"|' > \ $RPM_BUILD_DIR/file.list.%{name}-sound-devel find . -name '*.so*' -o -name '*.la' |sed -e 's|^\.|\%attr(-,root,root) \"|' > \ $RPM_BUILD_DIR/file.list.%{name}-sound find . -type f |grep '/bin' |sed -e 's|^\.|\%attr(-,root,root) \"|' >> \ $RPM_BUILD_DIR/file.list.%{name}-sound cd $RPM_BUILD_ROOT rm -rf sound ) || exit 1 # build file list for the rest of kdelibs cd $RPM_BUILD_ROOT find . -type d | sed '1,3d;s|^\.|\%attr(-,root,root) \%dir \"|' > \ $RPM_BUILD_DIR/master.list find . -type f -o -type l | sed -e 's|^\.|\%attr(-,root,root) \"|' \ -e '/\/config\//s|^|%config |' | \ while read file; do \ grep -q "$file\$" $RPM_BUILD_DIR/file.list.%{name}-sound* || \ echo $file >>$RPM_BUILD_DIR/master.list done grep "/include" $RPM_BUILD_DIR/master.list > \ $RPM_BUILD_DIR/file.list.%{name}-devel grep "/doc/%{name}-devel" $RPM_BUILD_DIR/master.list >> \ $RPM_BUILD_DIR/file.list.%{name}-devel grep "/doc/%{name}-sound-devel" $RPM_BUILD_DIR/master.list >> \ $RPM_BUILD_DIR/file.list.%{name}-sound-devel grep mcopidl $RPM_BUILD_DIR/file.list.%{name}-sound >> \ $RPM_BUILD_DIR/file.list.%{name}-sound-devel grep -v mcopidl $RPM_BUILD_DIR/file.list.%{name}-sound >\ $RPM_BUILD_DIR/file.list.%{name}-sound.new mv -f $RPM_BUILD_DIR/file.list.%{name}-sound.new \ $RPM_BUILD_DIR/file.list.%{name}-sound egrep -v "/include|/doc/|/doc$|/man/man1" \ $RPM_BUILD_DIR/master.list > \ $RPM_BUILD_DIR/file.list.%{name} grep "/share/doc" $RPM_BUILD_DIR/master.list >> \ $RPM_BUILD_DIR/file.list.%{name} echo "%docdir" %{prefix}/share/doc >> \ $RPM_BUILD_DIR/file.list.%{name} echo "%docdir" %{_docdir}/%{name}-devel-%{version} >> \ $RPM_BUILD_DIR/file.list.%{name}-devel echo "%docdir" %{_docdir}/%{name}-sound-devel-%{version} >> \ $RPM_BUILD_DIR/file.list.%{name}-sound-devel %clean rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_DIR/master.list rm -rf $RPM_BUILD_DIR/file.list.%{name}* %files -f ../file.list.%{name} %files devel -f ../file.list.%{name}-devel %files sound -f ../file.list.%{name}-sound %files sound-devel -f ../file.list.%{name}-sound-devel %changelog * Thu Feb 7 2002 Reza Arbab - Uncrippled. * Tue Oct 9 2001 Reza Arbab - Crippled (no legal clearance for libxml2, pcre, audiofile). * Mon Sep 17 2001 Reza Arbab - 2.2.1 * Thu May 3 2001 Reza Arbab - Update to KDE 2.2. - Enable ssl. * Tue Mar 27 2001 Marc Stephenson - Rebuild against new shared objects * Fri Feb 9 2001 pkgmgr - Update for KDE 2.1 * Fri Dec 15 2000 pkgmgr - Modify for AIX Freeware distribution * Sat Sep 16 2000 Robert Williams - Update description - libraries - Added check for # of CPUs * Thu Jun 1 2000 Bernhard Rosenkraenzer - initial