diff --git a/xap/hptalx/SlackBuild b/xap/hptalx/SlackBuild new file mode 100755 index 00000000..ee6627ad --- /dev/null +++ b/xap/hptalx/SlackBuild @@ -0,0 +1,65 @@ +#!/bin/bash +set -x -e + +CWD=$(pwd) + +PRGNAM=$(basename $CWD) +ARCH=$(uname -m) +BUILD=1 +VERSION=${VERSION:-1.3.1a} + +TAG=gwh +OUTPUT=/tmp +TMP=/tmp/$TAG +PKG=$TMP/pkg-$PRGNAM +PREFIX=/usr + +REPOSITORY=${REPOSITORY:-/home/installs/SlackBuilds/repositories/$PRGNAM} + +mkdir -p $REPOSITORY + +# cleaning +rm -fr $PKG $TMP + +# download +[ ! -e $REPOSITORY/${PRGNAM}-${VERSION}.tar.gz ] && wget -c https://master.dl.sourceforge.net/project/hptalx/hptalx/${VERSION}/hptalx-${VERSION}.tar.bz2?viasf=1 -O $REPOSITORY/${PRGNAM}-${VERSION}.tar.gz + +# installation +mkdir -p $PKG $TMP +cd $TMP +tar xvf $REPOSITORY/${PRGNAM}-${VERSION}.tar.gz +cd ${PRGNAM}-${VERSION} + +./configure \ + --prefix=$PREFIX \ + --mandir=$PREFIX/man \ + --docdir=$PREFIX/doc/$PRGNAM \ + --libdir=$PREFIX/lib$(uname -m | grep -o 64) + +make + +make install DESTDIR=$PKG + +mkdir -p $PKG$PREFIX/doc/$PRGNAM +cp -R doc/ AUTHORS BUGS COPYING ChangeLog INSTALL NEWS NOTE README README.hp49gplus ToDo $PKG$PREFIX/doc/$PRGNAM +chmod 644 $PKG$PREFIX/doc/$PRGNAM/* + +# packaging +cd $PKG +mkdir install +cat < install/slack-desc +$PRGNAM: $PRGNAM (HP Calculator<->PC communications program) +$PRGNAM: +$PRGNAM: This is HPTalx, a HP Calculator<->PC communications program for Linux, +$PRGNAM: initially written by Bruno Barberi Gnecco, extended by Rafael Ostertag +$PRGNAM: and released under the GNU Public License. +$PRGNAM: +$PRGNAM: +$PRGNAM: +$PRGNAM: +$PRGNAM: http://hptalx.sourceforge.net/index.shtml +$PRGNAM: +EOF + +rm -f $PKG/{,usr/}lib$(uname -m | grep -o 64)/*.la +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-${VERSION}-$ARCH-$BUILD$TAG.txz