import os, sys

# sanity - make sure I'm root
if os.getuid() != 0:
	print "\n*** You must run this as root! ***\n"
	sys.exit(1)

#
# install core set of packages for multimedia, java, etc.
#
pkgs = "gcc kernel-source kernel-syms kdeadmin3 expat "
pkgs += "java-1_5_0-sun java-1_5_0-sun-alsa java-1_5_0-sun-devel java-1_5_0-sun-plugin "
pkgs += "w32codec-all acroread flash-player RealPlayer "
pkgs += "mplayerplug-in libxine1 xine-ui"

cmd = "yum install %s" % pkgs
print cmd
if os.system(cmd) != 0:
	print "\n*** ERROR installing core packages ***\n"
	sys.exit(1)

# install libdvdcss to enable playback of retail DVDs
cmd = "rpm -ivh http://download.videolan.org/pub/libdvdcss/1.2.9/rpm/libdvdcss2-1.2.9-1.i386.rpm"
print cmd
if os.system(cmd) != 0:
	print "\n*** ERROR installing libdvdcss ***\n"
	sys.exit(1)


