diff options
-rw-r--r-- | academic/wmcalc/README | 18 | ||||
-rw-r--r-- | academic/wmcalc/doinst.sh | 12 | ||||
-rw-r--r-- | academic/wmcalc/wmcalc.SlackBuild | 51 | ||||
-rw-r--r-- | academic/wmcalc/wmcalc.info | 8 |
4 files changed, 53 insertions, 36 deletions
diff --git a/academic/wmcalc/README b/academic/wmcalc/README index 99cffddb44bb9..464a9dc1a2a9c 100644 --- a/academic/wmcalc/README +++ b/academic/wmcalc/README @@ -1,9 +1,11 @@ -wmcalc is a program designed to act as a simple four-function calculator. It is different from other -calculator programs, however in that it is designed to take up very little desktop space. As such, it -can be left running on the desktop at all times. +wmcalc is a program designed to act as a simple four-function calculator. +It is different from other calculator programs, however in that it is +designed to take up very little desktop space. As such, it can be left +running on the desktop at all times. -Note: The coding of this DockApp seems incredibly unorganized and there are several xpm's that are -almost the same thing. It also seems that for whatever reason the author uses a xpm with the default -WM backdrop, meaning it wont fit in with themed desktops. I may have a patch in the future that fixes -this and also make it use "wmcalc1.xpm". For now, enjoy it for what it is, a simple WindowMaker -calculator. +Note: The coding of this DockApp seems incredibly unorganized and there +are several xpm's that are almost the same thing. It also seems that +for whatever reason the author uses a xpm with the default WM backdrop, +meaning it wont fit in with themed desktops. I may have a patch in the +future that fixes this and also make it use "wmcalc1.xpm". For now, +enjoy it for what it is, a simple WindowMaker calculator. diff --git a/academic/wmcalc/doinst.sh b/academic/wmcalc/doinst.sh new file mode 100644 index 0000000000000..191f7201088a2 --- /dev/null +++ b/academic/wmcalc/doinst.sh @@ -0,0 +1,12 @@ + +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then + rm $NEW + fi +} + +config etc/wmcalc.conf.new diff --git a/academic/wmcalc/wmcalc.SlackBuild b/academic/wmcalc/wmcalc.SlackBuild index f8e9169fd60f1..27383497f1954 100644 --- a/academic/wmcalc/wmcalc.SlackBuild +++ b/academic/wmcalc/wmcalc.SlackBuild @@ -2,7 +2,7 @@ # Slackware build script for wmcalc # -# Copyright 2015 Gethyn ThomasQuail <gethyn@bloodbathsoftworks.com> +# Copyright 2015 Gethyn ThomasQuail <email removed> # All rights reserved. # # Based on: @@ -25,15 +25,26 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# Now maintained by B. Watson <yalhcru@gmail.com> + +# 20160816 bkw: +# - take over maintenance +# - BUILD=2 +# - install binary stripped +# - actually use SLKCFLAGS +# - don't install extra copy of wmcalc.conf in doc dir +# - use .new for the config file, add doinst.sh +# - i486 => i586 +# - use tarball hosted on naptime, to avoid md5sum mismatches + PRGNAM=wmcalc VERSION=${VERSION:-0.5} -ARCHIVEFIX=dockapps-c2f0ad2 # This is because the archive is named incorrectly. -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then case "$( uname -m )" in - i?86) ARCH=i486 ;; + i?86) ARCH=i586 ;; arm*) ARCH=arm ;; *) ARCH=$( uname -m ) ;; esac @@ -44,8 +55,8 @@ TMP=${TMP:-/tmp/SBo} PKG=$TMP/package-$PRGNAM OUTPUT=${OUTPUT:-/tmp} -if [ "$ARCH" = "i486" ]; then - SLKCFLAGS="-O2 -march=i486 -mtune=i686" +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" LIBDIRSUFFIX="" elif [ "$ARCH" = "i686" ]; then SLKCFLAGS="-O2 -march=i686 -mtune=i686" @@ -63,9 +74,9 @@ set -e rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP -rm -rf $ARCHIVEFIX -tar xvf $CWD/$ARCHIVEFIX.tar.gz -cd $ARCHIVEFIX +rm -rf $PRGNAM-$VERSION +tar xvf $CWD/$PRGNAM-$VERSION.tar.gz +cd $PRGNAM-$VERSION chown -R root:root . find -L . \ \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ @@ -73,28 +84,20 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; -# Let's compile! -make -make install DESTDIR=$PKG - -# Create bin directory and move executable there -mkdir -p $PKG/usr/bin -mv $PKG/usr/local/bin/wmcalc $PKG/usr/bin - -# Creates man page directory -mkdir -p $PKG/usr/man/man1 +make CFLAGS="$SLKCFLAGS" +strip $PRGNAM +make install DESTDIR=$PKG PREFIX=/usr MANDIR=/usr/man/man1 +gzip -9 $PKG/usr/man/man1/$PRGNAM.1 -# Compresses man page and moves it into place -gzip -9 $PKG/usr/local/share/man/man1/wmcalc.1 -mv $PKG/usr/local/share/man/man1/wmcalc.1.gz $PKG/usr/man/man1 -rm -rf $PKG/usr/local +mv $PKG/etc/$PRGNAM.conf $PKG/etc/$PRGNAM.conf.new mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION -cp -a COPYING wmcalc.conf README $PKG/usr/doc/$PRGNAM-$VERSION +cp -a COPYING README $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} diff --git a/academic/wmcalc/wmcalc.info b/academic/wmcalc/wmcalc.info index ad8f27f5665bf..6cffd7234f0da 100644 --- a/academic/wmcalc/wmcalc.info +++ b/academic/wmcalc/wmcalc.info @@ -1,10 +1,10 @@ PRGNAM="wmcalc" VERSION="0.5" HOMEPAGE="http://windowmaker.org/dockapps/?name=wmcalc" -DOWNLOAD="http://repo.or.cz/w/dockapps.git/snapshot/c2f0ad2882b89c5c33dfb8331c1f05ca284e7c36.tar.gz" -MD5SUM="ab62320662b38475a6882844266ad032" +DOWNLOAD="http://urchlay.naptime.net/~urchlay/src/wmcalc-0.5.tar.gz" +MD5SUM="212f8404d490bdd1c6dd20fd97022564" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" -MAINTAINER="Gethyn ThomasQuail" -EMAIL="gethyn@bloodbathsoftworks.com" +MAINTAINER="B. Watson" +EMAIL="yalhcru@gmail.com" |