summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--audio/audtty/audtty.SlackBuild3
-rw-r--r--audio/audtty/doinst.sh14
2 files changed, 17 insertions, 0 deletions
diff --git a/audio/audtty/audtty.SlackBuild b/audio/audtty/audtty.SlackBuild
index efe0bc6dfc..019f098fee 100644
--- a/audio/audtty/audtty.SlackBuild
+++ b/audio/audtty/audtty.SlackBuild
@@ -92,6 +92,8 @@ CXXFLAGS="$SLKCFLAGS" \
make install DESTDIR=$PKG
+mv $PKG/etc/audtty.conf $PKG/etc/audtty.conf.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
@@ -106,6 +108,7 @@ 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/audio/audtty/doinst.sh b/audio/audtty/doinst.sh
new file mode 100644
index 0000000000..fcf851475a
--- /dev/null
+++ b/audio/audtty/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/audtty.conf.new \ No newline at end of file