3 # Copyright 2008 Aleksandar Samardzic <asamardzic@gmail.com>
4 # Copyright 2008, 2009, 2010, 2011 Patrick J. Volkerding, Sebeka, MN, USA
5 # Copyright 2016 Marcel Saegebarth <marc@mos6581.de>
8 # Redistribution and use in source and binary forms, with or without
9 # modification, are permitted provided that the following conditions are
12 # * Redistributions of source code must retain the above copyright
13 # notice, this list of conditions and the following disclaimer.
15 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
19 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
21 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 # Modified by Robby Workman <rworkman@slackware.com>
28 # Modified by Eric Hameleers <alien@slackware.com>
29 # Adapted by Marcel Saegebarth <marc@mos6581.de>
33 VERSION=${VERSION:-4.19.6}
37 if [ -z "$ARCH" ]; then
38 case "$( uname -m )" in
41 *) ARCH=$( uname -m ) ;;
47 PKG=$TMP/package-$PRGNAM
48 OUTPUT=${OUTPUT:-/tmp}
50 if [ "$ARCH" = "i486" ]; then
51 SLKCFLAGS="-O2 -march=i486 -mtune=i686"
53 elif [ "$ARCH" = "i686" ]; then
54 SLKCFLAGS="-O2 -march=i686 -mtune=i686"
56 elif [ "$ARCH" = "x86_64" ]; then
64 PYTHONVER=$(python3 -V 2>&1 | cut -f 2 -d' ' | cut -f 1-2 -d.)
65 PYTHONLIB=/usr/lib$LIBDIRSUFFIX/python$PYTHONVER/site-packages
70 mkdir -p $TMP $PKG $OUTPUT
72 rm -rf $SRCNAM-$VERSION
73 tar xvf $CWD/$SRCNAM-$VERSION.tar.gz
77 \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
78 -o -perm 511 \) -exec chmod 755 {} \; -o \
79 \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
80 -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
82 python3 configure.py \
85 -e "/usr/include/python$PYTHONVER" \
90 make install DESTDIR=$PKG
97 find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
98 | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
100 mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
101 cp -a ChangeLog LICENSE* NEWS README $PKG/usr/doc/$PRGNAM-$VERSION
102 cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
104 mkdir -p $PKG/install
105 cat $CWD/slack-desc > $PKG/install/slack-desc
108 /sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}