slackbuilds/xap/hp49flash/SlackBuild

61 lines
1.3 KiB
Text
Raw Normal View History

2021-11-14 14:18:11 +01:00
#!/bin/bash
set -x -e
CWD=$(pwd)
PRGNAM=$(basename $CWD)
ARCH=$(uname -m)
BUILD=1
VERSION=${VERSION:-0.2.3}
TAG=gwh
OUTPUT=/tmp
TMP=/tmp/$TAG
PKG=$TMP/pkg-$PRGNAM
PREFIX=/usr
2022-01-22 19:52:02 +01:00
REPOSITORY=${REPOSITORY:-/home/installs/SlackBuilds/_repositories/$PRGNAM}
2021-11-14 14:18:11 +01:00
mkdir -p $REPOSITORY
# cleaning
rm -fr $PKG $TMP
# download
[ ! -e $REPOSITORY/${PRGNAM}-${VERSION}.tar.gz ] && wget -c https://www.hpcalc.org/hp49/pc/rom/hp49fl02.tgz -O $REPOSITORY/${PRGNAM}-${VERSION}.tar.gz
# installation
mkdir -p $PKG $TMP
cd $TMP
tar xvf $REPOSITORY/${PRGNAM}-${VERSION}.tar.gz
cd ${PRGNAM}-${VERSION}
make
mkdir -p $PKG$PREFIX/bin
cp upgrade $PKG$PREFIX/bin/$PRGNAM
mkdir -p $PKG$PREFIX/doc/$PRGNAM
cp Changes FileFormat GPL Protocol README ToDo $PKG$PREFIX/doc/$PRGNAM
chmod 644 $PKG$PREFIX/doc/$PRGNAM/*
# packaging
cd $PKG
mkdir install
cat <<EOF > install/slack-desc
$PRGNAM: $PRGNAM (program to update the HP 49G's ROM under Linux.)
$PRGNAM:
$PRGNAM: GPL source code for a program to update the HP 49G's ROM under Linux.
$PRGNAM: Works with either a GTK graphical interface or a command line interface.
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM:
$PRGNAM: https://www.hpcalc.org/details/3242
$PRGNAM:
EOF
rm -f $PKG/{,usr/}lib$(uname -m | grep -o 64)/*.la
2023-08-16 12:23:26 +02:00
/sbin/makepkg --linkadd y --chown n --prepend $OUTPUT/$PRGNAM-${VERSION}-$ARCH-$BUILD$TAG.txz