LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 03-09-2012, 07:24 PM   #1
Konphine
Member
 
Registered: Jul 2011
Location: Phoenix, New York
Distribution: Slackware 13.37
Posts: 376

Rep: Reputation: 11
Custom XFCE build from Slackware repo


Hello,

I plan on remaking XFCE with a few customizations (removing orage, xfce4-mixer, and a few others). Before I do that, I just wanted to make sure that the script would work.

It's meant to be a minimal xfce with only xfce4-panel (and the dependencies) so that I could use compiz as a standalone window manager. Here is the old script (found on any slackware repo):

Code:
#!/bin/sh

# Copyright 2003  Slackware Linux, Inc., Concord, CA, USA
# Copyright 2007, 2008, 2009, 2010, 2011  Patrick J. Volkerding, Sebeka, MN, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
#
#  THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
#  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
#  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO
#  EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
#  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
#  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
#  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
#  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
#  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
#  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

VERSION=4.6.2
BUILD=${BUILD:-5}

# A few tarballs have different versions; handle them here
XDT_VERS=4.8.0		# xfce4-dev-tools version
# We're going to ship xdt from xfce-4.8 since it's not used for building
# release tarballs anyway, but it's handy to have around for building from 
# git, and some folks might want to do that later...
EXO_VERS=0.3.107	# exo version
THUNAR_VERS=1.0.2	# thunar version
GXE_VERS=2.6.0		# gtk-xfce-engine version
TERM_VERS=0.4.6		# terminal version
MPAD_VERS=0.2.16	# mousepad version
XFWM_VERS=4.6.2		# xfwm4 version
XFWMTHEME_VERS=4.6.0	# xfwm4-themes version
SETTINGS_VERS=4.6.5	# xfce4-settings version
SESSION_VERS=4.6.2	# xfce4-settings version
PANEL_VERS=4.6.4	# xfce4-panel version
XFCEGUI_VERS=4.6.4	# libxfcegui4 version
XFCEMENU_VERS=4.6.2	# libxfce4menu version
LIBUTIL_VERS=4.6.2	# libxfce4util version
UTILS_VERS=4.6.2	# xfce-utils version
APPFINDER_VERS=4.6.2	# xfce4-appfinder version
XFCONF_VERS=4.6.2	# xfconf version
XFDESKTOP_VERS=4.6.2	# xfdesktop version
MIXER_VERS=4.6.1	# xfce4-mixer version
XFPRINT_VERS=4.6.1	# xfprint version
ORAGE_VERS=4.6.1	# orage version

NUMJOBS=${NUMJOBS:--j6}

# Automatically determine the architecture we're building on:
if [ -z "$ARCH" ]; then
  case "$( uname -m )" in
    i?86) export ARCH=i486 ;;
    arm*) export ARCH=arm ;;
    # Unless $ARCH is already set, use uname -m for all other archs:
       *) export ARCH=$( uname -m ) ;;
  esac
fi

CWD=$(pwd)
TMP=${TMP:-/tmp/xfce-build-dir}
PKG=$TMP/package-xfce

if [ "$ARCH" = "i486" ]; then
  SLKCFLAGS="-O2 -march=i486 -mtune=i686"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "s390" ]; then
  SLKCFLAGS="-O2"
  LIBDIRSUFFIX=""
elif [ "$ARCH" = "x86_64" ]; then
  SLKCFLAGS="-O2 -fPIC"
  LIBDIRSUFFIX="64"
else
  SLKCFLAGS="-O2"
  LIBDIRSUFFIX=""
fi

rm -rf $PKG
mkdir -p $TMP $PKG
cd $TMP || exit 1

COMPRESSION=xz
COMPRESSUTIL=xz

