diff options
Diffstat (limited to 'system/cdemu-daemon/cdemu-daemon.SlackBuild')
-rw-r--r-- | system/cdemu-daemon/cdemu-daemon.SlackBuild | 38 |
1 files changed, 22 insertions, 16 deletions
diff --git a/system/cdemu-daemon/cdemu-daemon.SlackBuild b/system/cdemu-daemon/cdemu-daemon.SlackBuild index 136050e531..514b798a13 100644 --- a/system/cdemu-daemon/cdemu-daemon.SlackBuild +++ b/system/cdemu-daemon/cdemu-daemon.SlackBuild @@ -4,7 +4,7 @@ # Copyright 2008 Niklas "Nille" Åkerström # Copyright 2010-2013 Niels Horn, Rio de Janeiro, RJ, Brazil <niels.horn@gmail.com> -# Copyright 2018-2020 Isaac Yu <isaacyu1@isaacyu1.com> +# Copyright 2018-2022 Isaac Yu <isaacyu1@isaacyu1.com> # All rights reserved. # # Redistribution and use of this script, with or without modification, is @@ -27,7 +27,7 @@ cd $(dirname $0) ; CWD=$(pwd) PRGNAM=cdemu-daemon -VERSION=${VERSION:-3.2.4} +VERSION=${VERSION:-3.2.6} BUILD=${BUILD:-1} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -74,7 +74,7 @@ rm -rf $PKG mkdir -p $TMP $PKG $OUTPUT cd $TMP rm -rf $PRGNAM-$VERSION -tar xvf $CWD/$PRGNAM-$VERSION.tar.bz2 +tar xvf $CWD/$PRGNAM-$VERSION.tar.xz cd $PRGNAM-$VERSION chown -R root:root . find -L . \ @@ -96,23 +96,29 @@ cd build make install DESTDIR=$PKG cd .. -# Fix standard configuration to make it more "Slackware"-like -sed \ - -e "/^LOG_FILE/s|/tmp/|/var/log/|" \ - -e "/^CONFIG_FILE/s|/etc/sysconfig/|/etc/|" \ - -i $PKG/usr/libexec/$PRGNAM-system.sh - -# Fix a silly error in the dbus file -sed \ - -e "/^Name=/s/CdemuDaemon/CDEmuDaemon/" \ - -i $PKG/usr/share/dbus-1/system-services/net.sf.cdemu.CDEmuDaemon.service - # Install init script mkdir -p $PKG/etc/rc.d install -m 0755 $CWD/rc.cdemud $PKG/etc/rc.d/rc.cdemud.new -# dbus and udev rules -mv $PKG/etc/dbus-1/system.d/cdemu-daemon-dbus.conf \ +# Install systemd sample services +mkdir -p $PKG/usr/lib/systemd/user +cp $TMP/$PRGNAM-$VERSION/service-example/cdemu-daemon.service \ + $PKG/usr/lib/systemd/user/cdemu-daemon.service +mkdir -p $PKG/usr/share/dbus-1/services +cp $TMP/$PRGNAM-$VERSION/service-example/net.sf.cdemu.CDEmuDaemon.service \ + $PKG/usr/share/dbus-1/services/net.sf.cdemu.CDEmuDaemon.service + +# Adapt systemd service for Slackware +sed \ + -e "/^SystemdService/d" \ + -e "/^Exec=/s|/bin/true|/usr/libexec/cdemu-daemon-session.sh|" \ + -i $PKG/usr/share/dbus-1/services/net.sf.cdemu.CDEmuDaemon.service +mkdir -p $PKG/usr/libexec +cp $CWD/config/cdemu-daemon-session.sh $PKG/usr/libexec/cdemu-daemon-session.sh + +# Install dbus and udev rules +mkdir -p $PKG/etc/dbus-1/system.d +cp $CWD/config/cdemu-daemon-dbus.conf \ $PKG/etc/dbus-1/system.d/cdemu-daemon-dbus.conf.new sed -i 's/group="root"/group="'$GROUP'"/' \ $PKG/etc/dbus-1/system.d/cdemu-daemon-dbus.conf.new |