#!/bin/sh # Copyright 2003 Slackware Linux, Inc., Concord, CA, 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. TMP=/tmp/xfce-build-dir rm -rf $TMP mkdir -p $TMP PKG=$TMP/package-xfce rm -rf $PKG mkdir -p $PKG CWD=`pwd` VERSION=4.2.3.2 VERSION2=4.2.3 PKGVER=4.2.3.2 ARCH=${ARCH:-x86_64} BUILD=1 LIBDIR=lib if [ "$ARCH" = "i386" ]; then SLKCFLAGS="-O2 -march=i386 -mcpu=i686" elif [ "$ARCH" = "i486" ]; then SLKCFLAGS="-O2 -march=i486 -mcpu=i686" elif [ "$ARCH" = "s390" ]; then SLKCFLAGS="-O2" elif [ "$ARCH" = "x86_64" ]; then SLKCFLAGS="-O2 -fPIC" LIBDIR=lib64 fi for file in \ dbh-1.0.24.tar.gz \ libxfce4util-$VERSION.tar.gz \ libxfcegui4-$VERSION2.tar.gz \ libxfce4mcs-$VERSION2.tar.gz \ xfce-mcs-manager-$VERSION2.tar.gz \ xfce4-panel-$VERSION2.tar.gz \ gtk-xfce-engine-2.2.8.tar.gz \ xfce-mcs-plugins-$VERSION2.tar.gz \ xfce-utils-$VERSION2.tar.gz \ xfce4-appfinder-$VERSION2.tar.gz \ xfce4-iconbox-$VERSION2.tar.gz \ xfce4-icon-theme-$VERSION2.tar.gz \ xfce4-mixer-$VERSION2.tar.gz \ xfce4-systray-$VERSION2.tar.gz \ xfce4-session-$VERSION2.tar.gz \ xfce4-toys-$VERSION2.tar.gz \ xfce4-trigger-launcher-$VERSION2.tar.gz \ xfdesktop-$VERSION2.tar.gz \ xffm-$VERSION2.tar.gz \ xfprint-$VERSION2.tar.gz \ xfwm4-$VERSION.tar.gz \ xfwm4-themes-$VERSION2.tar.gz \ xfcalendar-$VERSION2.tar.gz \ ; do ( cd $TMP tar xzf $CWD/$file cd `basename $file .tar.gz` # Strengthen resistance to /tmp attacks (low risk, but might as well...). if [ "$file" = "xfce-utils-$VERSION.tar.gz" ]; then zcat $CWD/xfce-utils-xinitrc.diff.gz | patch -p1 --verbose fi chown -R root.root . find . -perm 777 -exec chmod 755 {} \; find . -perm 775 -exec chmod 755 {} \; find . -perm 666 -exec chmod 644 {} \; find . -perm 664 -exec chmod 644 {} \; # From the COMPOSITOR file in xfwm4: # # xfwm4 now features a compositing manager. This code is new and has received only # a moderate amount of testing, so it's disabled by default. # # So, if you want to stay safe, keep the compositor disabled... # # If you still want to try the compositor extensions with xfwm4, here follows how # to enable the compositing manager in xfwm4. # # 1) Enabling the compositor manager in xfwm4 # ------------------------------------------- # # To enable the compositing manager in xfwm4, add --enable-compositor when running # the configure script. # CFLAGS="$SLKCFLAGS" \ CXXFLAGS="$SLKCFLAGS" \ ./configure --prefix=/usr \ --libdir=/usr/$LIBDIR \ --sysconfdir=/etc/X11 \ --enable-static=no \ --enable-xinerama make -j6 make install make install DESTDIR=$PKG mkdir -p $PKG/usr/doc/`basename $file .tar.gz` cp -a \ AUTHORS COPYING INSTALL NEWS README TODO \ $PKG/usr/doc/`basename $file .tar.gz` ( 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 for mandir in `find . -name man -type d` ; do if [ -d $mandir ]; then ( cd $mandir find . -type f -name "*.?" -exec gzip -9 {} \; ) fi done ) ) done ( cd $PKG/usr/bin ln -sf xffm xffstab4 ln -sf xffm xfapps ln -sf xffm xfbook ln -sf xffm xfsamba4 ln -sf xffm xftrash4 ln -sf xffm xfapps4 ln -sf xffm xfbook4 ln -sf xffm xffstab ln -sf xffm xfglob4 ln -sf xffm xftree4 ) chown -R root.bin $PKG/usr/bin ( mkdir -p $PKG/etc/X11/xinit cd $PKG/etc/X11/xinit ln -sf ../xdg/xfce4/xinitrc xinitrc.xfce chmod 755 ../xdg/xfce4/xinitrc ) mkdir -p $PKG/install cat $CWD/slack-desc > $PKG/install/slack-desc cd $PKG makepkg -l y -c n $TMP/xfce-$PKGVER-$ARCH-$BUILD.tgz