aboutsummaryrefslogtreecommitdiff
path: root/desktop/wmMoonClock/wmMoonClock.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/wmMoonClock/wmMoonClock.SlackBuild')
-rw-r--r--desktop/wmMoonClock/wmMoonClock.SlackBuild27
1 files changed, 12 insertions, 15 deletions
diff --git a/desktop/wmMoonClock/wmMoonClock.SlackBuild b/desktop/wmMoonClock/wmMoonClock.SlackBuild
index d5a7eab6bd364..e7b64ec6fa643 100644
--- a/desktop/wmMoonClock/wmMoonClock.SlackBuild
+++ b/desktop/wmMoonClock/wmMoonClock.SlackBuild
@@ -18,10 +18,13 @@ OUTPUT=${OUTPUT:-/tmp}
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
@@ -30,7 +33,7 @@ rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
-tar -xvf $CWD/$PRGNAM-$VERSION.tar.gz
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
find . \
@@ -40,18 +43,14 @@ find . \
-exec chmod 644 {} \;
cd Src
- mkdir $PKG/usr
- mkdir $PKG/bin
- mkdir -p $PKG/man/man1
- CFLAGS="$SLKCFLAGS" make
- make install DESTDIR=$PKG
+ mkdir -p $PKG/usr/{bin,man/man1}
+ make \
+ CFLAGS="$SLKCFLAGS" \
+ INCDIR="-I/usr/include/X11" \
+ LIBDIR="-L/usr/lib${LIBDIRSUFFIX}/X11"
+ make install DESTDIR=$PKG/usr
cd -
-# Executable and manual are already installed;
-# we just move them to the correct location
-mv $PKG/bin $PKG/usr
-mv $PKG/man $PKG/usr
-
( cd $PKG
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
xargs strip --strip-unneeded 2> /dev/null || true
@@ -65,13 +64,11 @@ mv $PKG/man $PKG/usr
)
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a BUGS COPYING \
- $PKG/usr/doc/$PRGNAM-$VERSION
+cp -a BUGS COPYING $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
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}