forked from frankcrawford/it87
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Added LICENSE. Added rpm specs. Renamed module to it87-extras t…
…o avoid name collision
- Loading branch information
1 parent
e1159ef
commit a04c93a
Showing
7 changed files
with
441 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
blacklist it87 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
%global modname it87-extras | ||
%global srcversion akmods | ||
%global srcname it87 | ||
%global pkgname it87-extras | ||
%global maintainer grandpares | ||
|
||
%if 0%{?fedora} | ||
%global buildforkernels akmod | ||
%global debug_package %{nil} | ||
%endif | ||
|
||
# name should have a -kmod suffix | ||
Name: %{pkgname}-kmod | ||
Version: {{{ git_dir_version }}} | ||
Release: 2%{?dist} | ||
Summary: Linux Driver for ITE LPC chips | ||
License: GPLv2 | ||
URL: https://github.com/%{maintainer}/it87 | ||
Source0: %{url}/archive/refs/heads/%{srcversion}.zip | ||
|
||
BuildRequires: kmodtool | ||
|
||
%{expand:%(kmodtool --target %{_target_cpu} --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null) } | ||
|
||
%description | ||
Linux Driver for ITE LPC chips | ||
|
||
%prep | ||
# error out if there was something wrong with kmodtool | ||
%{?kmodtool_check} | ||
|
||
# print kmodtool output for debugging purposes: | ||
kmodtool --target %{_target_cpu} --kmodname %{name} %{?buildforkernels:--%{buildforkernels}} %{?kernels:--for-kernels "%{?kernels}"} 2>/dev/null | ||
|
||
%autosetup -c %{pkgname} | ||
for kernel_version in %{?kernel_versions} ; do | ||
cp -a %{srcname}-%{srcversion} _kmod_build_${kernel_version%%___*}/ | ||
done | ||
|
||
%build | ||
for kernel_version in %{?kernel_versions} ; do | ||
pushd _kmod_build_${kernel_version%%___*}/ | ||
make clean | ||
make KVER=${kernel_version%%___*} | ||
popd | ||
done | ||
|
||
%install | ||
for kernel_version in %{?kernel_versions}; do | ||
mkdir -p %{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/ | ||
install -D -m 755 _kmod_build_${kernel_version%%___*}/%{modname}.ko %{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/ | ||
chmod a+x %{buildroot}%{kmodinstdir_prefix}/${kernel_version%%___*}/%{kmodinstdir_postfix}/%{modname}.ko | ||
done | ||
%{?akmod_install} | ||
|
||
|
||
%changelog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
%if 0%{?fedora} | ||
%global debug_package %{nil} | ||
%endif | ||
|
||
%global srcname it87 | ||
%global srcversion akmods | ||
|
||
Name: it87-extras | ||
Version: {{{ git_dir_version }}} | ||
Release: 1%{?dist} | ||
Summary: Linux Driver for ITE LPC chips | ||
License: GPLv2 | ||
URL: https://github.com/grandpares/it87 | ||
|
||
|
||
Source: %{url}/archive/refs/heads/%{srcversion}.tar.gz | ||
|
||
Provides: %{name}-kmod-common = %{version} | ||
Requires: %{name}-kmod >= %{version} | ||
|
||
BuildRequires: systemd-rpm-macros | ||
|
||
%description | ||
Linux Driver for ITE LPC chips | ||
|
||
%prep | ||
%setup -q -c %{srcname}-%{srcversion} | ||
|
||
%install | ||
mkdir -p %{buildroot}%{_prefix}/lib/modprobe.d/ | ||
install -p -m 0644 %{srcname}-%{srcversion}/install/modprobe.conf %{buildroot}%{_prefix}/lib/modprobe.d/%{name}.conf | ||
|
||
%files | ||
%doc %{srcname}-%{srcversion}/README | ||
%license %{srcname}-%{srcversion}/LICENSE | ||
%attr(0644,root,root) %{_prefix}/lib/modprobe.d/%{name}.conf | ||
|
||
%changelog | ||
{{{ git_dir_changelog }}} |