Permalink
Browse files

asus-switcheroo: More install targets

Moves install to install-fedora, add uninstall-fedora,
install-ubuntu and uninstall-ubuntu.  Also add .gitignore.

Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
  • Loading branch information...
1 parent 98fce7a commit ff72e547a2a6e4543117c2c23fff3eebd59b180d @awilliam committed Apr 18, 2011
Showing with 40 additions and 2 deletions.
  1. +12 −0 .gitignore
  2. +28 −2 Makefile
View
@@ -0,0 +1,12 @@
+.*.swp
+.asus-switcheroo.ko.cmd
+.asus-switcheroo.mod.o.cmd
+.asus-switcheroo.o.cmd
+.tmp_versions/
+*~
+Module.symvers
+asus-switcheroo.ko
+asus-switcheroo.mod.c
+asus-switcheroo.mod.o
+asus-switcheroo.o
+modules.order
View
@@ -9,11 +9,37 @@ default:
clean:
$(MAKE) -C $(KDIR) M=$(PWD) clean
-install:
+install-fedora:
install -m 0644 -D asus-switcheroo.ko /lib/modules/$(shell uname -r)/extra/asus-switcheroo/asus-switcheroo.ko
+ depmod -a
install -m 0755 asus-switcheroo-pm /etc/pm/sleep.d/75-asus-switcheroo-pm
install -m 0644 asus-switcheroo.conf-modprobe.d /etc/modprobe.d/asus-switcheroo.conf
install -m 0644 asus-switcheroo.conf-dracut /etc/dracut.conf.d/asus-switcheroo.conf
- depmod -a
cp /boot/initramfs-$(shell uname -r).img /boot/initramfs-$(shell uname -r).img.bak
dracut -f /boot/initramfs-$(shell uname -r).img $(shell uname -r)
+
+uninstall-fedora:
+ rm -fr /lib/modules/$(shell uname -r)/extra/asus-swticheroo
+ depmod -a
+ rm -f /etc/pm/sleep.d/75-asus-switcheroo-pm
+ rm -f /etc/modprobe.d/asus-switcheroo.conf
+ rm -f /etc/dracut.conf.d/asus-switcheroo.conf
+ dracut -f /boot/initramfs-$(shell uname -r).img $(shell uname -r)
+
+install-ubuntu:
+ install -m 0644 -D asus-switcheroo.ko /lib/modules/$(shell uname -r)/extra/asus-switcheroo/asus-switcheroo.ko
+ depmod -a
+ install -m 0755 asus-switcheroo-pm /etc/pm/sleep.d/75-asus-switcheroo-pm
+ install -m 0644 asus-switcheroo.conf-modprobe.d /etc/modprobe.d/asus-switcheroo.conf
+ sed -i -e "/asus-switcheroo/D" /etc/initramfs-tools/modules
+ echo asus-switcheroo >> /etc/initramfs-tools/modules
+ cp /boot/initrd.img-$(shell uname -r) /boot/initrd.img-$(shell uname -r).bak
+ update-initramfs -u -k $(shell uname -r)
+
+uninstall-ubuntu:
+ rm -fr /lib/modules/$(shell uname -r)/extra/asus-switcheroo
+ depmod -a
+ rm -f /etc/pm/sleep.d/75-asus-switcheroo-pm
+ rm -f /etc/modprobe.d/asus-switcheroo.conf
+ sed -i -e "/asus-switcheroo/D" /etc/initramfs-tools/modules
+ update-initramfs -u -k $(shell uname -r)

0 comments on commit ff72e54

Please sign in to comment.