summaryrefslogtreecommitdiff
path: root/config/software/asdf_php.rb
diff options
context:
space:
mode:
authormo khan <mo.khan@gmail.com>2020-08-04 14:51:49 -0600
committermo khan <mo.khan@gmail.com>2020-08-04 18:18:36 -0600
commit4b130604be2dcd96bde5f708e0f4dc91f86bd89b (patch)
treeb8333834b2be76fdd357a22fcda7212909e32eef /config/software/asdf_php.rb
parented6e39123472fecf4eb8fef1e75db28a3b4d1ff2 (diff)
Build debian packages for tools
Diffstat (limited to 'config/software/asdf_php.rb')
-rw-r--r--config/software/asdf_php.rb37
1 files changed, 37 insertions, 0 deletions
diff --git a/config/software/asdf_php.rb b/config/software/asdf_php.rb
new file mode 100644
index 0000000..3225ac8
--- /dev/null
+++ b/config/software/asdf_php.rb
@@ -0,0 +1,37 @@
+# frozen_string_literal: true
+
+name "asdf_php"
+default_version "7.4.8"
+license_file "LICENSE"
+
+dependency "autoconf"
+dependency "libtool"
+dependency "libxml2"
+dependency "openssl"
+dependency "zlib"
+dependency "libsqlite3"
+
+source url: "https://www.php.net/distributions/php-#{version}.tar.gz"
+relative_path "php-#{version}"
+
+version("7.4.8") { source sha256: "649f6bcdb60dc38d5edd7f3a7b2905d15d88c1d13e40307e8972ede347cea6ba" }
+
+build do
+ env = with_standard_compiler_flags(with_embedded_path)
+ configure_command = [
+ "--prefix=#{install_dir}",
+ "--with-openssl=#{install_dir}/embedded"
+ ]
+ configure(*configure_command, env: env)
+ make "-j #{workers}", env: env
+ make "-j #{workers} install", env: env
+end
+
+build do
+ command "curl https://getcomposer.org/installer -o #{project_dir}/composer-setup.php"
+ command "#{install_dir}/bin/php #{project_dir}/composer-setup.php --install-dir=#{install_dir}/bin --filename=composer"
+end
+
+build do
+ delete "#{install_dir}/embedded/bin/sqlite3"
+end