2018-06-05 07:24:22 +02:00
|
|
|
#!/bin/sh
|
2009-08-26 17:00:38 +02:00
|
|
|
|
2012-09-26 03:10:42 +02:00
|
|
|
# Slackware build script for soma
|
2018-05-28 21:12:29 +02:00
|
|
|
# (C) 2010 David Woodfall <dave@dawoodfall.net>
|
2018-11-29 06:53:27 +01:00
|
|
|
# Modifications (C) Patrick Volkerding
|
2009-08-26 17:00:38 +02:00
|
|
|
# All rights reserved.
|
|
|
|
#
|
|
|
|
# Redistribution and use of this script, with or without modification, is
|
|
|
|
# permitted provided that the following conditions are met:
|
|
|
|
#
|
|
|
|
# 1. Redistributions of this script must retain the above copyright
|
|
|
|
# notice, this list of conditions and the following disclaimer.
|
|
|
|
#
|
|
|
|
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''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 AUTHOR 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.
|
|
|
|
|
2018-05-28 21:12:29 +02:00
|
|
|
cd $(dirname $0) ; CWD=$(pwd)
|
|
|
|
|
2018-06-05 07:24:22 +02:00
|
|
|
PRGNAM=soma
|
2019-01-03 00:26:53 +01:00
|
|
|
VERSION=${VERSION:-3.2.1}
|
2009-08-26 17:00:38 +02:00
|
|
|
ARCH=noarch
|
2018-06-05 07:24:22 +02:00
|
|
|
BUILD=${BUILD:-1}
|
2018-05-28 21:12:29 +02:00
|
|
|
|
|
|
|
# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
|
|
|
|
# the name of the created package would be, and then exit. This information
|
|
|
|
# could be useful to other scripts.
|
|
|
|
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
|
2018-06-05 07:24:22 +02:00
|
|
|
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-txz}"
|
2018-05-28 21:12:29 +02:00
|
|
|
exit 0
|
|
|
|
fi
|
2009-08-26 17:00:38 +02:00
|
|
|
|
2018-05-28 21:12:29 +02:00
|
|
|
TMP=${TMP:-/tmp/daw}
|
2018-06-05 07:24:22 +02:00
|
|
|
PKG=$TMP/package-$PRGNAM
|
2018-05-28 21:12:29 +02:00
|
|
|
OUTPUT=${OUTPUT:-/tmp}
|
2012-09-26 03:10:42 +02:00
|
|
|
|
2018-05-28 21:12:29 +02:00
|
|
|
set -e
|
2009-08-26 17:00:38 +02:00
|
|
|
|
|
|
|
rm -rf $PKG
|
2012-09-26 03:10:42 +02:00
|
|
|
mkdir -p $TMP $PKG $OUTPUT
|
|
|
|
cd $TMP
|
2018-06-05 07:24:22 +02:00
|
|
|
rm -rf $PRGNAM-$VERSION
|
|
|
|
tar xfv $CWD/$PRGNAM-$VERSION.tar.gz
|
|
|
|
cd $PRGNAM-$VERSION
|
2009-08-26 17:00:38 +02:00
|
|
|
chown -R root:root .
|
|
|
|
find . \
|
|
|
|
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
|
|
|
|
-exec chmod 755 {} \; -o \
|
|
|
|
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
|
|
|
|
-exec chmod 644 {} \;
|
|
|
|
|
2018-06-05 07:24:22 +02:00
|
|
|
mkdir -p $PKG/usr/bin $PKG/etc/soma/themes \
|
|
|
|
$PKG/etc/soma/genres \
|
|
|
|
$PKG/install $PKG/usr/doc/$PRGNAM-$VERSION
|
2009-08-26 17:00:38 +02:00
|
|
|
|
2012-09-26 03:10:42 +02:00
|
|
|
install -m 755 soma $PKG/usr/bin/soma
|
2018-11-29 06:53:27 +01:00
|
|
|
install -m 644 options.conf.new $PKG/etc/soma
|
|
|
|
install -m 644 stations.conf.new $PKG/etc/soma
|
2018-05-28 21:12:29 +02:00
|
|
|
install -m 644 themes/* $PKG/etc/soma/themes
|
2018-06-05 07:24:22 +02:00
|
|
|
install -m 644 genres/* $PKG/etc/soma/genres
|
2009-08-26 17:00:38 +02:00
|
|
|
|
2018-11-29 06:53:27 +01:00
|
|
|
cp -a README *.txt $PKG/usr/doc/$PRGNAM-$VERSION
|
2009-08-26 17:00:38 +02:00
|
|
|
|
|
|
|
cat $CWD/slack-desc > $PKG/install/slack-desc
|
2016-06-30 22:26:57 +02:00
|
|
|
zcat $CWD/doinst.sh.gz > $PKG/install/doinst.sh
|
2009-08-26 17:00:38 +02:00
|
|
|
|
|
|
|
cd $PKG
|
2018-11-29 06:53:27 +01:00
|
|
|
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD.${PKGTYPE:-txz}
|