Example #1
0
def _install_php(version, fpm, xdebug):
    package.ensure(
        [
            "build-essential",
            "lemon",
            "libbz2-dev",
            "libpcre3-dev",
            "libc-client2007e-dev",
            "libcurl4-gnutls-dev",
            "libexpat1-dev",
            "libfreetype6-dev",
            "libgmp3-dev",
            "libicu-dev",
            "libjpeg8-dev",
            "libltdl-dev",
            "libmcrypt-dev",
            "libmhash-dev",
            "libpng12-dev",
            "libreadline-dev",
            "libssl1.0.0",
            "libssl-dev",
            "libt1-dev",
            "libtidy-dev",
            "libxml2-dev",
            "libxslt1-dev",
            "re2c",
            "zlib1g-dev",
        ]
    )

    def configure(value):
        key = "PHP_BUILD_CONFIGURE_OPTS"
        return 'export %(key)s="%(value)s $%(key)s"' % locals()

    prefix = "$HOME/.phpenv/versions/%s" % version

    # Force the usage of pear because pyrus is unable to install APC
    # See https://github.com/CHH/php-build/blob/master/man/php-build.1.ronn#L79
    pear_path = "%s/pear" % prefix
    pear = configure("--with-pear=%s" % pear_path)
    dir.ensure(pear_path, recursive=True)

    # We only support this two configuration options! Why?
    # - Xdebug is already integrated into php-build
    # - FPM is a very common flag
    #
    # But if you want to configure php even further? Own definition files!
    # See https://github.com/CHH/php-build/blob/master/man/php-build.1.ronn#L54
    fpm = (fpm and configure("--enable-fpm")) or "true"
    xdebug = (xdebug and "true") or 'export PHP_BUILD_XDEBUG_ENABLE="off"'

    with ctx.prefix(pear):
        with ctx.prefix(xdebug):
            with ctx.prefix(fpm):
                run("php-build %s %s" % (version, prefix))

    # Some executables (like php-fpm) aren't available through phpenv without
    # this symlinks
    with ctx.cd(prefix):
        run('find sbin/ -type f -exec ln -sf "$(pwd)/{}" -t "$(pwd)/bin" \;')
Example #2
0
def install():
    package.ensure("curl")

    if not command.exists("pythonbrew"):
        url = "https://raw.github.com" \
            + "/utahta/pythonbrew/master/pythonbrew-install"
        run("curl -s %s | bash" % url)
    else:
        run("pythonbrew update")
Example #3
0
def install():
    package.ensure(["git-core", "libssl-dev", "curl", "build-essential"])

    if not dir.exists(".nvm"):
        run("git clone git://github.com/creationix/nvm.git .nvm")
    else:
        with ctx.cd(".nvm"):
            run("git pull")

    _ensure_autoload(".bashrc")
    _ensure_autoload(".zshrc")
Example #4
0
def install():
    package.ensure("git-core")

    if not dir.exists(".rbenv"):
        run("git clone git://github.com/sstephenson/rbenv.git .rbenv")
    else:
        with ctx.cd(".rbenv"):
            run("git pull")

    _ensure_autoload(".bashrc")
    _ensure_autoload(".zshrc")
Example #5
0
def install():
    package.ensure(['git-core', 'curl', 'build-essential'])
    tmpdir = dir.temp()

    try:
        with ctx.cd(tmpdir):
            repo = 'git://github.com/sstephenson/ruby-build.git'
            run('git clone %s ./ --depth 1' % repo)
            sudo('./install.sh')
    finally:
        dir.remove(tmpdir, recursive=True)
Example #6
0
def install():
    package.ensure(["git-core", "openjdk-7-jre"])

    if not dir.exists(".awsenv"):
        run("git clone git://github.com/michaelcontento/awsenv.git .awsenv")
        return

    with ctx.cd(".awsenv"):
        run("git pull")

    _ensure_autoload(".bashrc")
    _ensure_autoload(".zshrc")
Example #7
0
def install(version=_VERSION, options=_OPTIONS):
    package.ensure(["git-core", "build-essential"])
    tmpdir = dir.temp()

    try:
        with ctx.cd(tmpdir):
            run("git clone git://github.com/antirez/redis.git ./ --depth 1")
            run("git checkout %s" % version)
            run("make %s > /dev/null" % options)
            sudo("make install")
    finally:
        dir.remove(tmpdir, recursive=True)
Example #8
0
def install(version=_VERSION, options=_OPTIONS):
    package.ensure(['git-core', 'build-essential'])
    tmpdir = dir.temp()

    try:
        with ctx.cd(tmpdir):
            run('git clone git://github.com/antirez/redis.git ./ --depth 1')
            run('git checkout %s' % version)
            run('make %s > /dev/null' % options)
            sudo('make install')
    finally:
        dir.remove(tmpdir, recursive=True)
Example #9
0
def install():
    package.ensure(["curl", "git-core"])

    if not dir.exists(".php-build"):
        core.run("git clone git://github.com/CHH/php-build .php-build")

    with ctx.cd(".php-build"):
        core.run("git pull")
        dir.create("versions")
        dir.create("tmp")

    _ensure_autoload(".bashrc")
    _ensure_autoload(".zshrc")
Example #10
0
def install():
    package.ensure(["curl", "git-core"])

    url = "https://raw.github.com/CHH/phpenv/master/bin/phpenv-install.sh"
    if not dir.exists(".phpenv"):
        run("curl -s %s | bash" % url)
    else:
        run("curl -s %s | UPDATE=yes bash" % url)

    dir.create(".phpenv/versions")

    _ensure_autoload(".bashrc")
    _ensure_autoload(".zshrc")