for file in \
 xfce4-dev-tools-$XDT_VERS.tar.$COMPRESSION \
 libxfce4util-$LIBUTIL_VERS.tar.$COMPRESSION \
 xfconf-$XFCONF_VERS.tar.$COMPRESSION \
 libxfcegui4-$XFCEGUI_VERS.tar.$COMPRESSION \
 libxfce4menu-$XFCEMENU_VERS.tar.$COMPRESSION \
 exo-$EXO_VERS.tar.$COMPRESSION \
 xfce4-panel-$PANEL_VERS.tar.$COMPRESSION \
 Thunar-$THUNAR_VERS.tar.$COMPRESSION \
 xfce4-settings-$SETTINGS_VERS.tar.$COMPRESSION \
 xfce4-session-$SESSION_VERS.tar.$COMPRESSION \
 xfdesktop-$XFDESKTOP_VERS.tar.$COMPRESSION \
 xfwm4-$XFWM_VERS.tar.$COMPRESSION \
 xfce-utils-$UTILS_VERS.tar.$COMPRESSION \
 xfce4-mixer-$MIXER_VERS.tar.$COMPRESSION \
 xfprint-$XFPRINT_VERS.tar.$COMPRESSION \
 xfce4-appfinder-$APPFINDER_VERS.tar.$COMPRESSION \
 gtk-xfce-engine-$GXE_VERS.tar.$COMPRESSION \
 Terminal-$TERM_VERS.tar.$COMPRESSION \
 xfwm4-themes-$XFWMTHEME_VERS.tar.$COMPRESSION \
 mousepad-$MPAD_VERS.tar.$COMPRESSION \
 orage-$ORAGE_VERS.tar.$COMPRESSION ;
