3 # Slackware build script for qstardict
5 # Written by grissiom chaos.proton@gmail.com
8 VERSION
=${VERSION:-0.12.7}
15 PKG
=$TMP/package-
$PRGNAM
16 OUTPUT
=${OUTPUT:-/tmp}
21 if [ "$ARCH" = "i486" ]; then
22 SLKCFLAGS
="-O2 -march=i486 -mtune=i686"
23 elif [ "$ARCH" = "i686" ]; then
24 SLKCFLAGS
="-O2 -march=i686 -mtune=i686"
25 elif [ "$ARCH" = "x86_64" ]; then
32 mkdir
-p $TMP $PKG $OUTPUT
34 rm -rf $PRGNAM-$VERSION
35 tar jxvf
$CWD/$PRGNAM-$VERSION.
tar.bz2
39 \
( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \
) \
40 -exec chmod 755 {} \
; -o \
41 \
( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \
) \
45 QMAKE_CXXFLAGS
="$SLKCFLAGS"
48 make install INSTALL_ROOT
=$PKG
51 find . |
xargs file |
grep "executable" |
grep ELF | cut
-f 1 -d : |
xargs strip
--strip-unneeded 2> /dev
/null || true
52 find . |
xargs file |
grep "shared object" |
grep ELF | cut
-f 1 -d : |
xargs strip
--strip-unneeded 2> /dev
/null
55 mkdir
-p $PKG/usr
/doc
/$PRGNAM-$VERSION
56 cp -a AUTHORS ChangeLog COPYNG INSTALL README THANKS
$PKG/usr
/doc
/$PRGNAM-$VERSION
57 cat $CWD/$PRGNAM.SlackBuild
> $PKG/usr
/doc
/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
60 cat $CWD/slack-desc
> $PKG/install
/slack-desc
63 /sbin
/makepkg
-l y
-c n
$OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz