From 917319f36839b126d524a14e81c7c348195f34c75901cdd851bcd62b1e5b8f9b Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sun, 7 Jul 2019 13:40:18 +0000 Subject: [PATCH] Accepting request 713604 from home:rhabacker - add systemd service - renamed to wine-binfmt OBS-URL: https://build.opensuse.org/request/show/713604 OBS-URL: https://build.opensuse.org/package/show/Emulators:Wine/wine-binfmt?expand=0&rev=1 --- .gitattributes | 23 ++++++++++++++++ .gitignore | 1 + wine-binfmt.changes | 10 +++++++ wine-binfmt.conf | 1 + wine-binfmt.service | 14 ++++++++++ wine-binfmt.spec | 67 +++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 116 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 wine-binfmt.changes create mode 100644 wine-binfmt.conf create mode 100644 wine-binfmt.service create mode 100644 wine-binfmt.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/wine-binfmt.changes b/wine-binfmt.changes new file mode 100644 index 0000000..db7a5ba --- /dev/null +++ b/wine-binfmt.changes @@ -0,0 +1,10 @@ +------------------------------------------------------------------- +Thu Jul 4 07:52:06 UTC 2019 - Ralf Habacker - 1.1.0 + +- add systemd service +- renamed to wine-binfmt + +------------------------------------------------------------------- +Fri Feb 21 2014 ralf.habacker@freenet.de + +- initial package diff --git a/wine-binfmt.conf b/wine-binfmt.conf new file mode 100644 index 0000000..6eebddc --- /dev/null +++ b/wine-binfmt.conf @@ -0,0 +1 @@ +:DOSWin:M::MZ::/usr/bin/wine: diff --git a/wine-binfmt.service b/wine-binfmt.service new file mode 100644 index 0000000..91ced21 --- /dev/null +++ b/wine-binfmt.service @@ -0,0 +1,14 @@ +[Unit] +Description=Wine binfmt support +After=syslog.target network.target +Requires=systemd-binfmt.service + +[Service] +Type=oneshot +RemainAfterExit=true +ExecStart=-/bin/sh -c "if test -L /etc/binfmt.d/wine.conf; then rm /etc/binfmt.d/wine.conf; fi; /usr/bin/systemctl restart systemd-binfmt.service; test -f /proc/sys/fs/binfmt_misc/DOSWin" +ExecStop=-/bin/sh -c "ln -fs /dev/null /etc/binfmt.d/wine.conf; /usr/bin/systemctl restart systemd-binfmt.service; ! test -f /proc/sys/fs/binfmt_misc/DOSWin" +ExecReload=/usr/bin/systemctl restart systemd-binfmt.service + +[Install] +WantedBy=multi-user.target diff --git a/wine-binfmt.spec b/wine-binfmt.spec new file mode 100644 index 0000000..9a95b25 --- /dev/null +++ b/wine-binfmt.spec @@ -0,0 +1,67 @@ +# +# spec file for package wine-binfmt +# +# Copyright (c) 2019 SUSE LINUX Products GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + +Name: wine-binfmt +Version: 1.1.0 +Release: 0 +Summary: The binfmt_misc support for Windows +Group: System/Emulators/PC +Url: http://en.wikipedia.org/wiki/Binfmt_misc +License: GPL-2.0 +Source0: wine-binfmt.conf +Source1: wine-binfmt.service +BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: systemd +BuildRequires: systemd-rpm-macros +%{?systemd_requires} +Requires: wine +BuildArch: noarch + +%description +Run Windows(tm) executables out of the box. + +%prep +%setup -cT + +%build + +%install +%{__install} -d -m 0755 %{buildroot}%{_prefix}/lib/binfmt.d +%{__install} -m 0644 %{SOURCE0} %{buildroot}%{_prefix}/lib/binfmt.d/wine.conf +%{__install} -D -m 444 %{SOURCE1} %{buildroot}%{_unitdir}/wine-binfmt.service +%{__install} -d -m 0755 %{buildroot}%{_prefix}/sbin/ +ln -s service %{buildroot}%{_prefix}/sbin/rcwine-binfmt + +%pre +%service_add_pre wine-binfmt.service + +%post +%service_add_post wine-binfmt.service + +%preun +%service_del_preun wine-binfmt.service + +%postun +%service_del_postun wine-binfmt.service + +%files +%defattr(-,root,root,644) +%{_prefix}/lib/binfmt.d/wine.conf +%{_prefix}/sbin/rcwine-binfmt +%{_unitdir}/wine-binfmt.service + +%changelog