diff options
author | Симон Болоканов <sbolokanov@abv.bg> | 2016-04-03 17:50:44 +0300 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2016-04-03 21:44:59 -0500 |
commit | a60d6cca8dd55484ea26f9ebdfc2325df901c384 (patch) | |
tree | fa1975efd6f64506f97b27b44eedc71399d20d8b /desktop | |
parent | 6a1f8e473713af22d746cf0f0e86419577a64ec0 (diff) |
desktop/dunst: don't clobber config, info update
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/dunst/doinst.sh | 14 | ||||
-rw-r--r-- | desktop/dunst/dunst.SlackBuild | 11 | ||||
-rw-r--r-- | desktop/dunst/dunst.info | 2 |
3 files changed, 23 insertions, 4 deletions
diff --git a/desktop/dunst/doinst.sh b/desktop/dunst/doinst.sh new file mode 100644 index 0000000000000..c3a0ab28b9952 --- /dev/null +++ b/desktop/dunst/doinst.sh @@ -0,0 +1,14 @@ +config() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + # If there's no config file by that name, mv it over: + if [ ! -r $OLD ]; then + mv $NEW $OLD + elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then + # toss the redundant copy + rm $NEW + fi + # Otherwise, we leave the .new copy for the admin to consider... +} + +config etc/xdg/dunst/dunstrc.new diff --git a/desktop/dunst/dunst.SlackBuild b/desktop/dunst/dunst.SlackBuild index 6f2ca6f49fe13..41987c224432a 100644 --- a/desktop/dunst/dunst.SlackBuild +++ b/desktop/dunst/dunst.SlackBuild @@ -1,6 +1,6 @@ #!/bin/sh -# Copyright (c) 2014, Симон Болоканов, България +# Copyright (c) 2014-2016 Симонъ С. Болокановъ – Бдинъ, България # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -20,15 +20,16 @@ # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# Written by Симон Болоканов <sbolokanov@abv.bg> +# Written by Симонъ С. Болокановъ <sbolokanov@abv.bg> # changelog: # v1.0.0 - Simon Bolokanov # v1.1.0 - revised for SBo - 09.10.2014 # 15.3.2015 - main site is down, fixed download url. Made some script clean ups +# 3.4.2016 - don't clobber the config PRGNAM=dunst VERSION=${VERSION:-1.1.0} -BUILD=${BUILD:-2} +BUILD=${BUILD:-3} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then @@ -83,6 +84,9 @@ make DESTDIR=$PKG \ MANPREFIX=/usr/man \ install +# Don't clobber the default config +mv $PKG/etc/xdg/dunst/dunstrc $PKG/etc/xdg/dunst/dunstrc.new + find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true @@ -96,6 +100,7 @@ cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild mkdir -pv $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/desktop/dunst/dunst.info b/desktop/dunst/dunst.info index 70f69b81e5309..457613fcc932b 100644 --- a/desktop/dunst/dunst.info +++ b/desktop/dunst/dunst.info @@ -6,5 +6,5 @@ MD5SUM="b44c0cb8ed62e3d1d1bc899615170f3d" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="libxdg-basedir" -MAINTAINER="Симон Болоканов" +MAINTAINER="Симонъ С. Болокановъ" EMAIL="sbolokanov@abv.bg" |