summaryrefslogtreecommitdiff
path: root/desktop/gtk-chtheme/gtk-chtheme.SlackBuild
diff options
context:
space:
mode:
authorRobby Workman <rworkman@slackbuilds.org>2011-01-01 23:45:33 -0600
committerRobby Workman <rworkman@slackbuilds.org>2011-01-01 23:46:17 -0600
commitbf4727e8be20b37f6405367f972a94527c9f088f (patch)
tree32efb707d2d60704d01ec2cb44bd7e865784e90d /desktop/gtk-chtheme/gtk-chtheme.SlackBuild
parentc1906f2648779dcf40dbf879b765a1c5fa136646 (diff)
downloadslackbuilds-bf4727e8be20b37f6405367f972a94527c9f088f.tar.gz
desktop/gtk-chtheme: Fixed build error with new gtk+2 ; misc cleanup
This adds a patch to use modern gtk+2 API as well as using RPM_OPT_FLAGS to use our SLKCFLAGS instead of having to sed the Makefile. The other changes are aesthetic only :) Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'desktop/gtk-chtheme/gtk-chtheme.SlackBuild')
-rw-r--r--desktop/gtk-chtheme/gtk-chtheme.SlackBuild46
1 files changed, 25 insertions, 21 deletions
diff --git a/desktop/gtk-chtheme/gtk-chtheme.SlackBuild b/desktop/gtk-chtheme/gtk-chtheme.SlackBuild
index 20533203d3..8072bf1ff6 100644
--- a/desktop/gtk-chtheme/gtk-chtheme.SlackBuild
+++ b/desktop/gtk-chtheme/gtk-chtheme.SlackBuild
@@ -26,7 +26,7 @@
PRGNAM=gtk-chtheme
VERSION=0.3.1
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG=_SBo}
# Automatically determine the architecture we're building on:
@@ -46,39 +46,43 @@ OUTPUT=${OUTPUT:-/tmp}
DOCS="COPYING ChangeLog"
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+fi
+
+set -e
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
-cd $TMP || exit 1
+cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xvjf $CWD/$PRGNAM-$VERSION.tar.bz2
-cd $PRGNAM-$VERSION || exit 1
+tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2
+cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R u+w,go+r-w,a-s .
-# Rewrite CFLAGS
-if [ "$ARCH" = "i486" ]; then
- sed -i 's#CFLAGS += -Wall#CFLAGS += -O2 -march=i486 -mtune=i686#' $TMP/$PRGNAM-$VERSION/Makefile
-elif [ "$ARCH" = "i686" ]; then
- sed -i 's#CFLAGS += -Wall#CFLAGS += -O2 -march=i686 -mtune=i686#' $TMP/$PRGNAM-$VERSION/Makefile
-elif [ "$ARCH" = "x86_64" ]; then
- sed -i 's#CFLAGS += -Wall#CFLAGS += -O2 -fPIC#' $TMP/$PRGNAM-$VERSION/Makefile
-fi
+patch -p1 < $CWD/gtk-chtheme-0.3.1-new-api.patch
-make || exit 1
-make install DESTDIR=$PKG MANDIR=usr/man || exit 1
+make RPM_OPT_FLAGS="$SLKCFLAGS"
+make install DESTDIR=$PKG MANDIR=usr/man
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
-( cd $PKG/usr/man
- find . -type f -exec gzip -9 {} \;
- find . -type f -exec chmod 644 {} \;
- for i in $(find . -type l) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
-)
+find $PKG/usr/man -type f -exec gzip -9 {} \;
-# Docs, slack-desc, buildscript
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install