2010-07-08 17:07:01 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
2010-08-22 18:08:14 +02:00
|
|
|
# Slackware build script for evolus-pencil
|
|
|
|
|
2017-01-04 21:49:52 +01:00
|
|
|
# Ryan P.C. McQuen | Everett, WA | ryanpcmcquen@member.fsf.org
|
2014-07-23 19:15:30 +02:00
|
|
|
|
2012-09-25 02:27:24 +02:00
|
|
|
# Copyright 2010, 2012 Binh Nguyen <binhvng@gmail.com>
|
2010-07-08 17:07:01 +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.
|
|
|
|
|
|
|
|
PRGNAM=evolus-pencil
|
2014-07-23 19:15:30 +02:00
|
|
|
SRCNAM=pencil
|
|
|
|
VERSION=${VERSION:-2.0.5}
|
2016-05-13 14:29:01 +02:00
|
|
|
BUILD=${BUILD:-2}
|
2014-07-23 19:15:30 +02:00
|
|
|
APPBUILD=${APPBUILD:-1.fc19}
|
2010-07-08 17:07:01 +02:00
|
|
|
TAG=${TAG:-_SBo}
|
2012-09-25 02:27:24 +02:00
|
|
|
ARCH=noarch
|
2010-07-08 17:07:01 +02:00
|
|
|
|
|
|
|
CWD=$(pwd)
|
|
|
|
TMP=${TMP:-/tmp/SBo}
|
|
|
|
PKG=$TMP/package-$PRGNAM
|
|
|
|
OUTPUT=${OUTPUT:-/tmp}
|
|
|
|
|
|
|
|
set -eu
|
|
|
|
|
|
|
|
rm -rf $PKG
|
|
|
|
mkdir -p $TMP $PKG $OUTPUT
|
2012-09-25 02:27:24 +02:00
|
|
|
cd $PKG
|
2014-07-23 19:15:30 +02:00
|
|
|
rpm2cpio < $CWD/$SRCNAM-$VERSION-$APPBUILD.noarch.rpm | cpio -imdv
|
2010-07-08 17:07:01 +02:00
|
|
|
chown -R root:root .
|
2013-11-25 12:23:31 +01:00
|
|
|
find -L . \
|
|
|
|
\( -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 \
|
2014-07-23 19:15:30 +02:00
|
|
|
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
|
2010-07-08 17:07:01 +02:00
|
|
|
|
2012-09-25 02:27:24 +02:00
|
|
|
# Increase MaxVersion requirement to work with newer xulrunner.
|
|
|
|
# Don't worry, it works.
|
2014-07-23 19:15:30 +02:00
|
|
|
sed -i 's/MaxVersion=14/MaxVersion=15/' $PKG/usr/share/$SRCNAM/application.ini
|
2010-08-22 18:08:14 +02:00
|
|
|
|
2016-05-13 14:29:01 +02:00
|
|
|
# Replace it with firefox
|
|
|
|
sed -i "s|xulrunner|firefox|" $PKG/usr/bin/pencil
|
|
|
|
|
2010-07-08 17:07:01 +02:00
|
|
|
mkdir -p $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
|
|
|
|
cat $CWD/doinst.sh > $PKG/install/doinst.sh
|
|
|
|
|
|
|
|
cd $PKG
|
|
|
|
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
|