2021-07-03 19:48:15 +02:00
|
|
|
#!/bin/bash
|
2015-11-21 05:31:56 +01:00
|
|
|
|
|
|
|
# Slackware build script for tegaki-zinnia-japanese
|
|
|
|
# Issued under The MIT License (MIT)
|
|
|
|
#
|
|
|
|
# Copyright 2015 Kuro_CODE25
|
|
|
|
#
|
|
|
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
|
|
# of this software and associated documentation files (the "Software"), to deal
|
|
|
|
# in the Software without restriction, including without limitation the rights
|
|
|
|
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
|
|
# copies of the Software, and to permit persons to whom the Software is
|
|
|
|
# furnished to do so, subject to the following conditions:
|
|
|
|
#
|
|
|
|
# The above copyright notice and this permission notice shall be included in
|
|
|
|
# all copies or substantial portions of the Software.
|
|
|
|
#
|
|
|
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
|
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
|
|
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
|
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
|
|
# THE SOFTWARE.
|
|
|
|
|
2022-03-01 09:30:17 +01:00
|
|
|
# 20220222 bkw: Modified by SlackBuilds.org, BUILD=2:
|
|
|
|
# - fix build when TMP is set to something other than /tmp (srsly?!)
|
|
|
|
# - ARCH=noarch
|
|
|
|
# - just copy the files where they go instead of screwing around with
|
|
|
|
# sedding a Makefile so 'make install' works.
|
|
|
|
|
2021-07-04 11:41:06 +02:00
|
|
|
cd $(dirname $0) ; CWD=$(pwd)
|
|
|
|
|
2015-11-21 05:31:56 +01:00
|
|
|
PRGNAM=tegaki-zinnia-japanese
|
|
|
|
VERSION=${VERSION:-0.3}
|
2022-03-01 09:30:17 +01:00
|
|
|
BUILD=${BUILD:-2}
|
2015-11-21 05:31:56 +01:00
|
|
|
TAG=${TAG:-_SBo}
|
2021-07-04 12:23:38 +02:00
|
|
|
PKGTYPE=${PKGTYPE:-tgz}
|
2015-11-21 05:31:56 +01:00
|
|
|
|
2022-03-01 09:30:17 +01:00
|
|
|
ARCH=noarch
|
2015-11-21 05:31:56 +01:00
|
|
|
|
2021-07-04 12:23:38 +02:00
|
|
|
if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
|
|
|
|
echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
|
|
|
|
exit 0
|
|
|
|
fi
|
|
|
|
|
2015-11-21 05:31:56 +01:00
|
|
|
TMP=${TMP:-/tmp/SBo}
|
|
|
|
PKG=$TMP/package-$PRGNAM
|
|
|
|
OUTPUT=${OUTPUT:-/tmp}
|
|
|
|
|
|
|
|
set -e
|
|
|
|
|
|
|
|
rm -rf $PKG
|
|
|
|
mkdir -p $TMP $PKG $OUTPUT
|
|
|
|
cd $TMP
|
|
|
|
rm -rf $PRGNAM-$VERSION
|
|
|
|
unzip $CWD/$PRGNAM-$VERSION.zip
|
|
|
|
cd $PRGNAM-$VERSION
|
|
|
|
chown -R root:root .
|
2022-03-01 09:30:17 +01:00
|
|
|
chmod 644 *
|
2015-11-21 05:31:56 +01:00
|
|
|
|
2022-03-01 09:30:17 +01:00
|
|
|
DIR=$PKG/usr/share/tegaki/models/zinnia/
|
|
|
|
mkdir -p $DIR
|
|
|
|
cp -a handwriting-ja.m* $DIR
|
2015-11-21 05:31:56 +01:00
|
|
|
|
|
|
|
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
|
|
|
cp -a COPYING VERSION README.txt $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
|
|
|
|
|
|
|
|
cd $PKG
|
2021-07-04 12:23:38 +02:00
|
|
|
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
|