Example #11
0
def install(version=_VERSION, options=_OPTIONS):
    package.ensure(['git-core', 'libssl-dev', 'curl', 'build-essential'])
    tmpdir = dir.temp()

    try:
        with ctx.cd(tmpdir):
            repo = 'git://github.com/joyent/node.git' 
            run('git clone %s ./ --depth 1' % repo)
            run('git checkout %s' % version)
            run('./configure %s' % options)
            run('make > /dev/null')
            sudo('make install')
    finally:
        dir.remove(tmpdir, recursive=True)
Example #12
0
def install(version, _update=True):
    # Without this we would build python without the bz2 package
    package.ensure("libbz2-dev")

    pythonbrew.ensure()

    status = run("pythonbrew switch %s; true" % version)
    if status.find("not installed") != -1 or _update:
        run("pythonbrew install --no-test %s" % version)
        run("pythonbrew cleanup")
        run("pythonbrew switch %s" % version)

    run("pip install virtualenv")
    run("pip install virtualenvwrapper")
Example #13
0
def install():
    package.ensure("git-core")
    package.ensure([
        "build-essential", "zlib1g-dev", "libssl-dev", "libxml2-dev",
        "libsqlite3-dev"
    ])
    ruby_rbenv.ensure()

    dir.ensure(".rbenv/plugins")
    with ctx.cd(".rbenv/plugins"):
        if not dir.exists("ruby-build"):
            run("git clone git://github.com/sstephenson/ruby-build.git")
            return

        with ctx.cd("ruby-build"):
            run("git pull")
Example #14
0
def install():
    package.ensure("git-core")
    package.ensure([
        "build-essential", "zlib1g-dev", "libssl-dev",
        "libxml2-dev", "libsqlite3-dev"
    ])
    ruby_rbenv.ensure()

    dir.ensure(".rbenv/plugins")
    with ctx.cd(".rbenv/plugins"):
        if not dir.exists("ruby-build"):
            run("git clone git://github.com/sstephenson/ruby-build.git")
            return

        with ctx.cd("ruby-build"):
            run("git pull")
Example #15
0
def install(name=_DEFAULT_NAME, subnet=_DEFAULT_SUBNET, _update=True):
    packages = ["lxc", "debootstrap", "libvirt-bin"]
    if _update:
        package.install(packages)
    else:
        package.ensure(packages)

    networks = _list_networks()
    if name not in networks:
        _create_network(name, subnet)
        core.run("virsh net-start %s" % name)
    else:
        if not networks[name]:
            core.run("virsh net-start %s" % name)

    with ctx.sudo():
        config = _LXC_NETWORK % dict(name=name, subnet=subnet)
        file.write("/etc/lxc/net-lxc.conf", config, mode="a+r")
Example #16
0
def _install_php(version, fpm, xdebug):
    package.ensure([
        "build-essential", "lemon", "libbz2-dev", "libpcre3-dev",
        "libc-client2007e-dev", "libcurl4-gnutls-dev", "libexpat1-dev",
        "libfreetype6-dev", "libgmp3-dev", "libicu-dev", "libjpeg8-dev",
        "libltdl-dev", "libmcrypt-dev", "libmhash-dev", "libpng12-dev",
        "libreadline-dev", "libssl1.0.0", "libssl-dev", "libt1-dev",
        "libtidy-dev", "libxml2-dev", "libxslt1-dev", "re2c", "zlib1g-dev"
    ])

    def configure(value):
        key = "PHP_BUILD_CONFIGURE_OPTS"
        return 'export %(key)s="%(value)s $%(key)s"' % locals()

    prefix = "$HOME/.phpenv/versions/%s" % version

    # Force the usage of pear because pyrus is unable to install APC
    # See https://github.com/CHH/php-build/blob/master/man/php-build.1.ronn#L79
    pear_path = "%s/pear" % prefix
    pear = configure("--with-pear=%s" % pear_path)
    dir.ensure(pear_path, recursive=True)

    # We only support this two configuration options! Why?
    # - Xdebug is already integrated into php-build
    # - FPM is a very common flag
    #
    # But if you want to configure php even further? Own definition files!
    # See https://github.com/CHH/php-build/blob/master/man/php-build.1.ronn#L54
    fpm = (fpm and configure("--enable-fpm")) or "true"
    xdebug = (xdebug and "true") or 'export PHP_BUILD_XDEBUG_ENABLE="off"'

    with ctx.prefix(pear):
        with ctx.prefix(xdebug):
            with ctx.prefix(fpm):
                run("php-build %s %s" % (version, prefix))

    # Some executables (like php-fpm) aren't available through phpenv without
    # this symlinks
    with ctx.cd(prefix):
        run('find sbin/ -type f -exec ln -sf "$(pwd)/{}" -t "$(pwd)/bin" \;')
Example #17
0
def ensure():
    package.ensure(_TOOLS)
Example #18
0
def ensure():
    package.ensure(_TOOLS)
Example #19
0
def install():
    package.ensure(["curl", "git-core"])

    url = "https://raw.github.com" \
        + "/nvie/gitflow/develop/contrib/gitflow-installer.sh"
    sudo("curl -s %s | bash" % url)
Example #20
0
def install():
    package.ensure(["curl", "git-core", "make"])

    url = "https://raw.github.com/visionmedia/git-extras/master/bin/git-extras"
    sudo("curl -s %s | INSTALL=y sh" % url)
Example #21
0
def install():
    package.ensure(["curl", "git-core"])

    url = "https://raw.github.com/michaelcontento/git-chiefs/master/install"
    sudo("curl -s %s | bash" % url)