def desktop_basic(): execute(headless) require_deb_packages(''' baobab rdesktop x11vnc xtightvncviewer ssvnc zim synaptic gparted remmina scrot shutter avahi-discover avahi-ui-utils avahi-utils avahi-dnsconfd xdotool ''' ) require.directory('shots')
def music(): require_deb_packages( ''' a2jmidid aconnectgui alsa-utils azr3-jack bristol gmidimonitor guitarix gxtuner hydrogen jack-keyboard jack-rack jack-tools mididings midisport-firmware pulseaudio-module-jack qjackctl vkeybd vmpk zynaddsubfx zynjacku ''' )
def install_eclipse( version=VERSION, sr=SR, package=PACKAGE, ): require_deb_packages( ''' default-jre ''' ) arch64 = get_arch() == 'x86_64' platform = PLATFORM arch = '-x86_64' if arch64 else '' url_template = 'http://www.mirrorservice.org/sites/download.eclipse.org/eclipseMirror/technology/epp/downloads/release/%(version)s/%(sr)s/' download_url = url_template % locals() tarball = 'eclipse-%(package)s-%(version)s-%(sr)s-%(platform)s%(arch)s.tar.gz' % locals() url = '%(download_url)s%(tarball)s' % locals() templ = """#!/bin/sh export ECLIPSE_HOME=%(install_path)s $ECLIPSE_HOME/eclipse $*""" return install_tarball(url=url, tarball=tarball, name=NAME, version='%(version)s-%(sr)s' % locals(), bin_template=templ, root_directory=NAME )
def python_versions(): # for 14.04 ppa require.deb.package('software-properties-common') require.deb.ppa('ppa:fkrull/deadsnakes') require_deb_packages( ''' #python2.4 python2.5 python2.6 python2.7 #python3.0 python3.1 python3.2 python3.3 python2.5-dev python2.6-dev python2.7-dev python3.1-dev python3.2-dev python3.3-dev ''' )
def cdemu(): require.deb.ppa('ppa:cdemu/ppa') require_deb_packages( ''' gcdemu ''' )
def headless(): # How do I enable the "multiverse" repository? # http://askubuntu.com/questions/89096/how-do-i-enable-the-multiverse-repository sudo('sed -i "/^# deb.*multiverse/ s/^# //" /etc/apt/sources.list') timezone() execute(ntpd) require_deb_packages( ''' sudo screen htop nmap iotop mc ssh nano cpuid curl wget nfs-kernel-server nfs-common ''') require.directory('bin') require.file('.profile', contents=cfg('profile.conf'))
def ruby_dev(): require_deb_packages( ''' irb ruby-dev ''' )
def ntpd(): require_deb_packages( ''' ntp ntpdate ''' ) require.file('/etc/ntp.conf', contents=cfg('ntp.conf'), use_sudo=True)
def wine(): require.deb.ppa('ppa:ubuntu-wine/ppa') require_deb_packages( ''' wine wine1.7 winetricks ''' )
def install_arduino(version): '''1.5 is not working ''' require_deb_packages(''' arduino ''' ) require.python.packages( split_packages(''' confduino ino nanpy '''), use_sudo=True, ) arch64 = get_arch() == 'x86_64' if version.startswith('00'): version_group = '00' elif version_as_list(version) >= version_as_list('1.5'): version_group = '1.5' else: version_group = '1.0' if version_group == '00': arch_tag = '-64' if arch64 else '' tarball = 'arduino-%(version)s%(arch_tag)s.tgz' % locals() else: use32 = version_as_list(version) >= version_as_list('1.0.3') arch_tag = '64' if arch64 else ('32' if use32 else '') tarball = 'arduino-%(version)s-linux%(arch_tag)s.tgz' % locals() if version_group == '1.5': download_url = DOWNLOAD_URL2 else: download_url = DOWNLOAD_URL1 bin_template = """ ROOT=%(install_path)s #env ARDUINO_HOME=$ROOT python -m confduino.exampallcreate export LD_LIBRARY_PATH=/usr/lib/jni $ROOT/arduino """ url = '%(download_url)s%(tarball)s' % locals() name = 'arduino' root_directory = '%(name)s-%(version)s' % locals() install_tarball(url=url, tarball=tarball, name=name, version=version, bin_template=bin_template, root_directory=root_directory )
def povray_git(): if run('povray --version', warn_only=True).failed: require_deb_packages(PACKAGES, error_if_not_exists=False) with cd('/tmp'): require.git.working_copy(URL, path='povray') with cd('/tmp/povray/unix'): run('./prebuild.sh') with cd('/tmp/povray'): run('./configure COMPILED_BY="your name <email@address>"') run('make') #sudo('make install') sudo('checkinstall -D -y --install')
def vncserver(): require_deb_packages('x11vnc') cmd = 'x11vnc -shared -forever -viewonly -rotate xy -nocursor -display :0' require.supervisor.process( 'vncserver', command=cmd, environment="DISPLAY=':0'", directory='/root', user='******', autostart='true', autorestart='true', startretries=10, stdout_logfile_maxbytes='1MB', stdout_logfile_backups=0, stderr_logfile_maxbytes='1MB', stderr_logfile_backups=0, )
def sphinx(): # they are not available in older releases require_deb_packages( ''' python-blockdiag python-seqdiag python-sphinxcontrib.blockdiag python-sphinxcontrib.seqdiag python-tablib ''', error_if_not_exists=False ) require_deb_packages( ''' gtkwave mercurial python-sphinx scrot texlive-fonts-recommended texlive-latex-extra ''' ) require_python_packages( ''' PyVirtualDisplay pyscreenshot sphinxcontrib-programoutput sphinxcontrib-programscreenshot sphinxcontrib-gtkwave sphinxcontrib-eagle eagexp discogui PyMouse ''') # sphinx-contrib if not is_installed('autorun'): if is_dir('/tmp/sphinx-contrib'): run('rm -rf /tmp/sphinx-contrib') with cd('/tmp'): run('hg clone https://bitbucket.org/birkenfeld/sphinx-contrib') install('/tmp/sphinx-contrib/autorun', use_sudo=True)
def desktop(): execute(desktop_basic) execute(wine) # execute(cdemu) require_deb_packages(''' inkscape terminator guake geany dia dia-shapes acetoneiso dosbox ''' )
def pyavr(): require_deb_packages( ''' build-essential libelf-dev python-dev swig ''' ) require_python_packages( ''' confduino entrypoint2 ino nanpy pyavrutils pysimavr pysimavrgui python-eeml ''')
def python_dev(): require_deb_packages( ''' bpython #curl # for pip download doxypy fabric ipython ipython-qtconsole pep8 pychecker pyflakes pypy python-all python-all-dev python-alsaaudio python-anyjson python-beautifulsoup python-cairo python-cjson python-configobj python-daemon python-decorator python-gobject python-gst0.10 python-h5py python-imaging python-lxml python-matplotlib python-mysqldb python-nose python-numpy python-pandas python-parallel python-pexpect # python-pip # disabled because we need the latest version python-psutil python-psutil python-pydot python-pygame python-pyglet python-pygraphviz python-pyparsing python-qt4 python-scipy python-scrapy python-serial python-simplejson python-six python-sympy python-sphinx python-squaremap python-stdeb python-tables python-tk python-traits python-traitsui python-uncertainties python-usb # python-virtualenv python-yaml runsnakerun swig ''' ) # for latest version require.deb.nopackage('python-pip') require.python.pip() require_python_packages( ''' aeon apscheduler autoflake autopep8 bunch cogapp construct decotrace easyprocess entrypoint2 fabtools ghp-import https://github.com/ronnix/fabtools/archive/master.zip path.py paved paver psidialogs pyformat python-dateutil pyunpack sh tox versioneer ''') # latest tox needs latest virtualenv require.deb.nopackage('python-virtualenv') require.python.package('virtualenv', use_sudo=True) require.directory('pythonpath')
def virtualbox_guest(version=VERSION): require_deb_packages(''' virtualbox-guest-utils virtualbox-guest-x11 ''' )
def povray(): # povray is back in 14.04 require_deb_packages('povray')