do
  $COMPRESSUTIL -dc $CWD/src/$file | tar xvf - || exit 1
  cd $(basename $file .tar.$COMPRESSION) || exit 1
    chown -R root:root .
    find . \
     \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
     -exec chmod 755 {} \; -o \
     \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
     -exec chmod 644 {} \;
  
    # Here's where we patch or set up any other package-specific stuff:
      # Patch to only show xfcalendar in XFce (otherwise it shows up in
      # KDE's Lost & Found and does not work):
      if [ "$file" = "orage-$ORAGE_VERS.tar.$COMPRESSION" ]; then
        zcat $CWD/patches/xfcalendar.desktop.in.diff.gz | patch -p1 --verbose || exit 1
      fi
      # Make Thunar respect --docdir
      if [ "$file" = "Thunar-$THUNAR_VERS.tar.$COMPRESSION" ]; then
        zcat $CWD/patches/thunar-1.0.2-fixup_docdir.diff.gz | patch -p1 --verbose || exit 1
        zcat $CWD/patches/Thunar.thunar-vfs-io-local.diff.gz | patch -p0 --verbose || exit 1
      fi
      # Fix the missing education icon in the desktop menu
      if [ "$file" = "xfdesktop-$XFDESKTOP_VERS.tar.$COMPRESSION" ]; then
        zcat $CWD/patches/xfdesktop-fix_education_icon.diff.gz | patch -p1 --verbose || exit 1
      fi
      # 1) Launch xfce through consolekit so that ck enabled stuff works in xfce
      # 2) Fix comments in /etc/xfce/xdg/xfce4/Xft.xrdb 
      #    http://bugzilla.xfce.org/show_bug.cgi?id=6314
      # 3) Load system-wide .Xmodmap, not just the one in $HOME
      if [ "$file" = "xfce-utils-$UTILS_VERS.tar.$COMPRESSION" ]; then
        zcat $CWD/patches/xfce-utils.xinitrc.consolekit.diff.gz | patch -p1 --verbose || exit 1
        zcat $CWD/patches/fixup_comments_in_xfce-utils-Xft.xrdb.diff.gz | patch -p1 --verbose || exit 1
        zcat $CWD/patches/xfce-utils-load_systemwide_Xmodmap.diff.gz | patch -p1 --verbose || exit 1
      fi
      # Fix a couple of bugs from mousepad git
      if [ "$file" = "mousepad-$MPAD_VERS.tar.$COMPRESSION" ]; then
        zcat $CWD/patches/mousepad-fix_find_and_replace.diff.gz | patch -p1 --verbose || exit 1
        zcat $CWD/patches/mousepad-fix_find.diff.gz | patch -p1 --verbose || exit 1
      fi
      # Fix a plugin moving bug in the panel
      if [ "$file" = "xfce4-panel-$PANEL_VERS.tar.$COMPRESSION" ]; then
        zcat $CWD/patches/no_sensitive_panel_during_plugin_moves.patch.gz | patch -p1 --verbose || exit 1
      fi
      # Start kde4 services instead of kde3
      # http://bugzilla.xfce.org/show_bug.cgi?id=7382
      if [ "$file" = "xfce4-session-$SESSION_VERS.tar.$COMPRESSION" ]; then
        zcat $CWD/patches/xfsm-compat-kde.c-start-kde4-services.diff.gz | patch -p1 --verbose || exit 1
      fi
    # End patches/package-specific stuff

    CFLAGS="$SLKCFLAGS" \
    CXXFLAGS="$SLKCFLAGS" \
    ./configure \
      --prefix=/usr \
      --libdir=/usr/lib${LIBDIRSUFFIX} \
      --sysconfdir=/etc/xfce \
      --mandir=/usr/man \
      --docdir=/usr/doc/xfce-$VERSION/$(basename $file .tar.$COMPRESSION) \
      --htmldir=/usr/doc/xfce-$VERSION/$(basename $file .tar.$COMPRESSION)/html \
      --disable-static \
      --build=$ARCH-slackware-linux \
      $PACKAGE_SPECIFIC_OPTIONS
  
    # Unset this now -- we're done with it
    unset PACKAGE_SPECIFIC_OPTIONS
  
    make $NUMJOBS || make || exit 1
    make install || exit 1
    make install DESTDIR=$PKG
  
    mkdir -p $PKG/usr/doc/xfce-$VERSION/$(basename $file .tar.$COMPRESSION)
    # This will cause errors, but won't miss any docs:
    cp -a \
      AUTHORS BUGS COMPOSITOR COPYING* FAQ HACKING INSTALL \
      NEWS NOTES README* THANKS TODO example.gtkrc-2.0 \
     $PKG/usr/doc/xfce-$VERSION/$(basename $file .tar.$COMPRESSION) \
     2> /dev/null || true

    # If there's a ChangeLog, installing at least part of the recent history
    # is useful, but don't let it get totally out of control:
    if [ -r ChangeLog ]; then
      DOCSDIR=$(echo $PKG/usr/doc/xfce-$VERSION/$(basename $file .tar.$COMPRESSION))
      cat ChangeLog | head -n 1000 > $DOCSDIR/ChangeLog
      touch -r ChangeLog $DOCSDIR/ChangeLog
    fi

  cd - ;
done

find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
  | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null

# The Rodent icon theme isn't xdg compliant, so it spews errors quite often
# and just flat breaks some things here and there, so the Xfce team elected
# not to ship it with 4.6.x.   In the meantime, we'll default to gnome.
sed -i s/Rodent/gnome/ \
  $PKG/etc/xfce/xdg/xfce4/xfconf/xfce-perchannel-xml/xsettings.xml

# We're going to borrow the "applications-education" icons (six of them)
# from the kde oxygen icon theme (it's LGPL)
tar xf $CWD/icons.tar.xz -C $PKG/usr/share

# We don't want any of those icon caches
find $PKG/usr/share/icons -type f -name "index-theme.cache" -exec rm -f {} \;

# Compress and if needed symlink the man pages:
if [ -d $PKG/usr/man ]; then
  ( cd $PKG/usr/man
    for manpagedir in $(find . -type d -name "man*") ; do
      ( cd $manpagedir
        for eachpage in $( find . -type l -maxdepth 1) ; do
          ln -s $( readlink $eachpage ).gz $eachpage.gz
          rm $eachpage
        done
        gzip -9 *.?
      )
    done
  )
fi

