slackbuilds_ponce/system/artwiz-cursor/artwiz-cursor.SlackBuild
Kyle Guinn 98c36712f2 system/artwiz-cursor: Added (futuristic mouse cursor for X11)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
2013-03-03 12:59:05 -06:00

81 lines
2.9 KiB
Bash

#!/bin/sh
# Slackware build script for artwiz-cursor
# Copyright 2013 Kyle Guinn <elyk03@gmail.com>, USA
# 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=artwiz-cursor
VERSION=${VERSION:-1.3}
ARCH=noarch
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
SRCNAM=artwiz-aleczapka-en
DOCS="AUTHORS COPYING README"
set -e
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $SRCNAM-$VERSION
tar xvf $CWD/$SRCNAM-$VERSION.tar.bz2
cd $SRCNAM-$VERSION
chown -R root:root .
chmod -R u+w,go-w,a+rX-st .
# The x/font-cursor-misc package already contains a file named "cursor.pcf.gz".
# Rename the file in this package to "artwiz-cursor.pcf.gz" so we don't clobber
# the original. This also lets us have both packages installed simultaneously.
install -m 0644 -D cursor.pcf $PKG/usr/share/fonts/misc/artwiz-cursor.pcf
find $PKG/usr/share/fonts/misc -type f -exec gzip -9 {} \;
# It is possible to have both this package and x/font-cursor-misc installed at
# the same time. When mkfontdir runs, it will find that both files contain a
# font named "cursor", then will choose one (I don't know what criteria it
# uses) and will add an entry for it to the fonts.dir file. X will find the
# entry and use the corresponding cursor font file.
#
# To switch between cursor fonts, edit /usr/share/fonts/misc/fonts.dir and
# change the line
# cursor.pcf.gz cursor
# to
# artwiz-cursor.pcf.gz cursor
# then restart X.
#
# You may have to repeat this step every time you run mkfontdir in
# /usr/share/fonts/misc (such as after you add other fonts).
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a $DOCS $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}