forked from hannesmann/gcadapter-oc-kmod
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gcadapter_oc-dkms.spec
56 lines (44 loc) · 1.56 KB
/
gcadapter_oc-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
%global debug_package %{nil}
%global dkms_name gcadapter_oc
Name: %{dkms_name}-dkms
Version: {{{ git_dir_version }}}
Release: 1%{?dist}
Summary: Kernel module for overclocking the Nintendo Wii U/Mayflash GameCube adapter.
License: GPLv2
URL: https://github.com/KyleGospo/gcadapter_oc-dkms
BuildArch: noarch
Source: {{{ git_dir_pack }}}
Provides: %{dkms_name}-dkms = %{version}
Requires: dkms
%description
Kernel module for overclocking the Nintendo Wii U/Mayflash GameCube adapter. The default overclock is from 125 Hz to 1000 Hz.
%prep
{{{ git_dir_setup_macro }}}
%build
%install
#Remove unneeded folder
rm -rf packaging
# 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/gcadapter_oc.conf << EOF
gcadapter_oc
EOF
%post
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/gcadapter_oc.conf
# 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 }}}