aboutsummaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
authorStu Miller <slackbuilds@go4it2day.com>2018-05-23 07:19:53 +0700
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2018-05-23 07:19:53 +0700
commitc4318caa5f678d72065cfb84661420017e6d896d (patch)
tree0558605d44b4bfbdde1a5657e282664856aeb882 /audio
parenta2ffb4cbe7f5f5cf4912d8a4783ba87a39959255 (diff)
audio/clockchimes: Updated for version 0.3.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'audio')
-rw-r--r--audio/clockchimes/README33
-rw-r--r--audio/clockchimes/clockchimes.SlackBuild63
-rw-r--r--audio/clockchimes/clockchimes.info8
-rw-r--r--audio/clockchimes/doinst.sh42
-rw-r--r--audio/clockchimes/slack-desc6
5 files changed, 85 insertions, 67 deletions
diff --git a/audio/clockchimes/README b/audio/clockchimes/README
index dd00f0fa508d..f9cd276541e9 100644
--- a/audio/clockchimes/README
+++ b/audio/clockchimes/README
@@ -1,9 +1,30 @@
Clockchimes creates a cron job that runs a sox based bash script.
The script plays clock chime sound files based on the system time.
-The initial releases play Westminster chimes on the 15 minute,
-30 minute, 45 minute and top of the hour.
+As of v0.3 the script plays multiple chime types:
+ * Ave Maria
+ * Voice sample
+ * Westminster (default)
+ * Whittington
-The installation script modifies /var/spool/cron/crontabs/root file
-or creates the /var/spool/cron/crontabs/root file if it doesn't exist. If
-the user uninstalls clockchimes then the user should manually remove
-the root crontab entry.
+The package installs a config file: /etc/clockchimes.conf.
+The config file enables the selection of:
+ * chime type
+ * play either, or both, chimes and strikes
+ * increase or decrease volume
+
+The package has sample KDE desktop files that enable single-click
+changing of the chime type played. The files can be found at
+/usr/doc/clockchimes-x.x/ and copied to the KDE desktop:
+ * Ave Maria Chimes.desktop
+ * Westminster Chimes.desktop
+ * Whittington Chimes.desktop
+ * Voice Sample.desktop
+
+The package installs a crontab file: /etc/cron.d/clockchimes
+The crontab runs the script on:
+ * 00, 15, 30 & 45 minute
+
+The package no longer modifies /var/spool/cron/crontabs/root file. Instead
+the package installs /etc/cron.d/clockchimes as the controlling crontab.
+The user no longer has to manually remove crontab entries after an uninstall
+of clockchimes-03 or greater.
diff --git a/audio/clockchimes/clockchimes.SlackBuild b/audio/clockchimes/clockchimes.SlackBuild
index 6abc4603dc06..92c10405b76a 100644
--- a/audio/clockchimes/clockchimes.SlackBuild
+++ b/audio/clockchimes/clockchimes.SlackBuild
@@ -23,37 +23,17 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=clockchimes
-VERSION=${VERSION:-0.2}
+VERSION=${VERSION:-0.3}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
-if [ -z "$ARCH" ]; then
- case "$( uname -m )" in
- i?86) ARCH=i586 ;;
- arm*) ARCH=arm ;;
- *) ARCH=$( uname -m ) ;;
- esac
-fi
+ARCH=noarch
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
-if [ "$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"
- LIBDIRSUFFIX="64"
-else
- SLKCFLAGS="-O2"
- LIBDIRSUFFIX=""
-fi
-
set -e
rm -rf $PKG
@@ -69,18 +49,41 @@ 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 {} \;
-mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
-cp -a CHANGELOG README $PKG/usr/doc/$PRGNAM-$VERSION/
+mkdir -p $PKG/etc/cron.d
+cp -a \
+ clockchimes.new \
+ $PKG/etc/cron.d/
+cp -a \
+ clockchimes.conf.new \
+ $PKG/etc/
+
+mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION/kde
+cp -a \
+ kde/* \
+ $PKG/usr/doc/$PRGNAM-$VERSION/kde
+cp -a \
+ CHANGELOG \
+ README \
+ $PKG/usr/doc/$PRGNAM-$VERSION/
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
-mkdir -p $PKG/usr/share/sounds/$PRGNAM/westminster
-cp -a westminster/* $PKG/usr/share/sounds/$PRGNAM/westminster
+mkdir -p $PKG/usr/bin
+cp -a \
+ clockchimes \
+ $PKG/usr/bin/
-mkdir -p $PKG/etc
-cp -a clockchimes.conf.new $PKG/etc/
+mkdir -p $PKG/usr/libexec/$PRGNAM
+cp -a \
+ libexec/* \
+ $PKG/usr/libexec/$PRGNAM/
-mkdir -p $PKG/usr/bin
-cp -a clockchimes $PKG/usr/bin/
+for ARG in avemaria westminster whittington voice
+ do
+ mkdir -p $PKG/usr/share/sounds/$PRGNAM/$ARG
+ cp -a \
+ sounds/$ARG/* \
+ $PKG/usr/share/sounds/$PRGNAM/$ARG
+ done
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
diff --git a/audio/clockchimes/clockchimes.info b/audio/clockchimes/clockchimes.info
index e3070c8fb04f..a5cc0dead279 100644
--- a/audio/clockchimes/clockchimes.info
+++ b/audio/clockchimes/clockchimes.info
@@ -1,8 +1,8 @@
PRGNAM="clockchimes"
-VERSION="0.2"
-HOMEPAGE="https://www.go4it2day.com/news/clockchimes-0.2.html"
-DOWNLOAD="https://www.go4it2day.com/downloads/clockchimes-0.2.tar.gz"
-MD5SUM="5f7311e89c0cedf17225c19d76cc50b0"
+VERSION="0.3"
+HOMEPAGE="https://www.go4it2day.com/news/clockchimes-0.3.html"
+DOWNLOAD="https://www.go4it2day.com/downloads/clockchimes/0.3/clockchimes-0.3.tar.gz"
+MD5SUM="2e398cd17239c3b6940597217f7db197"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""
diff --git a/audio/clockchimes/doinst.sh b/audio/clockchimes/doinst.sh
index 8aa71f082f8e..58ef63dfcefe 100644
--- a/audio/clockchimes/doinst.sh
+++ b/audio/clockchimes/doinst.sh
@@ -14,30 +14,24 @@ config() {
}
config etc/clockchimes.conf.new
+config etc/cron.d/clockchimes.new
-# root crontab missing?
-if [ ! -e /var/spool/cron/crontabs/root ]; then
- # true: crontab missing, create crontab and set permissions
- touch /var/spool/cron/crontabs/root
- chmod 0600 /var/spool/cron/crontabs/root
-fi # END crontab missing
+# clean root crontab from versions before v0.3
+grep 'clockchimes' /var/spool/cron/crontabs/root 1>/dev/null
+if [ $? -eq 0 ]; then
+ grep -v 'clockchimes' > /var/spool/cron/crontabs/root
+fi # END clean root crontab
-# root crontab not updated?
-grep "# clockchimes" /var/spool/cron/crontabs/root 1> /dev/null
-if [ $? -ne 0 ]; then
- # true: crontab not updated, update with clockchimes
- cat << EOF >> /var/spool/cron/crontabs/root
-# clockchimes
-0,15,30,45 * * * * /usr/bin/clockchimes 1> /dev/null
-EOF
+# kill crond if running
+ps -C crond 1>/dev/null
+if [ $? -eq 0 ]; then
+ # true: kill crond
+ killall crond 1>/dev/null
+fi # END crond running
- # crond running?
- ps -C crond 1>/dev/null
- if [ $? -eq 0 ]; then
- # true: crond running, reload crond
- crontab /var/spool/cron/crontabs/root 1> /dev/null
- else
- # false: crond not running, start crond
- /usr/sbin/crond -l notice
- fi # END crond running
-fi # END crontab not updated
+# start crond if not running
+ps -C crond 1>/dev/null
+if [ $? -ne 0 ]; then
+ # true: start crond
+ /usr/sbin/crond -l notice
+fi # END crond running
diff --git a/audio/clockchimes/slack-desc b/audio/clockchimes/slack-desc
index 173e25f84485..3fbc3e533e3a 100644
--- a/audio/clockchimes/slack-desc
+++ b/audio/clockchimes/slack-desc
@@ -10,10 +10,10 @@ clockchimes: clockchimes (plays clock chimes based on the system time)
clockchimes:
clockchimes: Clockchimes creates a cron job that runs a sox based bash script.
clockchimes: The script plays clock chime sound files based on the system time.
-clockchimes: The initial releases play Westminster chimes on the 15 minute,
-clockchimes: 30 minute, 45 minute and top of the hour.
+clockchimes: The script plays selectable chime types on the 00 minute, 15 minute,
+clockchimes: 30 minute, 45 minute.
clockchimes:
-clockchimes: Home: https://www.go4it2day.com/news/clockchimes-0.2.html
+clockchimes: Home: https://www.go4it2day.com/news/clockchimes-0.3-beta.html
clockchimes:
clockchimes:
clockchimes: