#!/bin/sh CWD=`pwd` TMP=/tmp PKG=$TMP/package-kdebase # Set the config option variables if they are not already set: if [ -r ../KDE.options ]; then . ../KDE.options fi # The global options may be overridden here (if needed): if [ -r ./local.options ]; then . ./local.options fi rm -rf $PKG mkdir -p $PKG/usr # Avoid a version number in .la files: if [ -d /usr/lib/qt ]; then QTDIR=/usr/lib/qt fi cd $TMP echo "Building kdebase-$VERSION.tar.bz2..." tar xjvf $CWD/kdebase-$VERSION.tar.bz2 || exit 1 cd kdebase-$VERSION || exit 1 chown -R root:root . # apply patch for kdm echoc "Applying patch to make kdm cool ..." yellow cat $CWD/kdm-make_it_cool.diff | patch -p0 --backup || exit 1 # apply patches from KDE on Steroids project echo "applying main patchset..." patch -Np1 -i $CWD/01-kip_rubberband.patch || exit 1 patch -Np1 -i $CWD/02-kip_kdesktop_rounded_icon_text_corners.patch || exit 1 patch -Np1 -i $CWD/03-konqueror_add_merged_stop_and_reload_button.patch || exit 1 patch -Np1 -i $CWD/04-safely_remove_umount_progress_dialog.patch || exit 1 patch -Np1 -i $CWD/05-transparent_lock_logout_applet.patch || exit 1 patch -Np1 -i $CWD/06-systray_order.patch || exit 1 patch -Np1 -i $CWD/07-konqueror_textcompletion_editor.patch || exit 1 patch -Np1 -i $CWD/08-hide_unneeded_menu_entries.patch || exit 1 patch -Np1 -i $CWD/09-better_screen_icon_in_desktop_prefs.patch || exit 1 patch -Np1 -i $CWD/10-disable_kpersonalizer.patch || exit 1 patch -Np1 -i $CWD/11-kdialog_tango.patch || exit 1 patch -Np1 -i $CWD/12-kinfo_better_memory_info.patch || exit 1 patch -Np1 -i $CWD/13-ksmserver_dont_save_compiz_session_ugly.patch || exit 1 patch -Np1 -i $CWD/14-ksysguard_wifi_support.patch || exit 1 patch -Np1 -i $CWD/15-various_less_verbal_kdesu.patch || exit 1 patch -Np1 -i $CWD/16-xinerama.patch || exit 1 #patch -Np1 -i $CWD/17-kdesktop_transparency_support.patch || exit 1 patch -Np1 -i $CWD/18-execute_feedback.patch || exit 1 patch -Np1 -i $CWD/19-kwin_shadow.patch || exit 1 patch -Np1 -i $CWD/20-ksmserver_theme_support.patch || exit 1 patch -Np0 -i $CWD/21-ksmserver_fade.patch || exit 1 patch -Np1 -i $CWD/22-add_change_session_icon.patch || exit 1 #patch -Np1 -i $CWD/23-kdesktop_context_menu_konsole_entry.patch || exit 1 #patch -Np1 -i $CWD/24-startkde_source_profile_directly.patch || exit 1 patch -Np1 -i $CWD/25-remove_white_border_around_images_in_kwebdesktop.patch || exit 1 patch -Np1 -i $CWD/26-bigger_title_icons_in_kcontrol.patch || exit 1 patch -Np1 -i $CWD/27-konsole_url_handling.patch || exit 1 echo "applying bugfixes..." patch -Np1 -i $CWD/fix-kdm_grub.patch || exit 1 patch -Np1 -i $CWD/fix-async_history.patch || exit 1 # # regenerate makefiles (needed for kdesktop transparency patch) # #echo "regenerating makefiles..." #make -f admin/Makefile.common CFLAGS=$CPUOPT \ CXXFLAGS=$CPUOPT \ ./configure \ --prefix=/usr \ --sysconfdir=/etc/kde \ --with-shadow \ --with-xinerama \ --disable-debug \ --program-prefix="" \ --program-suffix="" \ --build=$TARGET-slackware-linux || exit 1 make $NUMJOBS || exit 1 make install DESTDIR=$PKG # Move the KDM files someplace FHS compliant: mkdir -p $PKG/etc/kde mv $PKG/usr/share/config/kdm $PKG/etc/kde ( cd $PKG/usr/share/config ; ln -sf ../../../etc/kde/kdm . ) ### !!! KLUDGE ALERT !!! ### ### CAUSES ARTS TO NOT USE REALTIME PRIORITY BY DEFAULT, WORKING AROUND A LOGOUT HANG ### ### THIS SHOULD BE RECONSIDERED WITH EACH KDEBASE RELEASE! ### cat $CWD/kludge/kcmartsrc > $PKG/usr/share/config/kcmartsrc ### !!! KLUDGE ALERT !!! ### mkdir -p $PKG/usr/doc/kdebase-$VERSION cp -a \ AUTHORS COPYING INSTALL README kdebase.lsm \ $PKG/usr/doc/kdebase-$VERSION mkdir -p $PKG/etc/X11/xinit cat $CWD/xinit/xinitrc.kde > $PKG/etc/X11/xinit/xinitrc.kde chmod 755 $PKG/etc/X11/xinit/xinitrc.kde # Change the konsole defaults to look like the real Linux console: cat $CWD/config/konsolerc > $PKG/usr/share/config/konsolerc chmod 644 $PKG/usr/share/config/konsolerc # Make konsole a login shell by default: cat $CWD/config/konsole.desktop > $PKG/usr/share/applications/kde/konsole.desktop chmod 644 $PKG/usr/share/applications/kde/konsole.desktop # set sane defaults for antialiasing: if [ ! -e $PKG/usr/share/config/kdeglobals ]; then cat $CWD/config/kdeglobals > $PKG/usr/share/config/kdeglobals chmod 644 $PKG/usr/share/config/kdeglobals else # This might be fixed or unsafe. Better check it out... echo echo "BAILOUT: kdeglobals already exists. Check to see if anti-aliased" echo " fonts work out-of-the-box now..." echo exit 1 fi # Setup config files for KDM: $PKG/usr/bin/genkdmconf --no-old --no-old-scripts --no-backup --in $PKG/usr/share/config/kdm # Not allowing root to login at the console is just plain silly. If they have physical access to # the machine, what's the point of trying to stop this? Even the kdmrc file says this is supposed # to be the default. cat $PKG/usr/share/config/kdm/kdmrc | perl -pi -e 's|AllowRootLogin=false|AllowRootLogin=true|' > $PKG/usr/share/config/kdm/kdmrc.new rm -f $PKG/usr/share/config/kdm/kdmrc cp -a $PKG/usr/share/config/kdm/Xsession $PKG/usr/share/config/kdm/Xsession.orig cat $CWD/config/Xsession > $PKG/usr/share/config/kdm/Xsession mv $PKG/usr/share/config/kdm/backgroundrc $PKG/usr/share/config/kdm/backgroundrc.new mkdir -p $PKG/install zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh cat $CWD/slack-desc > $PKG/install/slack-desc # # append build information to the end of the slack-desc file # cat >> $PKG/install/slack-desc << EOF #---------------------------------------- BUILDDATE: `date` PACKAGER: $VL_PACKAGER HOST: `uname -srm` DISTRO: `cat /etc/vector-version` CFLAGS: $CFLAGS CONFIGURE: `awk "/\.\/configure\ /" $TMP/kdebase-$VERSION/config.log` EOF ( cd $PKG find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null ) if [ -d $PKG/usr/man ]; then gzip -9 $PKG/usr/man/man?/* fi cd $PKG echo "Generating slapt-get dependencies..." requiredbuilder -v -y $PKG echo "Making package..." makepkg -l y -c n ../kdebase-$VERSION-$ARCH-$BUILD.tlz