-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwinesync-dkms.spec
75 lines (61 loc) · 2.18 KB
/
winesync-dkms.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
%global debug_package %{nil}
%global dkms_name winesync
%global winesync_commit 9ac10c6e711ec096274ecc676ae83a7cf2a1213f
Name: %{dkms_name}-dkms
Version: {{{ git_dir_version }}}
Release: 1%{?dist}
Summary: DKMS module to add Winesync/Fastsync
License: GPLv2
URL: https://github.com/KyleGospo/winesync-dkms
BuildArch: noarch
Source0: https://repo.or.cz/linux/zf.git/blob_plain/%{winesync_commit}:/drivers/misc/winesync.c
Source1: https://repo.or.cz/linux/zf.git/blob_plain/%{winesync_commit}:/include/uapi/linux/winesync.h
Source2: Makefile
Source3: dkms.conf
Source4: README.md
Source5: LICENSE
# Include patch:
Patch0: winesync.patch
Provides: %{dkms_name}-dkms = %{version}
Requires: dkms
%description
Implements Winesync/Fastsync, a reimplementation of the NT synchronization primitives used by Wine.
%prep
%setup -q -T -c -n %{name}-%{version}
cp %{SOURCE0} %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} .
%patch0
%build
%install
# Create empty tree
mkdir -p %{buildroot}%{_usrsrc}/%{dkms_name}-%{version}/
cp -fr * %{buildroot}%{_usrsrc}/%{dkms_name}-%{version}/
install -d %{buildroot}%{_sysconfdir}/modules-load.d
cat > %{buildroot}%{_sysconfdir}/modules-load.d/winesync.conf << EOF
winesync
EOF
install -d %{buildroot}%{_sysconfdir}/udev/rules.d
cat > %{buildroot}%{_sysconfdir}/udev/rules.d/99-winesync.rules << EOF
KERNEL=="winesync", MODE="0644"
EOF
%post -n %{name}
if [ -S /run/udev/control ]; then
udevadm control --reload
udevadm trigger
fi
dkms add -m %{dkms_name} -v %{version} -q || :
# Rebuild and make available for the currently running kernel
dkms build -m %{dkms_name} -v %{version} -q || :
dkms install -m %{dkms_name} -v %{version} -q --force || :
%preun
# Remove all versions from DKMS registry
dkms remove -m %{dkms_name} -v %{version} -q --all || :
%files
%license LICENSE
%doc README.md
%{_usrsrc}/%{dkms_name}-%{version}
%{_sysconfdir}/modules-load.d/winesync.conf
%{_sysconfdir}/udev/rules.d/99-winesync.rules
# Finally, changes from the latest release of your application are generated from
# your project's Git history. It will be empty until you make first annotated Git tag.
%changelog
{{{ git_dir_changelog }}}