diff --git a/cdemu-daemon.changes b/cdemu-daemon.changes index 6651b6f..bc8519b 100644 --- a/cdemu-daemon.changes +++ b/cdemu-daemon.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sun Aug 29 18:28:48 UTC 2021 - Yaroslav Kurlaev + +- Add systemd and D-Bus .service files +- Fix .spec file warning + ------------------------------------------------------------------- Tue Apr 20 09:59:59 UTC 2021 - Jan Engelhardt diff --git a/cdemu-daemon.service b/cdemu-daemon.service new file mode 100644 index 0000000..72dbff8 --- /dev/null +++ b/cdemu-daemon.service @@ -0,0 +1,9 @@ +[Unit] +Description=CDEmu daemon + +[Service] +Type=dbus +EnvironmentFile=-/etc/sysconfig/cdemu-daemon +BusName=net.sf.cdemu.CDEmuDaemon +ExecStart=/usr/bin/cdemu-daemon -n $DEVICES -c $CTL_DEVICE -a $AUDIO_BACKEND +Restart=no diff --git a/cdemu-daemon.spec b/cdemu-daemon.spec index 433d29c..ada9d31 100644 --- a/cdemu-daemon.spec +++ b/cdemu-daemon.spec @@ -33,6 +33,7 @@ URL: https://cdemu.sourceforge.io/about/daemon/ Source: https://downloads.sf.net/cdemu/%name-%version.tar.xz Source2: 60-vhba.rules Source3: cdemu-daemon.sysconfig +Source4: cdemu-daemon.service BuildRequires: cmake >= 2.8.5 BuildRequires: intltool >= 0.21 BuildRequires: pkg-config >= 0.16 @@ -74,16 +75,23 @@ mkdir -p "$b/%_sbindir" "$b/%_fillupdir" \ "$b/%_prefix/lib/udev/rules.d" install -pm0644 "%{S:2}" "$b/%_prefix/lib/udev/rules.d/60-vhba.rules" install -pm0644 "%{S:3}" "$b/%_fillupdir/sysconfig.cdemu-daemon" +mkdir -p "$b/%_userunitdir" +install -pm0644 "%{S:4}" "$b/%_userunitdir/cdemu-daemon.service" +mkdir -p "$b/%_datadir/dbus-1/services" +install -pm0644 "service-example/net.sf.cdemu.CDEmuDaemon.service" "$b/%_datadir/dbus-1/services/net.sf.cdemu.CDEmuDaemon.service" %find_lang %name %post %fillup_only %files -f %name.lang -%doc AUTHORS COPYING README +%doc AUTHORS README +%license COPYING %_bindir/cdemu-daemon %_mandir/man8/cdemu-daemon.8* %_fillupdir/sysconfig.cdemu-daemon %_prefix/lib/udev/ +%_userunitdir/cdemu-daemon.service +%_datadir/dbus-1/services/net.sf.cdemu.CDEmuDaemon.service %changelog