diff options
Diffstat (limited to 'development/ninja/ninja.SlackBuild')
-rw-r--r-- | development/ninja/ninja.SlackBuild | 38 |
1 files changed, 25 insertions, 13 deletions
diff --git a/development/ninja/ninja.SlackBuild b/development/ninja/ninja.SlackBuild index 4d7a3f206f4a..2d6fceca27f6 100644 --- a/development/ninja/ninja.SlackBuild +++ b/development/ninja/ninja.SlackBuild @@ -40,6 +40,20 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -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 @@ -55,25 +69,23 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -./configure.py --bootstrap - -mkdir -p $PKG/usr/bin -cp ninja $PKG/usr/bin - -mkdir -p $PKG/usr/share/bash-completion/completions -cp misc/bash-completion $PKG/usr/share/bash-completion/completions/ninja - -mkdir -p $PKG/usr/share/zsh/site-functions -cp misc/zsh-completion $PKG/usr/share/zsh/site-functions/_ninja +CXXFLAGS="$SLKCFLAGS" \ +CFLAGS="$SLKCFLAGS" \ + python configure.py --bootstrap -mkdir -p $PKG/usr/share/emacs/site-lisp -cp misc/ninja-mode.el $PKG/usr/share/emacs/site-lisp +install -D -m0755 ninja $PKG/usr/bin/ninja +install -D -m0644 misc/bash-completion $PKG/usr/share/bash-completion/completions/ninja +install -D -m0644 misc/zsh-completion $PKG/usr/share/zsh/site-functions/_ninja +install -D -m0644 misc/ninja.vim $PKG/usr/share/vim/vimfiles/syntax/ninja.vim +install -D -m0644 misc/ninja-mode.el $PKG/usr/share/emacs/site-lisp/ninja-mode.el find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a COPYING doc/manual.asciidoc $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + COPYING* HACKING* README* RELEASING \ + $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -p $PKG/install |