clean up the directory structure
[grissiom.SlackBuilds.git] / QScintilla / QScintilla-gpl.SlackBuild
blobb5dd2872bf5e227ea5f3f08b3dd25989dfad1ca7
1 #!/bin/sh
3 # Slackware build script for QScintilla
5 # Written by grissiom chaos.proton@gmail.com
8 PRGNAM=QScintilla-gpl
9 VERSION=${VERSION:-2.2}
10 ARCH=${ARCH:-i486}
11 BUILD=${BUILD:-1}
12 TAG=${TAG:-_SBo}
14 CWD=$(pwd)
15 TMP=${TMP:-/tmp/SBo}
16 PKG=$TMP/package-$PRGNAM
17 OUTPUT=${OUTPUT:-/tmp}
19 JOBS=${JOBS:-3}
20 MAKEOPT="-s -j $JOBS"
22 if [ "$ARCH" = "i486" ]; then
23 SLKCFLAGS="-O2 -march=i486 -mtune=i686"
24 elif [ "$ARCH" = "i686" ]; then
25 SLKCFLAGS="-O2 -march=i686 -mtune=i686"
26 elif [ "$ARCH" = "x86_64" ]; then
27 SLKCFLAGS="-O2 -fPIC"
30 set -e
32 rm -rf $PKG
33 mkdir -p $TMP $PKG $OUTPUT
34 cd $TMP
35 rm -rf $PRGNAM-$VERSION
36 tar -xzvf $CWD/$PRGNAM-$VERSION.tar.gz
37 cd $PRGNAM-$VERSION
38 chown -R root:root .
39 find . \
40 \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
41 -exec chmod 755 {} \; -o \
42 \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
43 -exec chmod 644 {} \;
45 # can someone feagure out what is the examples for?
46 ( cd ./Qt3
47 qmake qscintilla.pro QMAKE_CXXFLAGS="$SLKCFLAGS"
48 make $MAKEOPT
49 make install INSTALL_ROOT=$PKG
50 # I have to install it now for the fellowing configurations.
51 make install
54 ( cd ./designer-Qt3
55 qmake qscintilla.pro QMAKE_CXXFLAGS="$SLKCFLAGS"
56 make $MAKEOPT
57 make install INSTALL_ROOT=$PKG
60 ( cd ./Qt4
61 qmake-qt4 qscintilla.pro QMAKE_CXXFLAGS="$SLKCFLAGS"
62 make $MAKEOPT
63 make install INSTALL_ROOT=$PKG
64 # I have to install it now for the fellowing configurations.
65 make install
68 ( cd ./designer-Qt4
69 qmake-qt4 designer.pro QMAKE_CXXFLAGS="$SLKCFLAGS"
70 make $MAKEOPT
71 make install INSTALL_ROOT=$PKG
74 ( cd ./Python
75 python configure.py
76 make $MAKEOPT
77 make install DESTDIR=$PKG
80 #cleanup
81 (cd ./Qt3
82 make uninstall
84 #cleanup
85 (cd ./Qt4
86 make uninstall
89 ( cd $PKG
90 find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
91 find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
94 mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
95 cp -a ChangeLog GPL_EXCEPTION_ADDENDUM.TXT GPL_EXCEPTION.TXT LICENSE.GPL2 LICENSE.GPL3 NEWS \
96 OPENSOURCE-NOTICE.TXT README doc/ \
97 $PKG/usr/doc/$PRGNAM-$VERSION
98 cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
100 mkdir -p $PKG/install
101 cat $CWD/slack-desc > $PKG/install/slack-desc
103 cd $PKG
104 /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz