# Common utilities
class utils {
  package { [ 'screen', 'less', 'bzip2', 'openssl', 'lynx', 'wget', 'unzip' ]:
    ensure => installed,
  }
}

# Common utilities for physical
class utils::physical {
  package { [ 'nload', 'acpid', 'acpi' ]:
    ensure => installed,
  }
}

# Common utilities for storage
class utils::storage {
  package { 'clamav':
    ensure => installed,
  }
}

# Common utilities for web
class utils::web {
  package { [ 'ffmpeg', 'flvtool2', 'php5-ffmpeg' ]:
    ensure => installed,
  }
}

# Common utilities for personal
class utils::personal {
  package { [ 'awesome',           'alsa-tools-gui',          'mutt',
              'irssi',             'offlineimap',             'wyrd',
              'mp3blaster',        'iceweasel',               'eterm',
              'libpam-mount',      'debhelper',               'fluxbox',
              'gdm',               'ecryptfs-utils',          'newsbeuter',
              'bitlbee',           'nicotine',                'silc',
              'irssi-plugin-silc', 'conky',                   'rxvt',
              'vim-gtk',           'gobby',                   'bogofilter',
              'gnupg-agent',       'xterm',                   'bash-completion',
              'fetchmail',         'whois',                   'xfonts-terminus',
              'gnumeric',          'alsa-utils',              'sc',
              'gawk',              'telnet',                  'fpm',
              'procmail',          'msmtp',                   'netpbm',
              'gqview',            'antiword',                'mairix',
              'gitk',              'konqueror',               'mpg123',
              'audacious',         'qjackctl',                'bittorrent',
              'subversion',        'fortunes-br',             'xine-ui',
              'broffice.org',      'mozilla-firefox-adblock', 'cups-client',
              'amarok',            'mc',                      'wodim',
              'genisoimage',       'dvd+rw-tools',            'inkscape',
              'python-stdeb',      'openjdk-6-jre',           'sun-java6-jre',
              'epiphany-browser',  'xscreensaver',            'unrar',
              'fakeroot',          'dupload',                 'autotools-dev',
              'dh-make' ]:
    ensure => installed,
  }

  # Gem packages
  package { 'capistrano':
    ensure   => installed,
    provider => gem,
    require  => Package['rubygems'],
  }

  if !defined(Package['git-core']) {
    package { 'git-core':
      ensure => installed,
    }
  }

  if !defined(Package['ruby']) {
    package { 'ruby':
      ensure => installed,
    }
  }

  if !defined(Package['rubygems']) {
    package { 'rubygems':
      ensure  => installed,
      require => Package['ruby'],
    }
  }

  # App alternatives
  file { "/etc/alternatives/java":
    ensure => "/usr/lib/jvm/java-6-sun/jre/bin/java",
    owner  => root,
    group  => root,
  }
}

# Common utilities for laptop
class utils::laptop {
  package { [ 'cpufrequtils',  'module-assistant', 'madwifi-source',
              'madwifi-tools', 'wireless-tools',   'wpasupplicant',
              'ekiga',         'gnome',            'revelation',
              'wicd' ]:
    ensure => installed,
  }
}

# Common utilities for desktop
class utils::desktop {
  package { 'cups':
    ensure => installed,
  }
}