diff options
Diffstat (limited to 'graphics/evolus-pencil/evolus-pencil.SlackBuild')
-rw-r--r-- | graphics/evolus-pencil/evolus-pencil.SlackBuild | 49 |
1 files changed, 41 insertions, 8 deletions
diff --git a/graphics/evolus-pencil/evolus-pencil.SlackBuild b/graphics/evolus-pencil/evolus-pencil.SlackBuild index 87d8087e0d..9421060bcc 100644 --- a/graphics/evolus-pencil/evolus-pencil.SlackBuild +++ b/graphics/evolus-pencil/evolus-pencil.SlackBuild @@ -1,5 +1,7 @@ #!/bin/sh +# Slackware build script for evolus-pencil + # Copyright 2010 Binh Nguyen <binhnguyen@fastmail.fm> # All rights reserved. # @@ -20,30 +22,61 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - PRGNAM=evolus-pencil -VERSION=1.2 -BUILD=${BUILD:-1} +VERSION=${VERSION:-1.2} +BUILD=${BUILD:-2} +APPBUILD=${APPBUILD:-0} TAG=${TAG:-_SBo} -ARCH=i386 - -RPMBUILD=0 +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i486 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi CWD=$(pwd) TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} +if [ "$ARCH" = "x86_64" ]; then + LIBDIRSUFFIX="64" +else + LIBDIRSUFFIX="" +fi + set -eu rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT -cd $PKG -rpm2cpio $CWD/$PRGNAM-$VERSION-$RPMBUILD.$ARCH.rpm | cpio -imdv +cd $TMP +rm -rf $PRGNAM-$VERSION +mkdir $PRGNAM-$VERSION +tar xvf $CWD/Pencil-$VERSION-$APPBUILD-linux-gtk.tar.gz -C $PRGNAM-$VERSION +cd $PRGNAM-$VERSION chown -R root:root . chmod -R u+w,go+r-w,a-s . +mkdir -p $PKG/usr/lib${LIBDIRSUFFIX}/$PRGNAM-$VERSION $PKG/usr/bin +cp -a * $PKG/usr/lib${LIBDIRSUFFIX}/$PRGNAM-$VERSION + +# Remove unnecessary stuff +rm $PKG/usr/lib${LIBDIRSUFFIX}/$PRGNAM-$VERSION/pencil +find $PKG/usr/lib${LIBDIRSUFFIX}/$PRGNAM-$VERSION -name "*~" -delete + +# Create start-up script for the app +cat <<EOT >$PKG/usr/bin/evoluspencil +#!/bin/sh +/usr/bin/xulrunner --app "/usr/lib${LIBDIRSUFFIX}/$PRGNAM-$VERSION/application.ini" +EOT +chmod 0755 $PKG/usr/bin/evoluspencil + +# Correct desktop file and put it in place +mkdir -p $PKG/usr/share/applications +sed "s/lib/lib${LIBDIRSUFFIX}/" $CWD/$PRGNAM.desktop > $PKG/usr/share/applications/$PRGNAM.desktop + mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild |