2012-08-10 03:46:54 +08:00
|
|
|
#!/bin/sh
|
|
|
|
|
2016-04-12 15:35:23 +08:00
|
|
|
# Slackware build script for "x-tile".
|
2012-08-10 03:46:54 +08:00
|
|
|
|
|
|
|
# Copyright 2012 Chris Abela, Malta
|
2017-01-05 04:47:55 +08:00
|
|
|
# Copyright 2014-2016 Ryan P.C. McQuen, ryanpcmcquen@member.fsf.org, WA
|
2016-04-12 15:35:23 +08:00
|
|
|
# Copyright 2016 Marcel Saegebarth <marc@mos6581.de>
|
2012-08-10 03:46:54 +08:00
|
|
|
# All rights reserved.
|
|
|
|
#
|
2016-04-12 15:35:23 +08:00
|
|
|
# Redistribution and use in source and binary forms, with or without
|
|
|
|
# modification, are permitted provided that the following conditions are
|
|
|
|
# met:
|
2012-08-10 03:46:54 +08:00
|
|
|
#
|
2016-04-12 15:35:23 +08:00
|
|
|
# * Redistributions of source code must retain the above copyright
|
|
|
|
# notice, this list of conditions and the following disclaimer.
|
2012-08-10 03:46:54 +08:00
|
|
|
#
|
2016-04-12 15:35:23 +08:00
|
|
|
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
|
|
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
|
|
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
|
|
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
|
|
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
|
|
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
|
|
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
|
|
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
|
|
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
|
|
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
|
|
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
2012-08-10 03:46:54 +08:00
|
|
|
|
|
|
|
PRGNAM=x-tile
|
2016-04-08 21:26:26 +08:00
|
|
|
VERSION=${VERSION:-2.5.1}
|
2016-04-12 15:35:23 +08:00
|
|
|
BUILD=${BUILD:-2}
|
2012-08-10 03:46:54 +08:00
|
|
|
TAG=${TAG:-_SBo}
|
|
|
|
|
|
|
|
ARCH=noarch
|
|
|
|
|
|
|
|
CWD=$(pwd)
|
|
|
|
TMP=${TMP:-/tmp/SBo}
|
|
|
|
PKG=$TMP/package-$PRGNAM
|
|
|
|
OUTPUT=${OUTPUT:-/tmp}
|
|
|
|
|
2013-11-22 15:34:22 +08:00
|
|
|
set -e
|
2012-08-10 03:46:54 +08:00
|
|
|
|
|
|
|
rm -rf $PKG
|
|
|
|
mkdir -p $TMP $PKG $OUTPUT
|
|
|
|
cd $TMP
|
|
|
|
rm -rf $PRGNAM-$VERSION
|
2016-04-12 15:35:23 +08:00
|
|
|
tar xvf $CWD/$VERSION.tar.gz || tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
|
2012-08-10 03:46:54 +08:00
|
|
|
cd $PRGNAM-$VERSION
|
|
|
|
chown -R root:root .
|
2013-11-22 15:37:19 +08:00
|
|
|
find -L . \
|
2014-04-03 23:32:03 +08:00
|
|
|
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
|
|
|
|
-o -perm 511 \) -exec chmod 755 {} \; -o \
|
|
|
|
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
|
|
|
|
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
|
2012-08-10 03:46:54 +08:00
|
|
|
|
|
|
|
python setup.py install --root=$PKG
|
|
|
|
|
|
|
|
mv $PKG/usr/share/man $PKG/usr/
|
|
|
|
|
|
|
|
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
|
|
|
cp -a license $PKG/usr/doc/$PRGNAM-$VERSION
|
|
|
|
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
|
|
|
|
|
|
|
mkdir -p $PKG/install
|
|
|
|
cat $CWD/slack-desc > $PKG/install/slack-desc
|
2012-09-29 19:33:59 +08:00
|
|
|
cat $CWD/doinst.sh > $PKG/install/doinst.sh
|
2012-08-10 03:46:54 +08:00
|
|
|
|
|
|
|
cd $PKG
|
|
|
|
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
|