def build(self): download_to = join(self.get_downloads_directory(), "node-{}.tar.gz".format(self.version)) utils.download_file(download_to, self.download_url) if not exists(self.directory): makedirs(self.directory) utils.extract_archive(download_to, self.directory) self.bin_directory = join(self.directory, self.subdirectory, "bin") self.verify()
def build(self): download_to = join(self.get_downloads_directory(), "redis-{}.tar.gz".format(self.version)) utils.download_file(download_to, "http://download.redis.io/releases/redis-{}.tar.gz".format(self.version)) if not exists(self.directory): makedirs(self.directory) utils.extract_archive(download_to, self.directory) chdir(join(self.directory, "redis-{}".format(self.version))) call(["make"]) self.bin_directory = join(self.directory, "redis-{}".format(self.version), "src")
def build(self): download_url = "https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-{}.tar.gz".format( self.version, ) utils.download_file(join(self.get_downloads_directory(), "elasticsearch-{}.tar.gz".format(self.version)), download_url) if not exists(self.directory): utils.extract_archive( join(self.get_build_directory(), "elasticsearch-{}.tar.gz".format(self.version)), self.get_build_directory() ) self.bin_directory = join(self.directory, "bin")
def build(self): download_to = join(self.get_downloads_directory(), "rabbitmq-server-{0}.tar.gz".format(self.version)) download_url = "https://www.rabbitmq.com/releases/rabbitmq-server/v{0}/rabbitmq-server-{0}.tar.gz".format( self.version, ) utils.download_file(download_to, download_url) if not exists(self.directory): utils.extract_archive(download_to, self.get_build_directory()) chdir(self.directory) call(["make"]) call(["make", "install"]) self.bin_directory = join(self.directory, "scripts")
def build(self): download_to = join(self.get_downloads_directory(), "postgresql-{}.tar.gz".format(self.version)) utils.download_file(download_to, "https://ftp.postgresql.org/pub/source/v{0}/postgresql-{0}.tar.gz".format(self.version)) if not exists(self.directory): makedirs(self.directory) utils.extract_archive(download_to, self.directory) full_directory = join(self.directory, "postgresql-{}".format(self.version)) chdir(full_directory) call(["./configure", "--prefix={}".format(full_directory)]) call(["make"]) call(["make", "install"]) self.bin_directory = join(self.directory, "postgresql-{}".format(self.version), "bin")
def build(self): self.build_libevent() download_to = join(self.get_downloads_directory(), "memcache-{}.tar.gz".format(self.version)) download_url = "http://www.memcached.org/files/memcached-{}.tar.gz".format(self.version) utils.download_file(download_to, download_url) if not exists(self.directory): makedirs(self.directory) utils.extract_archive(download_to, self.directory) full_directory = join(self.directory, "memcached-{}".format(self.version)) chdir(full_directory) call(["./configure", "--prefix={}".format(full_directory), "--with-libevent={}".format(self.libevent_path)]) call(["make"]) call(["make", "install"]) self.bin_directory = join(self.directory, "memcached-{}".format(self.version))
def build_libevent(self): download_to = join(self.get_downloads_directory(), "libevent-{}.tar.gz".format(self.libevent_version)) download_url = "https://github.com/libevent/libevent/releases/download/release-{0}/libevent-{0}.tar.gz".format( self.libevent_version ) utils.download_file(download_to, download_url) if not exists(self.libevent_directory): makedirs(self.libevent_directory) utils.extract_archive(download_to, self.libevent_directory) full_directory = join(self.libevent_directory, "libevent-{}".format(self.libevent_version)) chdir(full_directory) call(["./configure", "--prefix={}".format(full_directory)]) call(["make"]) self.libevent_path = join(self.libevent_directory, "lib")
def build_libevent(self): download_to = join(self.get_downloads_directory(), "libevent-{}.tar.gz".format(self.libevent_version)) download_url = "https://github.com/libevent/libevent/releases/download/release-{0}/libevent-{0}.tar.gz".format( self.libevent_version) utils.download_file(download_to, download_url) if not exists(self.libevent_directory): makedirs(self.libevent_directory) utils.extract_archive(download_to, self.libevent_directory) full_directory = join(self.libevent_directory, "libevent-{}".format(self.libevent_version)) chdir(full_directory) call(["./configure", "--prefix={}".format(full_directory)]) call(["make"]) self.libevent_path = join(self.libevent_directory, "lib")
def build(self): download_to = join(self.get_downloads_directory(), "mysql-{}.tar.gz".format(self.version)) download_url = "http://dev.mysql.com/get/Downloads/MySQL-{0}/mysql-{1}.tar.gz".format( ".".join(self.version.split(".")[:2]), self.version, ) utils.download_file(download_to, download_url) if not exists(self.directory): utils.extract_archive(download_to, self.get_build_directory()) chdir(self.directory) check_call(["./BUILD/compile-dist"]) check_call([ "./configure", "--prefix={}".format(self.directory), "--enable-assembler", "--with-mysqld-ldflags=-all-static", "--with-client-ldflags=-all-static", "--with-mysqld-user={}".format(getpass.getuser()), "--with-unix-socket-path={}/tmp/mysql.sock".format( self.directory), "--localstatedir={}/data".format(self.directory), ]) check_call(["make"]) check_call(["make", "install"]) makedirs("tmp") st = os.stat('scripts/mysql_install_db.sh') chmod('scripts/mysql_install_db.sh', st.st_mode | stat.S_IEXEC) st = os.stat('scripts/mysql_install_db') chmod('scripts/mysql_install_db', st.st_mode | stat.S_IEXEC) shutil.copyfile('scripts/mysql_install_db.sh', 'bin/mysql_install_db.sh') st = os.stat('bin/mysql_install_db.sh') chmod('bin/mysql_install_db.sh', st.st_mode | stat.S_IEXEC) shutil.copyfile('scripts/mysql_install_db', 'bin/mysql_install_db') st = os.stat('bin/mysql_install_db') chmod('bin/mysql_install_db', st.st_mode | stat.S_IEXEC) with open("my.cnf", "w") as mycnf_handle: mycnf_handle.write( MYCNF.format(self.directory, getpass.getuser())) self.bin_directory = join(self.directory, "bin")
def build(self): if sys.platform == "darwin": download_to = join( self.get_downloads_directory(), "firefox-{}.dmg".format(self.version) ) self.download_url = "{0}{1}/mac/en-US/Firefox%20{1}.dmg".format( RELEASE_URL_BASE, self.version ) else: download_to = join( self.get_downloads_directory(), "firefox-{}.tar.gz".format(self.version) ) systembits = struct.calcsize("P") * 8 if systembits == 32: self.download_url = "{0}{1}/linux-i686/en-US/firefox-{1}.tar.bz2".format( RELEASE_URL_BASE, self.version ) else: self.download_url = "{0}{1}/linux-x86_64/en-US/firefox-{1}.tar.bz2".format( RELEASE_URL_BASE, self.version ) utils.download_file(download_to, self.download_url) if sys.platform == "darwin": if not exists(self.directory): check_call([ "hdiutil", "attach", "-nobrowse", "-mountpoint", self.tmp_directory, download_to ]) makedirs(join(self.directory, "Firefox.app")) shutil.copytree( join(self.tmp_directory, "Firefox.app", "Contents"), join(self.directory, "Firefox.app", "Contents") ) check_call(["hdiutil", "detach", self.tmp_directory]) self.bin_directory = join(self.directory, "Firefox.app", "Contents", "MacOS") else: if not exists(self.directory): makedirs(self.directory) utils.extract_archive(download_to, self.directory) self.bin_directory = join(self.directory, "firefox") self.verify()
def build(self): download_to = join(self.get_downloads_directory(), "mysql-{}.tar.gz".format(self.version)) download_url = "http://dev.mysql.com/get/Downloads/MySQL-{0}/mysql-{1}.tar.gz".format( ".".join(self.version.split(".")[:2]), self.version, ) utils.download_file(download_to, download_url) if not exists(self.directory): utils.extract_archive(download_to, self.get_build_directory()) chdir(self.directory) check_call(["./BUILD/compile-dist"]) check_call([ "./configure", "--prefix={}".format(self.directory), "--enable-assembler", "--with-mysqld-ldflags=-all-static", "--with-client-ldflags=-all-static", "--with-mysqld-user={}".format(getpass.getuser()), "--with-unix-socket-path={}/tmp/mysql.sock".format(self.directory), "--localstatedir={}/data".format(self.directory), ]) check_call(["make"]) check_call(["make", "install"]) makedirs("tmp") st = os.stat('scripts/mysql_install_db.sh') chmod('scripts/mysql_install_db.sh', st.st_mode | stat.S_IEXEC) st = os.stat('scripts/mysql_install_db') chmod('scripts/mysql_install_db', st.st_mode | stat.S_IEXEC) shutil.copyfile('scripts/mysql_install_db.sh', 'bin/mysql_install_db.sh') st = os.stat('bin/mysql_install_db.sh') chmod('bin/mysql_install_db.sh', st.st_mode | stat.S_IEXEC) shutil.copyfile('scripts/mysql_install_db', 'bin/mysql_install_db') st = os.stat('bin/mysql_install_db') chmod('bin/mysql_install_db', st.st_mode | stat.S_IEXEC) with open("my.cnf", "w") as mycnf_handle: mycnf_handle.write(MYCNF.format(self.directory, getpass.getuser())) self.bin_directory = join(self.directory, "bin")
def build(self): self.build_libevent() download_to = join(self.get_downloads_directory(), "memcache-{}.tar.gz".format(self.version)) download_url = "http://www.memcached.org/files/memcached-{}.tar.gz".format( self.version) utils.download_file(download_to, download_url) if not exists(self.directory): makedirs(self.directory) utils.extract_archive(download_to, self.directory) full_directory = join(self.directory, "memcached-{}".format(self.version)) chdir(full_directory) call([ "./configure", "--prefix={}".format(full_directory), "--with-libevent={}".format(self.libevent_path) ]) call(["make"]) call(["make", "install"]) self.bin_directory = join(self.directory, "memcached-{}".format(self.version))