#!/bin/sh # Heavily based on the Slackware 12.0 SlackBuild # Based on original slackware's slackbuild and mod by Massimo Cavalleri (submax) # # ---- info ---- # Original kickoff http://en.opensuse.org/Kickoff # patch kickoff-nobeagle.diff.gz by expert@slackarea.net # patches from kdemod project (http://kdemod.ath.cx/index.html) http://kdemod.ath.cx/svn/trunk/kdebase-kickoff/ # patch kdebase-3.5.7-kickoff-slackware-integration.patch.gz based on kdemod and gentoo by submax # patch kdebase-3.5.7-kickoff-kcm-xeffects-v3sm.patch.gz based on kdemod by submax # patch headers.patch.gz by submax (with beagle headers but not necessary) # patch open-browser-with-internet-search-v0.1sm.patch.gz by submax # icons *.mng from http://www.kde-look.org/ # ---- depedecies ---- # liblazy (and libbeagle for recompile with beagle support, and only in this case, beagle or kerry IF you want GUI of the search result) # NAME=kdebase-kickoff VERSION=3.5.7 ARCH=${ARCH:-i486} BUILD=${BUILD:-3sm} TMP=${TMP:-/tmp/tgz} PKG=$TMP/package-$NAME CWD=$(pwd) #download official kdebase if [ ! -e $CWD/kdebase-$VERSION.tar.bz2 ]; then wget -c http://download.kde.org/stable/$VERSION/src/kdebase-$VERSION.tar.bz2 fi # CHOST arch should be set to i486 for any 32-bit x86, unless # you want problems finding your compiler. case $ARCH in "i486") SLKCFLAGS="-O2 -march=i486 -mtune=i686" ; SLKLIBDIR=lib ; CHOST=i486 ;; "i686") SLKCFLAGS="-O3 -march=i686 -pipe -fomit-frame-pointer" ; SLKLIBDIR=lib ; CHOST=i486 ;; "athlon64") SLKCFLAGS="-O2 -march=athlon64 -pipe" ; SLKLIBDIR=lib ; CHOST=i486 ;; "athlonxp") SLKCFLAGS="-O3 -march=athlon-xp -pipe -fomit-frame-pointer" ; SLKLIBDIR=lib ; CHOST=i486 ;; "x86_64_slamd64") SLKCFLAGS="-O2" ; SLKLIBDIR=lib64 ; CHOST=x86_64 ;; # multilib /lib and /lib64 "x86_64") SLKCFLAGS="-O2" ; SLKLIBDIR=lib ; CHOST=x86_64 ;; # pure /lib only es. sflack "s390") SLKCFLAGS="-O2" ; SLKLIBDIR=lib ; CHOST=s390 ;; esac # Avoid a version number in .la files: if [ -d /usr/$SLKLIBDIR/qt ]; then QTDIR=/usr/$SLKLIBDIR/qt fi # clean necessary before compile after old run rm -rf $PKG mkdir -p $PKG/usr rm -rf $TMP/kdebase-$VERSION # extract source cd $TMP tar xjvf $CWD/kdebase-$VERSION.tar.bz2 cd kdebase-$VERSION # apply patches for Kickoff menu echo "[[[ Applying Kickoff patches... ]]]" zcat $CWD/headers.patch.gz | patch -p1 --verbose || exit 1 (cd kicker zcat $CWD/kdebase-3.5.7-kickoff.patch.gz | patch -p0 --verbose --backup --suffix=.orig || exit 1) zcat $CWD/kdebase-3.5.7-kickoff-slackware-integration.patch.gz | patch -p2 --verbose --backup --suffix=.orig || exit 1 (cd kcontrol/kicker/ zcat $CWD/kdebase-3.5.7-kickoff-kcm.patch.gz | patch -p0 --verbose --backup --suffix=.orig || exit 1) zcat $CWD/kdebase-3.5.7-kickoff-kcm-xeffects-v3sm.patch.gz | patch -p1 --verbose --backup --suffix=.orig || exit 1 zcat $CWD/open-browser-with-internet-search-v0.1sm.patch.gz | patch -p1 --verbose --backup --suffix=.orig-integration || exit 1 echo "[[[ Including Kickoff graphics... ]]]" tar -xvzf $CWD/kickoff-data.tar.gz echo "[[[ Disable beagle plugin ]]]" zcat $CWD/kickoff-nobeagle.diff.gz | patch -Np1 --verbose --backup --suffix=.orig || exit 1 # Make sure ownerships and permissions are sane chown -R root:root . find . -perm 666 -exec chmod 644 {} \; find . -perm 664 -exec chmod 644 {} \; find . -perm 600 -exec chmod 644 {} \; find . -perm 444 -exec chmod 644 {} \; find . -perm 400 -exec chmod 644 {} \; find . -perm 440 -exec chmod 644 {} \; find . -perm 777 -exec chmod 755 {} \; find . -perm 775 -exec chmod 755 {} \; find . -perm 511 -exec chmod 755 {} \; find . -perm 711 -exec chmod 755 {} \; find . -perm 555 -exec chmod 755 {} \; # Compile make -f admin/Makefile.common LDFLAGS="-L/usr/$SLKLIBDIR -L/$SLKLIBDIR" \ CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure \ --prefix=/usr \ --sysconfdir=/etc/kde \ --libdir=/usr/$SLKLIBDIR \ --with-shadow \ --with-xinerama \ --disable-debug \ --program-prefix= \ --program-suffix= \ --disable-dependency-tracking \ --build=$CHOST-slackware-linux #crux (cd libkonq/ ; make) (cd kdmlib/ ; make) (cd kicker/libkicker/ ; make) ##my (cd kicker/kicker/interfaces/ ; make) # IMP!!! # parallel builds break stuff so we disable them make -j1 || exit 1 make install DESTDIR=$PKG # icon kde4 animated # ~/.kde/share/apps/kicker/pics/kmenu_basic.mng # ~/.kde/share/apps/kicker/pics/kmenu_vertical.mng # ~/.kde/share/apps/kicker/pics/kmenu_flipped.mng mkdir -p $PKG/usr/share/apps/kicker/pics/ cp $CWD/kmenu_icons/*.mng $PKG/usr/share/apps/kicker/pics/ # 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 !!! ### # documentation mkdir -p $PKG/usr/doc/$NAME-$VERSION cp -a AUTHORS COPYING INSTALL README kdebase.lsm $PKG/usr/doc/$NAME-$VERSION # insert slackbuild and patches mkdir -p $PKG/usr/doc/$NAME-$VERSION/SlackBuild for ifile in $(ls $CWD | egrep -v ^kdebase-$VERSION.tar.bz2) do cp -a $CWD/$ifile $PKG/usr/doc/$NAME-$VERSION/SlackBuild done mkdir -p $PKG/etc/X11/xinit $PKG/etc/profile.d cat $CWD/xinit/xinitrc.kde > $PKG/etc/X11/xinit/xinitrc.kde cat $CWD/profile.d/kde.sh > $PKG/etc/profile.d/kde.sh cat $CWD/profile.d/kde.csh > $PKG/etc/profile.d/kde.csh chmod 755 $PKG/etc/X11/xinit/xinitrc.kde $PKG/etc/profile.d/kde.sh $PKG/etc/profile.d/kde.csh # 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 ( 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 # build package cd $PKG chown -R root:root $PKG if [ -x "$(which requiredbuilder)" ]; then EXCLUDE="kdebase" requiredbuilder -y -v -s $CWD $PKG fi makepkg -l y -c n $CWD/../$NAME-$VERSION-$ARCH-$BUILD.tgz # checksum and desc (cd $CWD/.. md5sum $NAME-$VERSION-$ARCH-$BUILD.tgz > $NAME-$VERSION-$ARCH-$BUILD.tgz.md5 cat $PKG/install/slack-desc | grep "^$NAME" > $NAME-$VERSION-$ARCH-$BUILD.txt ) # optional clean if [ "$1" = "--cleanup" ]; then if [ "$TMP" != "/" ]; then rm -rf $TMP fi fi