summaryrefslogtreecommitdiffstats
path: root/zarb-ml/mageia-dev/attachments/20120410/da488c0d/attachment-0013.obj
diff options
context:
space:
mode:
Diffstat (limited to 'zarb-ml/mageia-dev/attachments/20120410/da488c0d/attachment-0013.obj')
-rw-r--r--zarb-ml/mageia-dev/attachments/20120410/da488c0d/attachment-0013.obj57
1 files changed, 57 insertions, 0 deletions
diff --git a/zarb-ml/mageia-dev/attachments/20120410/da488c0d/attachment-0013.obj b/zarb-ml/mageia-dev/attachments/20120410/da488c0d/attachment-0013.obj
new file mode 100644
index 000000000..ff34b67be
--- /dev/null
+++ b/zarb-ml/mageia-dev/attachments/20120410/da488c0d/attachment-0013.obj
@@ -0,0 +1,57 @@
+%define modname acpi_call
+
+Name: dkms-%{modname}
+Summary: A kernel module that enables you to call ACPI methods
+Group: System/Kernel and hardware
+Version: 0.1
+Release: %mkrel 1
+URL: https://github.com/Bumblebee-Project/acpi_call
+License: GPL
+# source from git repo git://github.com/Bumblebee-Project/acpi_call.git
+Source0: %{modname}.tar.xz
+BuildArch: noarch
+Requires(post): dkms
+Requires(preun):dkms
+
+%description
+A kernel module that enables you to call ACPI methods by writing the
+method name followed by arguments to /proc/acpi/call.
+
+%files
+%doc README
+%{_usrsrc}/%{modname}-%{version}-%{release}/*
+
+%post
+set -x
+/usr/sbin/dkms add -m %{modname} -v %{version}-%{release} --rpm_safe_upgrade || :
+/usr/sbin/dkms build -m %{modname} -v %{version}-%{release} --rpm_safe_upgrade || :
+/usr/sbin/dkms install -m %{modname} -v %{version}-%{release} --rpm_safe_upgrade || :
+/sbin/modprobe %{modname} || :
+
+%preun
+dkms remove --binary -m %{modname} -v %{version}-%{release} --rpm_safe_upgrade --all || :
+/sbin/rmmod %{modname} || :
+
+%prep
+%setup -qn %{modname}
+
+%install
+rm -rf %{buildroot}
+
+mkdir -p -m755 %{buildroot}%{_usrsrc}/%{modname}-%{version}-%{release}
+cp -a * %{buildroot}%{_usrsrc}/%{modname}-%{version}-%{release}
+# DKMS config
+cat > %{buildroot}%{_usrsrc}/%{modname}-%{version}-%{release}/dkms.conf << 'EOF'
+PACKAGE_NAME="%{modname}"
+PACKAGE_VERSION="%{version}-%{release}"
+MAKE[0]="make default KERNELPATH=${kernel_source_dir}"
+MAKE_MATCH[0]="make load KERNELPATH=${kernel_source_dir}"
+BUILT_MODULE_NAME[0]="%{modname}"
+DEST_MODULE_LOCATION[0]="/kernel/drivers/acpi"
+REMAKE_INITRD="no"
+AUTOINSTALL="yes"
+EOF
+
+%changelog
+* Mon Mar 19 2012 Simple <simplew8@gmailcom> 1.0-1
+- initial package \ No newline at end of file