From 65953bc8cba9f2dcad9057139b7ddd28da56a11dc2994134257fb8279ac6bd86 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 30 Aug 2021 16:28:00 +0000 Subject: [PATCH 1/2] Accepting request 914893 from home:ykurlaev:branches:filesystems - Add systemd and D-Bus .service files - Fix .spec file warning OBS-URL: https://build.opensuse.org/request/show/914893 OBS-URL: https://build.opensuse.org/package/show/filesystems/cdemu-daemon?expand=0&rev=64 --- cdemu-daemon.changes | 6 ++++++ cdemu-daemon.service | 9 +++++++++ cdemu-daemon.spec | 10 +++++++++- 3 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 cdemu-daemon.service 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..158159e 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 From 21b1da7cc7a1b546829effaf61cae59c704cd125ccd6bce708246ec555bd164c Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Mon, 30 Aug 2021 16:29:08 +0000 Subject: [PATCH 2/2] apply consistent style OBS-URL: https://build.opensuse.org/package/show/filesystems/cdemu-daemon?expand=0&rev=65 --- cdemu-daemon.spec | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cdemu-daemon.spec b/cdemu-daemon.spec index 158159e..ada9d31 100644 --- a/cdemu-daemon.spec +++ b/cdemu-daemon.spec @@ -75,10 +75,10 @@ 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" +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 @@ -91,7 +91,7 @@ install -pm0644 "service-example/net.sf.cdemu.CDEmuDaemon.service" "$b/%{_datadi %_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 +%_userunitdir/cdemu-daemon.service +%_datadir/dbus-1/services/net.sf.cdemu.CDEmuDaemon.service %changelog