mkdir -p $PKG/etc/profile.d
cp -a $CWD/profile.d/* $PKG/etc/profile.d
chown root:root $PKG/etc/profile.d/*
chmod 755 $PKG/etc/profile.d/*

mkdir -p $PKG/etc/X11/xinit
( cd $PKG/etc/X11/xinit
  ln -sf ../../xfce/xdg/xfce4/xinitrc xinitrc.xfce
  chmod 755 ../../xfce/xdg/xfce4/xinitrc
)

mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc

cd $PKG
/sbin/makepkg -l y -c n $TMP/xfce-$VERSION-$ARCH-$BUILD.txz
What I intend to do is remove the lines the script searches for in:

Code:
 for file in \
package-$PACKAGE_VERS.tar.$COMPRESSION
Maybe the version numbers before that, but I don't think that is necessary.

I have checked out xfce.org to see what dependencies I need simply for xfce4-panel to run by itself, but are there any precautions I should acknowledge before I attempt this project? This isn't my first time customizing a file that was installed on Slackware by default, but those were smaller, less complex packages.
 
Old 03-10-2012, 07:56 PM   #2
Konphine
Member
 
Registered: Jul 2011
Location: Phoenix, New York
Distribution: Slackware 13.37
Posts: 376

Original Poster
Rep: Reputation: 11
Bumping because it's been 24 hours and I just want to make sure I won't destroy anything.
 
Old 03-10-2012, 10:00 PM   #3
the3dfxdude
Member
 
Registered: May 2007
Posts: 316

Rep: Reputation: 88
I don't see why not just try it? I built xfce on a rhel4 system using the slackbuild, and I had to leave a few bigger things out.
 
Old 03-10-2012, 10:01 PM   #4
Konphine
Member
 
Registered: Jul 2011
Location: Phoenix, New York
Distribution: Slackware 13.37
Posts: 376

Original Poster
Rep: Reputation: 11
Alright, I guess I will. I'm just worried I might break my xfce somehow.
 
Old 03-11-2012, 03:42 PM   #5
sahko
Senior Member
 
Registered: Sep 2008
Distribution: Slackware
Posts: 1,041

Rep: Reputation: Disabled
You may want to look here too if you want a newer xfce.
 
Old 03-12-2012, 01:52 AM   #6
andrew.46
Member
 
Registered: Oct 2007
Distribution: Slackware
Posts: 646

Rep: Reputation: 90
Quote:
Originally Posted by sahko View Post
You may want to look here too if you want a newer xfce.
Must be getting close to time for this to hit -current.......
 
Old 03-12-2012, 04:11 AM   #7
Cultist
Member
 
Registered: Feb 2010
Location: Chicago, IL
Distribution: Slackware64 14.1
Posts: 777

Rep: Reputation: 101Reputation: 101
Quote:
Originally Posted by andrew.46 View Post
Must be getting close to time for this to hit -current.......
I doubt it. From what I've read, 4.8 is way too buggy for -current. Debian Sid or Fedora Rawhide, maybe.
 
Old 03-12-2012, 07:48 AM   #8
sahko
Senior Member
 
Registered: Sep 2008
Distribution: Slackware
Posts: 1,041

Rep: Reputation: Disabled
If newer KDE gets into current, its inevitable that XFCE 4.8 will get into Slack along with it in order to get rid of all the needless dependencies like HAL etc.
The only way to improve the Slackware XFCE experience is to test Robby's packages and report bugs and/or patches.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Minimal Slackware XFCE Desktop Build nosaku Linux - Desktop 1 12-28-2011 10:13 AM
mounting ext3 file system as ext2 on slackware with custom build kernel robertjinx Linux - Server 2 05-16-2010 10:28 AM
Custom kernel image on custom slack build using CUSS nykey Slackware 2 07-15-2006 03:05 AM
Slackware 10.1 installation with custom build kernel zWaR Slackware 5 08-09-2005 02:29 AM
build custom slackware iso Zeratool Box Slackware 1 05-11-2003 01:28 AM


All times are GMT -5. The time now is 04:50 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration