2009-08-26 10:00:38 -05:00
|
|
|
#!/bin/sh
|
|
|
|
|
2012-09-26 01:10:42 +00:00
|
|
|
# Slackware build script for soma
|
|
|
|
# Copyright 2010-2011 David Woodfall <dave@dawoodfall.net>
|
|
|
|
# Copyright 2011, 2012 Patrick J. Volkerding, Sebeka, MN, USA
|
2009-08-26 10:00:38 -05: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.
|
|
|
|
|
2012-09-26 01:10:42 +00:00
|
|
|
PKGNAM=soma
|
|
|
|
VERSION=${VERSION:-2.8.5}
|
2009-08-26 10:00:38 -05:00
|
|
|
ARCH=noarch
|
|
|
|
BUILD=${BUILD:-1}
|
2012-09-26 01:10:42 +00:00
|
|
|
TAG=${TAG:-}
|
2009-08-26 10:00:38 -05:00
|
|
|
|
|
|
|
CWD=$(pwd)
|
|
|
|
TMP=${TMP:-/tmp}
|
2010-05-19 08:58:23 +00:00
|
|
|
PKG=$TMP/package-$PKGNAM
|
2012-09-26 01:10:42 +00:00
|
|
|
OUTPUT=${OUTPUT:-/tmp}
|
|
|
|
|
|
|
|
set -e
|
2009-08-26 10:00:38 -05:00
|
|
|
|
|
|
|
rm -rf $PKG
|
2012-09-26 01:10:42 +00:00
|
|
|
mkdir -p $TMP $PKG $OUTPUT
|
|
|
|
cd $TMP
|
2010-05-19 08:58:23 +00:00
|
|
|
rm -rf $PKGNAM-$VERSION
|
2012-09-26 01:10:42 +00:00
|
|
|
tar xvf $CWD/$PKGNAM-$VERSION.tar.gz
|
|
|
|
cd $PKGNAM-$VERSION
|
2009-08-26 10:00:38 -05: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 {} \;
|
|
|
|
|
2012-09-26 01:10:42 +00:00
|
|
|
mkdir -p $PKG/usr/bin $PKG/etc/soma $PKG/install $PKG/usr/doc/$PKGNAM-$VERSION
|
2009-08-26 10:00:38 -05:00
|
|
|
|
2012-09-26 01:10:42 +00:00
|
|
|
install -m 755 soma $PKG/usr/bin/soma
|
|
|
|
install --m 644 options.conf $PKG/etc/soma
|
|
|
|
install --m 644 stations.conf $PKG/etc/soma
|
|
|
|
install --m 644 dialogrc $PKG/etc/soma
|
2009-08-26 10:00:38 -05:00
|
|
|
|
|
|
|
cp -a \
|
2012-09-26 01:10:42 +00:00
|
|
|
README \
|
2010-05-19 08:58:23 +00:00
|
|
|
$PKG/usr/doc/$PKGNAM-$VERSION
|
2009-08-26 10:00:38 -05:00
|
|
|
|
2012-09-26 01:10:42 +00:00
|
|
|
#cat $CWD/$PKGNAM.SlackBuild > $PKG/usr/doc/$PKGNAM-$VERSION/$PKGNAM.SlackBuild
|
2009-08-26 10:00:38 -05:00
|
|
|
cat $CWD/slack-desc > $PKG/install/slack-desc
|
|
|
|
|
|
|
|
cd $PKG
|
2012-09-26 01:10:42 +00:00
|
|
|
/sbin/makepkg -l y -c n $OUTPUT/$PKGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-txz}
|
2009-08-26 10:00:38 -05:00
|
|
|
|