diff options
author | Nicolas Vigier <boklm@mageia.org> | 2013-04-14 13:46:12 +0000 |
---|---|---|
committer | Nicolas Vigier <boklm@mageia.org> | 2013-04-14 13:46:12 +0000 |
commit | 1be510f9529cb082f802408b472a77d074b394c0 (patch) | |
tree | b175f9d5fcb107576dabc768e7bd04d4a3e491a0 /zarb-ml/mageia-dev/attachments/20120414/53cc8757/attachment-0009.obj | |
parent | fa5098cf210b23ab4f419913e28af7b1b07dafb2 (diff) | |
download | archives-master.tar archives-master.tar.gz archives-master.tar.bz2 archives-master.tar.xz archives-master.zip |
Diffstat (limited to 'zarb-ml/mageia-dev/attachments/20120414/53cc8757/attachment-0009.obj')
-rw-r--r-- | zarb-ml/mageia-dev/attachments/20120414/53cc8757/attachment-0009.obj | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/zarb-ml/mageia-dev/attachments/20120414/53cc8757/attachment-0009.obj b/zarb-ml/mageia-dev/attachments/20120414/53cc8757/attachment-0009.obj new file mode 100644 index 000000000..0791a56b4 --- /dev/null +++ b/zarb-ml/mageia-dev/attachments/20120414/53cc8757/attachment-0009.obj @@ -0,0 +1,60 @@ +%define git 1 +%define gitdate 20120301 +%define oname bbswitch + + +Name: dkms-%{oname} +Summary: bbswitch - Optimus GPU power switcher +Group: System/Kernel and hardware +Version: 0.4.1 +Release: %mkrel 2 +License: GPLv3 +URL: https://github.com/Bumblebee-Project/bbswitch +# source from git repo git://github.com/Bumblebee-Project/bbswitch.git +Source0: %{oname}-20120301.tar.xz +BuildArch: noarch +Requires: dkms + +%description +bbswitch is a kernel module which automatically detects the required +ACPI calls for two kinds of Optimus laptops. It has been verified to +work with "real" Optimus and "legacy" Optimus laptops (at least, that +is how I call them). + +%files +%{_usrsrc}/%{oname}-%{version}-%{release}/* + +%post +dkms add -m %{oname} -v %{version}-%{release} --rpm_safe_upgrade && +dkms build -m %{oname} -v %{version}-%{release} --rpm_safe_upgrade && +dkms install -m %{oname} -v %{version}-%{release} --rpm_safe_upgrade --force +true +/sbin/modprobe %{oname} + +%preun +dkms remove --binary -m %{oname} -v %{version}-%{release} --rpm_safe_upgrade --all +true +/sbin/rmmod %{oname} + +#-------------------------------------------------------------------- +%prep +%setup -qn %{oname} +sed -i 's/#MODULE_VERSION#/%{version}-%{release}/g' dkms/dkms.conf + +%install +rm -rf %{buildroot} +mkdir -p %{buildroot}%{_usrsrc}/%{oname}-%{version}-%{release} +cp *.c %{buildroot}%{_usrsrc}/%{oname}-%{version}-%{release} +cp Makefile %{buildroot}%{_usrsrc}/%{oname}-%{version}-%{release} +cp dkms/dkms.conf %{buildroot}%{_usrsrc}/%{oname}-%{version}-%{release}/dkms.conf + + +%changelog +* Sat Apr 14 2012 Simple <simplew8@gmail.com> 0.4.1-2 +- use plain require,that way is neeed to have requires on scriplets +- move to develop branch +- use versioned source +- set to release to allow upgrade in same version + +* Mon Mar 19 2012 Simple <simplew8@gmail.com> 0.4.1-1 +- initial package
\ No newline at end of file |