From: Not Zed Date: Mon, 23 Dec 2019 21:08:54 +0000 (+1030) Subject: Add dist target. X-Git-Url: https://code.zedzone.au/cvs?a=commitdiff_plain;h=9400a9883b395d46702bba55d17b97a9b130c907;p=busymon Add dist target. Add slackbuild scripts. --- diff --git a/Makefile b/Makefile index 6252048..ffbcd10 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,6 @@ +VERSION=-0 + JAVAFX_HOME=/usr/lib64/javafx-sdk-13 CFLAGS=-Wall -Wno-parentheses @@ -39,4 +41,11 @@ install: bin/notzed.busyalert.jar bin/busymon install -D bin/notzed.busyalert.jar $(DESTDIR)$(prefix)/share/notzed.busyalert/notzed.busyalert.jar install -D bin/busymon $(DESTDIR)$(prefix)/bin/busymon +dist: + tar cfz busymon$(VERSION).tar.gz \ + --xform 's@^@busymon$(VERSION)/@' \ + COPYING README Makefile \ + src/busyalert.in src/busymon.c \ + $(notzed.busyalert_JAVA) \ + contrib diff --git a/contrib/slackbuild/busymon.SlackBuild b/contrib/slackbuild/busymon.SlackBuild new file mode 100755 index 0000000..d6b8560 --- /dev/null +++ b/contrib/slackbuild/busymon.SlackBuild @@ -0,0 +1,71 @@ +#!/bin/sh +# + +PRGNAM="busymon" +VERSION=${VERSION:-0} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} + +PREFIX=${PREFIX:-/usr} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +CWD=$(pwd) +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i486" ]; then + SLKCFLAGS="-O2 -march=i486 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC -march=native" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +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 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +make +make install prefix=/usr DESTDIR=$PKG + +strip --strip-unneeded $PKG/usr/bin/busymon + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + 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 + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz} diff --git a/contrib/slackbuild/busymon.info b/contrib/slackbuild/busymon.info new file mode 100644 index 0000000..6da6834 --- /dev/null +++ b/contrib/slackbuild/busymon.info @@ -0,0 +1,10 @@ +PRGNAM="busymon" +VERSION="0" +HOMEPAGE="https://www.zedzone.space/software/busymon.html" +DOWNLOAD="" +MD5SUM="1760aa36a9d0f786a3cb093a6749a41e" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="" +MAINTAINER="!zed" +EMAIL="notzed@gmail.com" diff --git a/contrib/slackbuild/slack-desc b/contrib/slackbuild/slack-desc new file mode 100644 index 0000000..a0b60c7 --- /dev/null +++ b/contrib/slackbuild/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +busymon: busymon +busymon: +busymon: Tells you when you're on the computer too long. +busymon: +busymon: +busymon: +busymon: +busymon: +busymon: +busymon: +busymon: