Example #1
0
    def on_after_upload(self):
        for src, dst in self._shares:
            dst = dst % self.folders

            dir.ensure(posixpath.dirname(src), recursive=True)
            dir.ensure(dst, recursive=True)
            file.link(dst, src)
Example #2
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 #3
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 #4
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 #5
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" \;')