Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
chromebrew
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
chromebrew
Commits
eddc0a44
Commit
eddc0a44
authored
Apr 08, 2018
by
Chris Thurber
Committed by
GitHub
Apr 08, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2213 from uberhacker/update-php-packages
Update php packages
parents
443d11aa
9e0af0a8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
180 additions
and
110 deletions
+180
-110
packages/php.rb
packages/php.rb
+57
-78
packages/php5.rb
packages/php5.rb
+65
-16
packages/php7.rb
packages/php7.rb
+58
-16
No files found.
packages/php.rb
View file @
eddc0a44
...
@@ -3,84 +3,80 @@ require 'package'
...
@@ -3,84 +3,80 @@ require 'package'
class
Php
<
Package
class
Php
<
Package
description
'PHP is a popular general-purpose scripting language that is especially suited to web development.'
description
'PHP is a popular general-purpose scripting language that is especially suited to web development.'
homepage
'http://www.php.net/'
homepage
'http://www.php.net/'
version
'5.6.3
4-7.2.3
'
version
'5.6.3
5-7.2.4
'
if
ARGV
[
0
]
==
'install'
if
ARGV
[
0
]
==
'install'
phpver
=
`php -v 2> /dev/null | head -1 | cut -d' ' -f2`
.
chomp
phpver
=
`php -v 2> /dev/null | head -1 | cut -d' ' -f2`
.
chomp
abort
"Php version
#{
phpver
}
already installed."
.
lightgreen
unless
"
#{
phpver
}
"
==
""
abort
"Php version
#{
phpver
}
already installed."
.
lightgreen
unless
"
#{
phpver
}
"
==
""
puts
puts
puts
"Enter the php version to install:"
puts
"Enter the php version to install:"
puts
"5.6 = PHP 5.6.3
4
"
puts
"5.6 = PHP 5.6.3
5
"
puts
"7.0 = PHP 7.0.2
8
"
puts
"7.0 = PHP 7.0.2
9
"
puts
"7.1 = PHP 7.1.1
5
"
puts
"7.1 = PHP 7.1.1
6
"
puts
"7.2 = PHP 7.2.
3
"
puts
"7.2 = PHP 7.2.
4
"
puts
" 0 = Cancel"
puts
" 0 = Cancel"
while
version
=
STDIN
.
gets
.
chomp
while
version
=
STDIN
.
gets
.
chomp
case
version
case
version
when
'5.6'
when
'5.6'
source_url
'https://php.net/distributions/php-5.6.34.tar.xz'
source_sha256
'21453be3a045204cd2717543ef42771324f411f40962ecda4fe841930a933128'
binary_url
({
binary_url
({
aarch64:
'https://dl.bintray.com/chromebrew/chromebrew/php5-5.6.3
4
-chromeos-armv7l.tar.xz'
,
aarch64:
'https://dl.bintray.com/chromebrew/chromebrew/php5-5.6.3
5
-chromeos-armv7l.tar.xz'
,
armv7l:
'https://dl.bintray.com/chromebrew/chromebrew/php5-5.6.3
4
-chromeos-armv7l.tar.xz'
,
armv7l:
'https://dl.bintray.com/chromebrew/chromebrew/php5-5.6.3
5
-chromeos-armv7l.tar.xz'
,
i686:
'https://dl.bintray.com/chromebrew/chromebrew/php5-5.6.3
4
-chromeos-i686.tar.xz'
,
i686:
'https://dl.bintray.com/chromebrew/chromebrew/php5-5.6.3
5
-chromeos-i686.tar.xz'
,
x86_64:
'https://dl.bintray.com/chromebrew/chromebrew/php5-5.6.3
4
-chromeos-x86_64.tar.xz'
,
x86_64:
'https://dl.bintray.com/chromebrew/chromebrew/php5-5.6.3
5
-chromeos-x86_64.tar.xz'
,
})
})
binary_sha256
({
binary_sha256
({
aarch64:
'
a1eecf07f549303f9c7f397e1a0f947b743e96c0d61da29bc8beb24b0d44b64f
'
,
aarch64:
'
d3effb35a61f47e79ae459b36b49ee40bfc2a30626cee8bf73f5614965413cdd
'
,
armv7l:
'
a1eecf07f549303f9c7f397e1a0f947b743e96c0d61da29bc8beb24b0d44b64f
'
,
armv7l:
'
d3effb35a61f47e79ae459b36b49ee40bfc2a30626cee8bf73f5614965413cdd
'
,
i686:
'
bbea0f8f7edcde6fb72e97ed8f1088c7445ff2262e2c41e92fce66b7e7b0f42c
'
,
i686:
'
96430c77f94a022f8b94734af36614368f26d3b2bab8bb4f240c3b908e729e52
'
,
x86_64:
'
fcb5e4863e7a2a5fe4689027f843ffd458e2151ae9bf4a6ee9333b66bc4df96f
'
,
x86_64:
'
0772f8d82fd27a2d3bae83d27929950cc80db59d2e0f70d8db04f131f6cad753
'
,
})
})
$ver
=
5
break
break
when
'7.0'
when
'7.0'
source_url
'https://php.net/distributions/php-7.0.28.tar.xz'
source_sha256
'e738ffce2c30bc0e84be9446af86bef0a0607d321f1a3d04bbfe2402fb5f6de0'
binary_url
({
binary_url
({
aarch64:
'https://dl.bintray.com/chromebrew/chromebrew/php7-7.0.2
8
-chromeos-armv7l.tar.xz'
,
aarch64:
'https://dl.bintray.com/chromebrew/chromebrew/php7-7.0.2
9
-chromeos-armv7l.tar.xz'
,
armv7l:
'https://dl.bintray.com/chromebrew/chromebrew/php7-7.0.2
8
-chromeos-armv7l.tar.xz'
,
armv7l:
'https://dl.bintray.com/chromebrew/chromebrew/php7-7.0.2
9
-chromeos-armv7l.tar.xz'
,
i686:
'https://dl.bintray.com/chromebrew/chromebrew/php7-7.0.2
8
-chromeos-i686.tar.xz'
,
i686:
'https://dl.bintray.com/chromebrew/chromebrew/php7-7.0.2
9
-chromeos-i686.tar.xz'
,
x86_64:
'https://dl.bintray.com/chromebrew/chromebrew/php7-7.0.2
8
-chromeos-x86_64.tar.xz'
,
x86_64:
'https://dl.bintray.com/chromebrew/chromebrew/php7-7.0.2
9
-chromeos-x86_64.tar.xz'
,
})
})
binary_sha256
({
binary_sha256
({
aarch64:
'
4fa2d6fa475885ad617595fb2c7ca0cdecd5b6fd21d1ed20cf1d2148a962e569
'
,
aarch64:
'
cef6f7257f89af0a97e4f7dae53fdddbd07c4c7c31041009bb3d06496878a3c8
'
,
armv7l:
'
4fa2d6fa475885ad617595fb2c7ca0cdecd5b6fd21d1ed20cf1d2148a962e569
'
,
armv7l:
'
cef6f7257f89af0a97e4f7dae53fdddbd07c4c7c31041009bb3d06496878a3c8
'
,
i686:
'
cd87ea91b289f9abd9a0e90dea1583be16bb48e1fdbbd2808de9b2166c70b30e
'
,
i686:
'
f0e7a0cba2abe6d0864d90bd2a0236b47f9e2377d77604ffb2affa34663045dc
'
,
x86_64:
'
080ed99678f869cd65f712e0a970f77c920dd3ee9c2af9e7fc5ad5bbce3d273f
'
,
x86_64:
'
efbe00b2660a59a37684e46401c7ed1dfecf39d768af17b8c16aef08ec7424fc
'
,
})
})
$ver
=
7
break
break
when
'7.1'
when
'7.1'
source_url
'https://php.net/distributions/php-7.1.15.tar.xz'
source_sha256
'0e17192fb43532e4ebaa190ecec9c7e59deea7dadb7dab67b19c2081a68bd817'
binary_url
({
binary_url
({
aarch64:
'https://dl.bintray.com/chromebrew/chromebrew/php7-7.1.1
5
-chromeos-armv7l.tar.xz'
,
aarch64:
'https://dl.bintray.com/chromebrew/chromebrew/php7-7.1.1
6
-chromeos-armv7l.tar.xz'
,
armv7l:
'https://dl.bintray.com/chromebrew/chromebrew/php7-7.1.1
5
-chromeos-armv7l.tar.xz'
,
armv7l:
'https://dl.bintray.com/chromebrew/chromebrew/php7-7.1.1
6
-chromeos-armv7l.tar.xz'
,
i686:
'https://dl.bintray.com/chromebrew/chromebrew/php7-7.1.1
5
-chromeos-i686.tar.xz'
,
i686:
'https://dl.bintray.com/chromebrew/chromebrew/php7-7.1.1
6
-chromeos-i686.tar.xz'
,
x86_64:
'https://dl.bintray.com/chromebrew/chromebrew/php7-7.1.1
5
-chromeos-x86_64.tar.xz'
,
x86_64:
'https://dl.bintray.com/chromebrew/chromebrew/php7-7.1.1
6
-chromeos-x86_64.tar.xz'
,
})
})
binary_sha256
({
binary_sha256
({
aarch64:
'
cb84ec920f0d9258852f4f4e7e7c7717b9eeed9199f2368c097aac390261c24d
'
,
aarch64:
'
9d3daf1119195a8787a61c25d427077f1e008e785698b8310458a53322300b57
'
,
armv7l:
'
cb84ec920f0d9258852f4f4e7e7c7717b9eeed9199f2368c097aac390261c24d
'
,
armv7l:
'
9d3daf1119195a8787a61c25d427077f1e008e785698b8310458a53322300b57
'
,
i686:
'
1a48ea2f2fcb0dbbc94e537302b61ae6ec973a3ac21b56461f6be3cd8f626325
'
,
i686:
'
dcfb2bf1ae0b7462b512ccdc70ec5f34529c5811cb01b58f1688fed437eaf559
'
,
x86_64:
'
dc54175f4258696b994881d6fc4d1ef89a77099a1722316661517567e540510
8'
,
x86_64:
'
0f0f2ad8abf56ff758e9a1ce0b6fce0c9108716a318e6f8d508931ae7b39365
8'
,
})
})
$ver
=
7
break
break
when
'7.2'
when
'7.2'
source_url
'https://php.net/distributions/php-7.2.3.tar.xz'
source_sha256
'b3a94f1b562f413c0b96f54bc309706d83b29ac65d9b172bc7ed9fb40a5e651f'
binary_url
({
binary_url
({
aarch64:
'https://dl.bintray.com/chromebrew/chromebrew/php7-7.2.
3
-chromeos-armv7l.tar.xz'
,
aarch64:
'https://dl.bintray.com/chromebrew/chromebrew/php7-7.2.
4
-chromeos-armv7l.tar.xz'
,
armv7l:
'https://dl.bintray.com/chromebrew/chromebrew/php7-7.2.
3
-chromeos-armv7l.tar.xz'
,
armv7l:
'https://dl.bintray.com/chromebrew/chromebrew/php7-7.2.
4
-chromeos-armv7l.tar.xz'
,
i686:
'https://dl.bintray.com/chromebrew/chromebrew/php7-7.2.
3
-chromeos-i686.tar.xz'
,
i686:
'https://dl.bintray.com/chromebrew/chromebrew/php7-7.2.
4
-chromeos-i686.tar.xz'
,
x86_64:
'https://dl.bintray.com/chromebrew/chromebrew/php7-7.2.
3
-chromeos-x86_64.tar.xz'
,
x86_64:
'https://dl.bintray.com/chromebrew/chromebrew/php7-7.2.
4
-chromeos-x86_64.tar.xz'
,
})
})
binary_sha256
({
binary_sha256
({
aarch64:
'
076113ce15e8e5f0e2176924d296a9b936fa6e269e2b6d9e9ca2b2b3493f5267
'
,
aarch64:
'
3cf53ef772dada3e75f9582d67648b5136668a9a86bda5ed506c555103c597e3
'
,
armv7l:
'
076113ce15e8e5f0e2176924d296a9b936fa6e269e2b6d9e9ca2b2b3493f5267
'
,
armv7l:
'
3cf53ef772dada3e75f9582d67648b5136668a9a86bda5ed506c555103c597e3
'
,
i686:
'
c8ee47aee521aa13748e0d0a701fd67c8a4aae98a3a8b05aa4fdf01e3b0eb9c4
'
,
i686:
'
2a9969194dba7b3c03fa13519d136402a2b67f54742af4cae365b70bdbee8300
'
,
x86_64:
'
d38bc3cd1ddbc24c9803aac7d30dfdf1620e67f83b3feeb142ec4bdb35deb825
'
,
x86_64:
'
07832256ee0f311534432a5cf074e179a4f1928627af868c63b16b5a4e23dc1d
'
,
})
})
$ver
=
7
break
break
when
'0'
when
'0'
abort
abort
...
@@ -91,38 +87,21 @@ class Php < Package
...
@@ -91,38 +87,21 @@ class Php < Package
end
end
end
end
depends_on
'pkgconfig'
=>
:build
def
self
.
postinstall
depends_on
'zlibpkg'
puts
depends_on
'libgcrypt'
puts
"To start the php-fpm service, execute:"
.
lightblue
depends_on
'libpng'
puts
"php
#{
$ver
}
-fpm start"
.
lightblue
depends_on
'libxml2'
puts
depends_on
'libxslt'
puts
"To stop the php-fpm service, execute:"
.
lightblue
depends_on
'openssl'
puts
"php
#{
$ver
}
-fpm stop"
.
lightblue
depends_on
'curl'
puts
depends_on
'pcre'
puts
"To restart the php-fpm service, execute:"
.
lightblue
depends_on
'readline'
puts
"php
#{
$ver
}
-fpm restart"
.
lightblue
puts
def
self
.
build
puts
"To start php-fpm on login, execute the following:"
.
lightblue
system
"./configure \
puts
"echo 'if [ -f
#{
CREW_PREFIX
}
/bin/php
#{
$ver
}
-fpm ]; then' >> ~/.bashrc"
.
lightblue
--prefix=
#{
CREW_PREFIX
}
\
puts
"echo '
#{
CREW_PREFIX
}
/bin/php
#{
$ver
}
-fpm start' >> ~/.bashrc"
.
lightblue
--libdir=
#{
CREW_LIB_PREFIX
}
\
puts
"echo 'fi' >> ~/.bashrc"
.
lightblue
--with-curl \
puts
"source ~/.bashrc"
.
lightblue
--with-gd \
--with-xsl \
--enable-mbstring \
--with-openssl \
--with-pcre-regex \
--with-readline \
--with-zlib"
system
'make'
end
def
self
.
install
system
"make"
,
"INSTALL_ROOT=
#{
CREW_DEST_DIR
}
"
,
"install"
# clean up some files created under #{CREW_DEST_DIR}. check http://pear.php.net/bugs/bug.php?id=20383 for more details
system
"mv"
,
"
#{
CREW_DEST_DIR
}
/.depdb"
,
"
#{
CREW_DEST_LIB_PREFIX
}
/php"
system
"mv"
,
"
#{
CREW_DEST_DIR
}
/.depdblock"
,
"
#{
CREW_DEST_LIB_PREFIX
}
/php"
system
"rm"
,
"-rf"
,
"
#{
CREW_DEST_DIR
}
/.channels"
,
"
#{
CREW_DEST_DIR
}
/.filemap"
,
"
#{
CREW_DEST_DIR
}
/.lock"
,
"
#{
CREW_DEST_DIR
}
/.registry"
end
end
end
end
packages/php5.rb
View file @
eddc0a44
...
@@ -3,42 +3,66 @@ require 'package'
...
@@ -3,42 +3,66 @@ require 'package'
class
Php5
<
Package
class
Php5
<
Package
description
'PHP is a popular general-purpose scripting language that is especially suited to web development.'
description
'PHP is a popular general-purpose scripting language that is especially suited to web development.'
homepage
'http://www.php.net/'
homepage
'http://www.php.net/'
version
'5.6.3
4
'
version
'5.6.3
5
'
source_url
'http://php.net/distributions/php-5.6.3
4
.tar.xz'
source_url
'http://php.net/distributions/php-5.6.3
5
.tar.xz'
source_sha256
'
21453be3a045204cd2717543ef42771324f411f40962ecda4fe841930a933128
'
source_sha256
'
9985cb64cb8224c289effff5b34f670d14f838175f76daea0507d643eec650d2
'
binary_url
({
binary_url
({
aarch64:
'https://dl.bintray.com/chromebrew/chromebrew/php5-5.6.3
4
-chromeos-armv7l.tar.xz'
,
aarch64:
'https://dl.bintray.com/chromebrew/chromebrew/php5-5.6.3
5
-chromeos-armv7l.tar.xz'
,
armv7l:
'https://dl.bintray.com/chromebrew/chromebrew/php5-5.6.3
4
-chromeos-armv7l.tar.xz'
,
armv7l:
'https://dl.bintray.com/chromebrew/chromebrew/php5-5.6.3
5
-chromeos-armv7l.tar.xz'
,
i686:
'https://dl.bintray.com/chromebrew/chromebrew/php5-5.6.3
4
-chromeos-i686.tar.xz'
,
i686:
'https://dl.bintray.com/chromebrew/chromebrew/php5-5.6.3
5
-chromeos-i686.tar.xz'
,
x86_64:
'https://dl.bintray.com/chromebrew/chromebrew/php5-5.6.3
4
-chromeos-x86_64.tar.xz'
,
x86_64:
'https://dl.bintray.com/chromebrew/chromebrew/php5-5.6.3
5
-chromeos-x86_64.tar.xz'
,
})
})
binary_sha256
({
binary_sha256
({
aarch64:
'
21f7c51091347184fa94f298d229e7cd60892e4a5286d65b03443c1847105741
'
,
aarch64:
'
d3effb35a61f47e79ae459b36b49ee40bfc2a30626cee8bf73f5614965413cdd
'
,
armv7l:
'
21f7c51091347184fa94f298d229e7cd60892e4a5286d65b03443c1847105741
'
,
armv7l:
'
d3effb35a61f47e79ae459b36b49ee40bfc2a30626cee8bf73f5614965413cdd
'
,
i686:
'
e0964018f1b9e26c0c3979ab062c6d7d4b10a90971a7c8f7d434ab11847fb21f
'
,
i686:
'
96430c77f94a022f8b94734af36614368f26d3b2bab8bb4f240c3b908e729e52
'
,
x86_64:
'
987c1b2a993ad2da290e356bc9d853f8be7ea401b9c4d8925c7e4c294174df1c
'
,
x86_64:
'
0772f8d82fd27a2d3bae83d27929950cc80db59d2e0f70d8db04f131f6cad753
'
,
})
})
depends_on
'pkgconfig'
depends_on
'libgcrypt'
depends_on
'zlibpkg'
depends_on
'libpng'
depends_on
'libpng'
depends_on
'libxml2'
depends_on
'libxslt'
depends_on
'libxslt'
depends_on
'openssl'
depends_on
'curl'
depends_on
'curl'
depends_on
'pcre'
depends_on
'pcre'
depends_on
'readline'
depends_on
'readline'
def
self
.
build
def
self
.
build
libdir
=
'lib'
libdir
=
'lib64'
if
ARCH
==
'x86_64'
system
"sed -i 's,;pid = run/php-fpm.pid,pid =
#{
CREW_PREFIX
}
/tmp/run/php-fpm.pid,' sapi/fpm/php-fpm.conf.in"
system
"sed -i 's,;error_log = log/php-fpm.log,error_log =
#{
CREW_PREFIX
}
/log/php-fpm.log,' sapi/fpm/php-fpm.conf.in"
system
"sed -i 's,include=@php_fpm_sysconfdir@/php-fpm.d,include=
#{
CREW_PREFIX
}
/etc/php-fpm.d,' sapi/fpm/php-fpm.conf.in"
system
"sed -i 's,^user,;user,' sapi/fpm/php-fpm.conf.in"
system
"sed -i 's,^group,;group,' sapi/fpm/php-fpm.conf.in"
system
"sed -i 's,^user,;user,' sapi/fpm/www.conf.in"
system
"sed -i 's,^group,;group,' sapi/fpm/www.conf.in"
system
"sed -i 's,@sbindir@,
#{
CREW_PREFIX
}
/bin,' sapi/fpm/init.d.php-fpm.in"
system
"sed -i 's,@sysconfdir@,
#{
CREW_PREFIX
}
/etc,' sapi/fpm/init.d.php-fpm.in"
system
"sed -i 's,@localstatedir@,
#{
CREW_PREFIX
}
/tmp,' sapi/fpm/init.d.php-fpm.in"
# Set some sane defaults
system
"sed -i 's,post_max_size = 8M,post_max_size = 128M,' php.ini-development"
system
"sed -i 's,upload_max_filesize = 2M,upload_max_filesize = 128M,' php.ini-development"
system
"sed -i 's,;opcache.enable=0,opcache.enable=1,' php.ini-development"
system
"./configure \
system
"./configure \
--prefix=
#{
CREW_PREFIX
}
\
--prefix=
#{
CREW_PREFIX
}
\
--docdir=
#{
CREW_PREFIX
}
/doc \
--infodir=
#{
CREW_PREFIX
}
/info \
--libdir=
#{
CREW_LIB_PREFIX
}
\
--libdir=
#{
CREW_LIB_PREFIX
}
\
--localstatedir=
#{
CREW_PREFIX
}
/tmp \
--mandir=
#{
CREW_PREFIX
}
/man \
--sbindir=
#{
CREW_PREFIX
}
/bin \
--with-config-file-path=
#{
CREW_PREFIX
}
/etc \
--with-libdir=
#{
libdir
}
\
--enable-fpm \
--enable-mbstring \
--enable-opcache \
--with-curl \
--with-curl \
--with-gd \
--with-gd \
--with-xsl \
--with-xsl \
--
enable-mbstring
\
--
with-mysqli
\
--with-openssl \
--with-openssl \
--with-pdo-mysql \
--with-pcre-regex \
--with-pcre-regex \
--with-readline \
--with-readline \
--with-zlib"
--with-zlib"
...
@@ -46,11 +70,36 @@ class Php5 < Package
...
@@ -46,11 +70,36 @@ class Php5 < Package
end
end
def
self
.
install
def
self
.
install
system
"mkdir -p
#{
CREW_DEST_PREFIX
}
/log"
system
"mkdir -p
#{
CREW_DEST_PREFIX
}
/tmp/run"
system
"make"
,
"INSTALL_ROOT=
#{
CREW_DEST_DIR
}
"
,
"install"
system
"make"
,
"INSTALL_ROOT=
#{
CREW_DEST_DIR
}
"
,
"install"
system
"install -Dm644 php.ini-development
#{
CREW_DEST_PREFIX
}
/etc/php.ini"
system
"install -Dm755 sapi/fpm/init.d.php-fpm.in
#{
CREW_DEST_PREFIX
}
/etc/init.d/php-fpm"
system
"install -Dm644 sapi/fpm/php-fpm.conf.in
#{
CREW_DEST_PREFIX
}
/etc/php-fpm.conf"
system
"install -Dm644 sapi/fpm/www.conf.in
#{
CREW_DEST_PREFIX
}
/etc/php-fpm.d/www.conf"
system
"ln -s
#{
CREW_PREFIX
}
/etc/init.d/php-fpm
#{
CREW_DEST_PREFIX
}
/bin/php5-fpm"
# clean up some files created under #{CREW_DEST_DIR}. check http://pear.php.net/bugs/bug.php?id=20383 for more details
# clean up some files created under #{CREW_DEST_DIR}. check http://pear.php.net/bugs/bug.php?id=20383 for more details
system
"mv"
,
"
#{
CREW_DEST_DIR
}
/.depdb"
,
"
#{
CREW_DEST_LIB_PREFIX
}
/php"
system
"mv"
,
"
#{
CREW_DEST_DIR
}
/.depdb"
,
"
#{
CREW_DEST_LIB_PREFIX
}
/php"
system
"mv"
,
"
#{
CREW_DEST_DIR
}
/.depdblock"
,
"
#{
CREW_DEST_LIB_PREFIX
}
/php"
system
"mv"
,
"
#{
CREW_DEST_DIR
}
/.depdblock"
,
"
#{
CREW_DEST_LIB_PREFIX
}
/php"
system
"rm"
,
"-rf"
,
"
#{
CREW_DEST_DIR
}
/.channels"
,
"
#{
CREW_DEST_DIR
}
/.filemap"
,
"
#{
CREW_DEST_DIR
}
/.lock"
,
"
#{
CREW_DEST_DIR
}
/.registry"
system
"rm"
,
"-rf"
,
"
#{
CREW_DEST_DIR
}
/.channels"
,
"
#{
CREW_DEST_DIR
}
/.filemap"
,
"
#{
CREW_DEST_DIR
}
/.lock"
,
"
#{
CREW_DEST_DIR
}
/.registry"
end
end
def
self
.
postinstall
puts
puts
"To start the php-fpm service, execute:"
.
lightblue
puts
"php5-fpm start"
.
lightblue
puts
puts
"To stop the php-fpm service, execute:"
.
lightblue
puts
"php5-fpm stop"
.
lightblue
puts
puts
"To restart the php-fpm service, execute:"
.
lightblue
puts
"php5-fpm restart"
.
lightblue
puts
puts
"To start php-fpm on login, execute the following:"
.
lightblue
puts
"echo 'if [ -f
#{
CREW_PREFIX
}
/bin/php5-fpm ]; then' >> ~/.bashrc"
.
lightblue
puts
"echo '
#{
CREW_PREFIX
}
/bin/php5-fpm start' >> ~/.bashrc"
.
lightblue
puts
"echo 'fi' >> ~/.bashrc"
.
lightblue
puts
"source ~/.bashrc"
.
lightblue
end
end
end
packages/php7.rb
View file @
eddc0a44
...
@@ -3,35 +3,45 @@ require 'package'
...
@@ -3,35 +3,45 @@ require 'package'
class
Php7
<
Package
class
Php7
<
Package
description
'PHP is a popular general-purpose scripting language that is especially suited to web development.'
description
'PHP is a popular general-purpose scripting language that is especially suited to web development.'
homepage
'http://www.php.net/'
homepage
'http://www.php.net/'
version
'7.2.
3
'
version
'7.2.
4
'
source_url
'https://php.net/distributions/php-7.2.
3
.tar.xz'
source_url
'https://php.net/distributions/php-7.2.
4
.tar.xz'
source_sha256
'
b3a94f1b562f413c0b96f54bc309706d83b29ac65d9b172bc7ed9fb40a5e651f
'
source_sha256
'
7916b1bd148ddfd46d7f8f9a517d4b09cd8a8ad9248734e7c8dd91ef17057a88
'
binary_url
({
binary_url
({
aarch64:
'https://dl.bintray.com/chromebrew/chromebrew/php7-7.2.
3
-chromeos-armv7l.tar.xz'
,
aarch64:
'https://dl.bintray.com/chromebrew/chromebrew/php7-7.2.
4
-chromeos-armv7l.tar.xz'
,
armv7l:
'https://dl.bintray.com/chromebrew/chromebrew/php7-7.2.
3
-chromeos-armv7l.tar.xz'
,
armv7l:
'https://dl.bintray.com/chromebrew/chromebrew/php7-7.2.
4
-chromeos-armv7l.tar.xz'
,
i686:
'https://dl.bintray.com/chromebrew/chromebrew/php7-7.2.
3
-chromeos-i686.tar.xz'
,
i686:
'https://dl.bintray.com/chromebrew/chromebrew/php7-7.2.
4
-chromeos-i686.tar.xz'
,
x86_64:
'https://dl.bintray.com/chromebrew/chromebrew/php7-7.2.
3
-chromeos-x86_64.tar.xz'
,
x86_64:
'https://dl.bintray.com/chromebrew/chromebrew/php7-7.2.
4
-chromeos-x86_64.tar.xz'
,
})
})
binary_sha256
({
binary_sha256
({
aarch64:
'
076113ce15e8e5f0e2176924d296a9b936fa6e269e2b6d9e9ca2b2b3493f5267
'
,
aarch64:
'
3cf53ef772dada3e75f9582d67648b5136668a9a86bda5ed506c555103c597e3
'
,
armv7l:
'
076113ce15e8e5f0e2176924d296a9b936fa6e269e2b6d9e9ca2b2b3493f5267
'
,
armv7l:
'
3cf53ef772dada3e75f9582d67648b5136668a9a86bda5ed506c555103c597e3
'
,
i686:
'
c8ee47aee521aa13748e0d0a701fd67c8a4aae98a3a8b05aa4fdf01e3b0eb9c4
'
,
i686:
'
2a9969194dba7b3c03fa13519d136402a2b67f54742af4cae365b70bdbee8300
'
,
x86_64:
'
d38bc3cd1ddbc24c9803aac7d30dfdf1620e67f83b3feeb142ec4bdb35deb825
'
,
x86_64:
'
07832256ee0f311534432a5cf074e179a4f1928627af868c63b16b5a4e23dc1d
'
,
})
})
depends_on
'pkgconfig'
depends_on
'zlibpkg'
depends_on
'libgcrypt'
depends_on
'libgcrypt'
depends_on
'libpng'
depends_on
'libpng'
depends_on
'libxml2'
depends_on
'libxslt'
depends_on
'libxslt'
depends_on
'openssl'
depends_on
'curl'
depends_on
'curl'
depends_on
'pcre'
depends_on
'pcre'
depends_on
'readline'
depends_on
'readline'
def
self
.
build
def
self
.
build
libdir
=
'lib'
libdir
=
'lib64'
if
ARCH
==
'x86_64'
system
"sed -i 's,;pid = run/php-fpm.pid,pid =
#{
CREW_PREFIX
}
/tmp/run/php-fpm.pid,' sapi/fpm/php-fpm.conf.in"
system
"sed -i 's,;error_log = log/php-fpm.log,error_log =
#{
CREW_PREFIX
}
/log/php-fpm.log,' sapi/fpm/php-fpm.conf.in"
system
"sed -i 's,include=@php_fpm_sysconfdir@/php-fpm.d,include=
#{
CREW_PREFIX
}
/etc/php-fpm.d,' sapi/fpm/php-fpm.conf.in"
system
"sed -i 's,^user,;user,' sapi/fpm/www.conf.in"
system
"sed -i 's,^group,;group,' sapi/fpm/www.conf.in"
system
"sed -i 's,@sbindir@,
#{
CREW_PREFIX
}
/bin,' sapi/fpm/init.d.php-fpm.in"
system
"sed -i 's,@sysconfdir@,
#{
CREW_PREFIX
}
/etc,' sapi/fpm/init.d.php-fpm.in"
system
"sed -i 's,@localstatedir@,
#{
CREW_PREFIX
}
/tmp,' sapi/fpm/init.d.php-fpm.in"
# Set some sane defaults
system
"sed -i 's,post_max_size = 8M,post_max_size = 128M,' php.ini-development"
system
"sed -i 's,upload_max_filesize = 2M,upload_max_filesize = 128M,' php.ini-development"
system
"sed -i 's,;opcache.enable=0,opcache.enable=1,' php.ini-development"
system
"./configure \
system
"./configure \
--prefix=
#{
CREW_PREFIX
}
\
--prefix=
#{
CREW_PREFIX
}
\
--docdir=
#{
CREW_PREFIX
}
/doc \
--docdir=
#{
CREW_PREFIX
}
/doc \
...
@@ -39,11 +49,18 @@ class Php7 < Package
...
@@ -39,11 +49,18 @@ class Php7 < Package
--libdir=
#{
CREW_LIB_PREFIX
}
\
--libdir=
#{
CREW_LIB_PREFIX
}
\
--localstatedir=
#{
CREW_PREFIX
}
/tmp \
--localstatedir=
#{
CREW_PREFIX
}
/tmp \
--mandir=
#{
CREW_PREFIX
}
/man \
--mandir=
#{
CREW_PREFIX
}
/man \
--sbindir=
#{
CREW_PREFIX
}
/bin \
--with-config-file-path=
#{
CREW_PREFIX
}
/etc \
--with-libdir=
#{
libdir
}
\
--enable-fpm \
--enable-mbstring \
--enable-opcache \
--with-curl \
--with-curl \
--with-gd \
--with-gd \
--with-xsl \
--with-xsl \
--
enable-mbstring
\
--
with-mysqli
\
--with-openssl \
--with-openssl \
--with-pdo-mysql \
--with-pcre-regex \
--with-pcre-regex \
--with-readline \
--with-readline \
--with-zlib"
--with-zlib"
...
@@ -51,11 +68,36 @@ class Php7 < Package
...
@@ -51,11 +68,36 @@ class Php7 < Package
end
end
def
self
.
install
def
self
.
install
system
"mkdir -p
#{
CREW_DEST_PREFIX
}
/log"
system
"mkdir -p
#{
CREW_DEST_PREFIX
}
/tmp/run"
system
"make"
,
"INSTALL_ROOT=
#{
CREW_DEST_DIR
}
"
,
"install"
system
"make"
,
"INSTALL_ROOT=
#{
CREW_DEST_DIR
}
"
,
"install"
system
"install -Dm644 php.ini-development
#{
CREW_DEST_PREFIX
}
/etc/php.ini"
system
"install -Dm755 sapi/fpm/init.d.php-fpm.in
#{
CREW_DEST_PREFIX
}
/etc/init.d/php-fpm"
system
"install -Dm644 sapi/fpm/php-fpm.conf.in
#{
CREW_DEST_PREFIX
}
/etc/php-fpm.conf"
system
"install -Dm644 sapi/fpm/www.conf.in
#{
CREW_DEST_PREFIX
}
/etc/php-fpm.d/www.conf"
system
"ln -s
#{
CREW_PREFIX
}
/etc/init.d/php-fpm
#{
CREW_DEST_PREFIX
}
/bin/php7-fpm"
# clean up some files created under #{CREW_DEST_DIR}. check http://pear.php.net/bugs/bug.php?id=20383 for more details
# clean up some files created under #{CREW_DEST_DIR}. check http://pear.php.net/bugs/bug.php?id=20383 for more details
system
"mv"
,
"
#{
CREW_DEST_DIR
}
/.depdb"
,
"
#{
CREW_DEST_LIB_PREFIX
}
/php"
system
"mv"
,
"
#{
CREW_DEST_DIR
}
/.depdb"
,
"
#{
CREW_DEST_LIB_PREFIX
}
/php"
system
"mv"
,
"
#{
CREW_DEST_DIR
}
/.depdblock"
,
"
#{
CREW_DEST_LIB_PREFIX
}
/php"
system
"mv"
,
"
#{
CREW_DEST_DIR
}
/.depdblock"
,
"
#{
CREW_DEST_LIB_PREFIX
}
/php"
system
"rm"
,
"-rf"
,
"
#{
CREW_DEST_DIR
}
/.channels"
,
"
#{
CREW_DEST_DIR
}
/.filemap"
,
"
#{
CREW_DEST_DIR
}
/.lock"
,
"
#{
CREW_DEST_DIR
}
/.registry"
system
"rm"
,
"-rf"
,
"
#{
CREW_DEST_DIR
}
/.channels"
,
"
#{
CREW_DEST_DIR
}
/.filemap"
,
"
#{
CREW_DEST_DIR
}
/.lock"
,
"
#{
CREW_DEST_DIR
}
/.registry"
end
end
def
self
.
postinstall
puts
puts
"To start the php-fpm service, execute:"
.
lightblue
puts
"php7-fpm start"
.
lightblue
puts
puts
"To stop the php-fpm service, execute:"
.
lightblue
puts
"php7-fpm stop"
.
lightblue
puts
puts
"To restart the php-fpm service, execute:"
.
lightblue
puts
"php7-fpm restart"
.
lightblue
puts
puts
"To start php-fpm on login, execute the following:"
.
lightblue
puts
"echo 'if [ -f
#{
CREW_PREFIX
}
/bin/php7-fpm ]; then' >> ~/.bashrc"
.
lightblue
puts
"echo '
#{
CREW_PREFIX
}
/bin/php7-fpm start' >> ~/.bashrc"
.
lightblue
puts
"echo 'fi' >> ~/.bashrc"
.
lightblue
puts
"source ~/.bashrc"
.
lightblue
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment