aboutsummaryrefslogtreecommitdiff
path: root/system/xosd/xosd.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'system/xosd/xosd.SlackBuild')
-rw-r--r--system/xosd/xosd.SlackBuild37
1 files changed, 23 insertions, 14 deletions
diff --git a/system/xosd/xosd.SlackBuild b/system/xosd/xosd.SlackBuild
index f1b380e94a41e..3f0146a080b5c 100644
--- a/system/xosd/xosd.SlackBuild
+++ b/system/xosd/xosd.SlackBuild
@@ -4,31 +4,38 @@
# Written by Jick Nan (jick.nan 在 gmail.com)
# Modified by the SlackBuilds.org project
+# Modified for 64bit by Ash Wiren (ash@spooksoftware.com)
PRGNAM=xosd
VERSION=2.2.12
-ARCH=${ARCH:-i486} # this should not change
+ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/pkg-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-DOCS="AUTHORS COPYING ChangeLog INSTALL NEWS README TODO"
-
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"
fi
+set -e
+
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
-cd $TMP || exit 1
+cd $TMP
rm -rf $PRGNAM-$VERSION
-tar xzvf $CWD/$PRGNAM-$VERSION.tar.gz || exit 1
-cd $PRGNAM-$VERSION || exit 1
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
chown -R root:root .
chmod -R a-s,u+w,go+r-w .
@@ -36,19 +43,21 @@ CFLAGS="$SLKCFLAGS" \
CXXFLAGS="$SLKCFLAGS" \
./configure \
--prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
--sysconfdir=/etc \
--localstatedir=/var \
- || exit 1
+ --mandir=/usr/man \
+ --build=$ARCH-slackware-linux
-make DESTDIR=$PKG || exit 1
-make install-strip DESTDIR=$PKG || exit 1
+make
+make install-strip DESTDIR=$PKG
-if [ -d $PKG/usr/man ]; then
- gzip -9 $PKG/usr/man/man?/*
-fi
+gzip -9 $PKG/usr/man/man?/*
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a $DOCS $PKG/usr/doc/$PRGNAM-$VERSION || true
+cp -a \
+ AUTHORS COPYING ChangeLog INSTALL NEWS README TODO \
+ $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
find $PKG/usr/doc -type f -exec chmod 0644 {} \;
@@ -56,4 +65,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}