source: npl/overig/scons/scons.SlackBuild.orig @ 1393bb5

gcc484ntopperl-5.22
Last change on this file since 1393bb5 was c5c522c, checked in by Edwin Eefting <edwin@datux.nl>, 8 years ago

initial commit, transferred from cleaned syn3 svn tree

  • Property mode set to 100755
File size: 2.9 KB
Line 
1#!/bin/sh
2
3# Copyright 2015  Patrick J. Volkerding, Sebeka, MN, USA
4# Copyright 2015  Heinz Wiesinger, Amsterdam, The Netherlands
5# All rights reserved.
6#
7# Redistribution and use of this script, with or without modification, is
8# permitted provided that the following conditions are met:
9#
10# 1. Redistributions of this script must retain the above copyright
11#    notice, this list of conditions and the following disclaimer.
12#
13# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
14# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
15# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
16# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
17# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
18# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
19# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
20# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
21# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
22# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23
24
25PKGNAM=scons
26VERSION=${VERSION:-$(echo scons-*.tar.?z* | rev | cut -f 3- -d . | cut -f 1 -d - | rev)}
27BUILD=${BUILD:-1}
28
29# Automatically determine the architecture we're building on:
30if [ -z "$ARCH" ]; then
31  case "$( uname -m )" in
32    i?86) export ARCH=i586 ;;
33    arm*) export ARCH=arm ;;
34    # Unless $ARCH is already set, use uname -m for all other archs:
35       *) export ARCH=$( uname -m ) ;;
36  esac
37fi
38
39if [ "${ARCH}" = "i586" ]; then
40  SLKCFLAGS="-O2 -march=i586 -mtune=i686"
41  LIBDIRSUFFIX=""
42elif [ "$ARCH" = "i686" ]; then
43  SLKCFLAGS="-O2 -march=i686 -mtune=i686"
44  LIBDIRSUFFIX=""
45elif [ "$ARCH" = "s390" ]; then
46  SLKCFLAGS="-O2"
47  LIBDIRSUFFIX=""
48elif [ "$ARCH" = "x86_64" ]; then
49  SLKCFLAGS="-O2 -fPIC"
50  LIBDIRSUFFIX="64"
51fi
52
53CWD=$(pwd)
54TMP=${TMP:-/tmp}
55PKG=$TMP/package-$PKGNAM
56
57rm -rf $PKG
58mkdir -p $TMP $PKG
59
60cd $TMP
61rm -rf scons-$VERSION
62tar xvf $CWD/scons-$VERSION.tar.*z* || exit 1
63cd scons-$VERSION
64chown -R root:root .
65find . \
66  \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
67  -exec chmod 755 {} \; -o \
68  \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
69  -exec chmod 644 {} \;
70
71python setup.py install \
72  --no-version-script \
73  --standard-lib \
74  --root=$PKG || exit 1
75
76find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
77  | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
78
79( cd $PKG/usr/man
80  find . -type f -exec gzip -9 {} \;
81  for i in $( find . -type l ) ; do ln -s $( readlink $i ).gz $i.gz ; rm $i ; done
82)
83
84mkdir -p $PKG/usr/doc/$PKGNAM-$VERSION/
85cp -a \
86  *.txt MANIFEST PKG-INFO \
87  $PKG/usr/doc/$PKGNAM-$VERSION/
88
89mkdir -p $PKG/install
90cat $CWD/slack-desc > $PKG/install/slack-desc
91
92cd $PKG
93/sbin/makepkg -l y -c n $TMP/$PKGNAM-$VERSION-$ARCH-$BUILD.txz
94
Note: See TracBrowser for help on using the repository browser.