X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=ubuntu%2Fubuntu-cfg.sh;h=c3a3fe9274f6efdc873500676dd9f26874d392d2;hb=b7d1d99f41dcf50a8635f608679947f4455a0c7c;hp=1dce21bebee689c223f9e93d5b7d17aeccf4d2cf;hpb=17238bc2a0f3c9a58e7372f3d72ccf45a4df6f4e;p=hvlinux.git diff --git a/ubuntu/ubuntu-cfg.sh b/ubuntu/ubuntu-cfg.sh index 1dce21b..c3a3fe9 100755 --- a/ubuntu/ubuntu-cfg.sh +++ b/ubuntu/ubuntu-cfg.sh @@ -1,15 +1,16 @@ -#!/bin/sh +#!/bin/bash set -o errexit +source ./config.def + # Liste des items: # 1. Désactiver touch CAPS LOCK -#INSTALL_WMAKER=1 - GST=gstreamer0.10 APT="sudo apt-get --yes --force-yes" AGI="${APT} install" +AGINR="${AGI} --no-install-recommends" ubuntu_cleanup() { @@ -19,6 +20,12 @@ ubuntu_cleanup() ${APT} autoclean } +hv_add_repo() +{ + sudo add-apt-repository ${1} + ${APT} update +} + if [ "`id -u`" -eq 0 ]; then echo "You must NOT be the super-user to execute this script" exit 1 @@ -35,8 +42,10 @@ 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 - ${APT} remove --purge openoffice* +if [ "x${INSTALL_OPENOFFICE}" != "x1" ]; then + if dpkg --list | grep "openoffice" 1> /dev/null 2>&1; then + ${APT} remove --purge openoffice* + fi fi if dpkg --list | grep "samba-common" 1> /dev/null 2>&1; then @@ -44,7 +53,11 @@ if dpkg --list | grep "samba-common" 1> /dev/null 2>&1; then fi if dpkg --list | grep "evolution-exchange" 1> /dev/null 2>&1; then - ${APT} remove --purge evolution + ${APT} remove --purge evolution evolution-plugins evolution-webcal evolution-data-server evolution-indicator evolution-common +fi + +if dpkg --list | grep "empathy-common" 1> /dev/null 2>&1; then + ${APT} remove --purge empathy* fi if dpkg --list | grep "pppconfig" 1> /dev/null 2>&1; then @@ -63,6 +76,10 @@ if dpkg --list | grep "vinagre" 1> /dev/null 2>&1; then ${APT} remove --purge vinagre fi +if dpkg --list | grep "modemmanager" 1> /dev/null 2>&1; then + ${APT} remove --purge modemmanager +fi + # Braille if dpkg --list | grep "brltty" 1> /dev/null 2>&1; then ${APT} remove --purge brltty @@ -173,69 +190,122 @@ sudo update-grub ${AGI} emacs ${AGI} reiserfsprogs gparted +${AGI} gddrescue +${AGINR} smartmontools # Connection serveurs NFS ${AGI} nfs-common portmap -# Development ${AGI} subversion -${AGI} git - -${AGI} build-essential texinfo gettext gawk bison flex -${AGI} autoconf autoconf-doc autotools-dev libtool -${AGI} manpages manpages-dev manpages-posix manpages-posix-dev -# dockapp development -${AGI} libx11-dev libxpm-dev libxext-dev -${AGI} libgtk2.0-dev libglib2.0-dev -# wmnotify uses SSL -${AGI} libssl-dev -# hvlinux -${AGI} libncurses-dev +# Development +if [ "x${INSTALL_DEV_TOOLS}" = "x1" ]; then + ${AGI} git + # Set global configuration options to ~/.gitconfig + git config --global core.editor emacs + git config --global color.ui true + ${AGI} build-essential texinfo gettext gawk bison flex + ${AGI} autoconf autoconf-doc autotools-dev libtool + ${AGI} manpages manpages-dev manpages-posix manpages-posix-dev + + # dockapp development + ${AGI} libx11-dev libxpm-dev libxext-dev + ${AGI} libgtk2.0-dev libglib2.0-dev + # wmnotify uses SSL + ${AGI} libssl-dev + # hvlinux + ${AGI} libncurses-dev + + # Debian packaging + ${AGI} dh-make lintian dupload +fi -# Debian packaging -${AGI} dh-make lintian dupload +if [ "x${INSTALL_WEB_SERVER}" = "x1" ]; then + ${AGI} libapache2-mod-php5 +fi ${AGI} abiword gnumeric gnumeric-plugins-extra ${AGI} texlive texlive-latex-recommended texlive-latex-extra texlive-humanities -# Multimedia -${AGI} jackd patchage -${AGI} pulseaudio-module-jack -sudo adduser $(whoami) audio -# /etc/security/limits.d/audio.conf -> set rtprio from 95 to 99 ??? +# Jackd +if [ "x${INSTALL_MUSIC_STUDIO}" = "x1" ]; then + ${AGINR} jackd patchage + sudo sed -i -e 's!^\(@audio\s*-\s*rtprio\s*\).*!\199!' \ + /etc/security/limits.d/audio.conf + ${AGI} pulseaudio-module-jack + + if [ ! -f ${HOME}/.pulse/pulsejack.pa ]; then + cp /etc/pulse/default.pa ${HOME}/.pulse/pulsejack.pa + fi + + sudo sed -i -e 's!.*\(autospawn = \).*!\1no!' /etc/pulse/client.conf + if ! grep "load-module module-jack-source" ${HOME}/.pulse/pulsejack.pa 1> /dev/null 2>&1; then + cat >> ${HOME}/.pulse/pulsejack.pa << "EOF" + +### JACK setup (Hugo Villeneuve) +load-module module-jack-source +load-module module-jack-sink +EOF + fi + + sudo adduser $(whoami) audio + # /etc/security/limits.d/audio.conf -> set rtprio from 95 to 99 ??? +fi + +# Multimedia ${AGI} libdvdread4 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 -${AGI} mozilla-plugin-gnash # Requires "mysql-common" -${AGI} vlc mozilla-plugin-vlc +${AGI} libavcodec-extra-52 +if [ "x${INSTALL_GNASH}" = "x1" ]; then + ${AGI} mozilla-plugin-gnash # Requires "mysql-common" +else + if dpkg --list | grep "gnash" 1> /dev/null 2>&1; then + ${APT} remove --purge gnash* + fi +fi if [ -h /dev/cdrom ]; then # Don't install on machines without CD/DVD-ROM +${AGI} vlc mozilla-plugin-vlc ${AGI} sound-juicer fi # Musique ${AGI} vorbis-tools - ${AGI} timidity fluid-soundfont-gm fluid-soundfont-gs -# Désactivation de Timidity au démarrage (sytem-wide): -sudo sed -i -e 's!^# \(TIM_ALSASEQ=false\)!\1!' /etc/default/timidity ${AGI} easytag -${AGI} vkeybd ${AGI} audacity libmp3lame0 tap-plugins -${AGI} lilypond -${AGI} rosegarden + +if [ "x${INSTALL_MUSIC_STUDIO}" = "x1" ]; then + # Désactivation de Timidity au démarrage (sytem-wide): + sudo sed -i -e 's!^# \(TIM_ALSASEQ=false\)!\1!' /etc/default/timidity + + ${AGI} lilypond + ${AGI} vkeybd + ${AGI} rosegarden + ${AGI} ardour +fi ${AGI} sylpheed gconftool -s /desktop/gnome/url-handlers/mailto/command -t string "sylpheed --compose %s" -# Change location of default mail account from ~/Mail to ~/.mail -sed -i -e 's!^\( ${HOME}/GNUstep/Library/WindowMaker/autostart << "EOF" @@ -244,19 +314,23 @@ gnome-settings-daemon EOF chmod 755 ${HOME}/GNUstep/Library/WindowMaker/autostart fi -fi -${AGI} pcmanfm -cat > ${HOME}/.gtkrc-2.0 << "EOF" + ${AGI} pcmanfm + cat > ${HOME}/.gtkrc-2.0 << "EOF" gtk-icon-theme-name="Tango" gtk-enable-event-sounds=0 gtk-enable-input-feedback-sounds=0 EOF +fi ${AGI} epdfview ${AGI} psutils +${AGI} imagemagick ${AGI} gimp +# Pour changer la couleur des scrollbars (gris sur gris par défaut) +${AGI} gnome-color-chooser + ubuntu_cleanup exit $?