-Enlevé packages inutilisés: mysql, samba, gwibber, totem
[hvlinux.git] / ubuntu / ubuntu-cfg.sh
index c191305..35b9f04 100755 (executable)
@@ -2,12 +2,11 @@
 set -o errexit
 
 # Liste des items:
-# 1. Installer "Broadcom STA wireless driver" (HP Mini 1115)
-# 2. Désactiver touch CAPS LOCK
+# 1. Désactiver touch CAPS LOCK
 
 GST=gstreamer0.10
 
-APT="sudo apt-get --yes"
+APT="sudo apt-get --yes --force-yes"
 AGI="${APT} install"
 
 if [ "`id -u`" -eq 0 ]; then
@@ -22,21 +21,41 @@ if dpkg --list | grep "libmono" 1> /dev/null 2>&1; then
     ${APT} purge libmono* libgdiplus cli-common libglitz-glx1 libglitz1
 fi
 
-if dpkg --list | grep pulseaudio 1> /dev/null 2>&1; then
+if dpkg --list | grep "pulseaudio" 1> /dev/null 2>&1; then
     ${APT} remove --purge pulseaudio*
 fi
 
-if dpkg --list | grep bluez-gstreamer 1> /dev/null 2>&1; then
+if dpkg --list | grep "bluez-gstreamer" 1> /dev/null 2>&1; then
     ${APT} remove --purge bluetooth bluez bluez-gstreamer bluez-alsa bluez-cups
 fi
 
-if dpkg --list | grep openoffice 1> /dev/null 2>&1; then
+if dpkg --list | grep "openoffice" 1> /dev/null 2>&1; then
     ${APT} remove --purge openoffice*
 fi
 
-#if dpkg --list | grep evolution-exchange 1> /dev/null 2>&1; then
-#    ${APT} remove --purge evolution
-#fi
+if dpkg --list | grep "samba-common" 1> /dev/null 2>&1; then
+    ${APT} remove --purge samba-common
+fi
+
+if dpkg --list | grep "evolution-exchange" 1> /dev/null 2>&1; then
+    ${APT} remove --purge evolution
+fi
+
+if dpkg --list | grep "mysql-common" 1> /dev/null 2>&1; then
+    ${APT} remove --purge mysql-common
+fi
+
+if dpkg --list | grep "pppconfig" 1> /dev/null 2>&1; then
+    ${APT} remove --purge pppconfig pppoeconf
+fi
+
+if dpkg --list | grep "totem-common" 1> /dev/null 2>&1; then
+    ${APT} remove --purge totem totem-common
+fi
+
+if dpkg --list | grep "gwibber" 1> /dev/null 2>&1; then
+    ${APT} remove --purge gwibber
+fi
 
 # Configuration SSH
 if [ ! -f ${HOME}/.ssh/id_dsa.pub ]; then
@@ -73,7 +92,19 @@ ${APT} autoclean
 ${AGI} localepurge
 
 if lspci | grep "BCM43" 1> /dev/null 2>&1; then
-    ${AGI} b43-fwcutter
+    if [ ! -f /etc/modprobe.d/b43.conf ]; then
+        sudo touch /etc/modprobe.d/b43.conf
+        echo "options b43 pio=1 qos=0" | sudo tee -a /etc/modprobe.d/b43.conf
+        ${AGI} b43-fwcutter
+    fi
+fi
+
+if lspci | grep "nVidia" 1> /dev/null 2>&1; then
+    ${AGI} nvidia-settings nvidia-current
+else
+    if dpkg --list | grep "nvidia" 1> /dev/null 2>&1; then
+        ${APT} remove --purge nvidia-*
+    fi
 fi
 
 ${AGI} emacs23
@@ -103,13 +134,21 @@ ${AGI} abiword gnumeric gnumeric-plugins-extra
 ${AGI} texlive texlive-latex-recommended texlive-latex-extra texlive-humanities
 
 # Multimedia
-${AGI} linux-rt linux-headers-rt
+#{AGI} linux-rt linux-headers-rt
 ${AGI} jackd
 ${AGI} libdvdread4
-sudo /usr/share/doc/libdvdread4/install-css.sh
-${AGI} ${GST}-ffmpeg ${GST}-plugins-bad ${GST}-plugins-ugly
-sudo add-apt-repository "deb http://www.getgnash.org/debs/ubuntu lucid main"
-${AGI} mozilla-plugin-gnash ${GST}-fluendo-mp3
+if [ ! -h /usr/lib/libdvdcss.so.2 ]; then
+    sudo /usr/share/doc/libdvdread4/install-css.sh
+fi
+${AGI} ffmpeg
+${AGI} ${GST}-ffmpeg ${GST}-plugins-bad ${GST}-plugins-ugly ${GST}-fluendo-mp3
+if ! sudo apt-key list | grep "rob@welcomehome.org" 1> /dev/null 2>&1; then
+    sudo add-apt-repository "deb http://www.getgnash.org/debs/ubuntu lucid main"
+    wget --directory-prefix=/tmp http://getgnash.org/gnashdev.key
+    sudo apt-key add /tmp/gnashdev.key
+    rm /tmp/gnashdev.key
+fi
+${AGI} mozilla-plugin-gnash
 ${AGI} vlc vlc-plugin-jack mozilla-plugin-vlc
 ${AGI} sound-juicer
 
@@ -144,8 +183,7 @@ ${AGI} epdfview
 ${AGI} psutils
 ${AGI} gimp
 
-if lspci | grep "nVidia" 1> /dev/null 2>&1; then
-    ${AGI} nvidia-settings nvidia-current
-fi
+${AGI} deborphan
+sudo deborphan | xargs sudo apt-get -y remove --purge
 
 exit $?