Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
shivammathur committed Feb 8, 2020
0 parents commit 8d37757
Show file tree
Hide file tree
Showing 53 changed files with 181 additions and 0 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Test
on:
push:
pull_request:
jobs:
test:
name: Test PHP-${{ matrix.php-versions }} on ${{ matrix.operating-system }}
runs-on: ${{ matrix.operating-system }}
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-18.04, ubuntu-16.04]
php-versions: ['5.3', '5.4', '5.5']
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install PHP
run: |
ls
cd php-${{ matrix.php-versions }} || exit
sudo chmod a+x *.sh
./install.sh
./post-install.sh
- name: Test versions and extensions
run: |
php$ver -v | head -n 1
php-cgi$ver -v | head -n 1
php-config$ver --version
phpize$ver -v
php$ver -m
pecl -V
env:
ver: ${{ matrix.php-versions }}
release:
name: Update dist
needs: test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Package and ship
run: |
for v in 5.3 5.4 5.5; do
sudo XZ_OPT=-9 tar cfJ php-$v.tar.xz php-$v
shopt -s nullglob
for f in php-$v.tar.xz; do
sha256sum "$f" >"${f}".sha256sum.txt
done
curl --user "$BINTRAY_USER":"$BINTRAY_KEY" -X DELETE https://api.bintray.com/content/"$BINTRAY_USER"/"$BINTRAY_REPO"/php-$v.tar.xz || true
curl --user "$BINTRAY_USER":"$BINTRAY_KEY" -T php-$v.tar.xz https://api.bintray.com/content/shivammathur/php/"$v"-linux/"$v"/php-$v.tar.xz || true
curl --user "$BINTRAY_USER":"$BINTRAY_KEY" -X POST https://api.bintray.com/content/"$BINTRAY_USER"/"$BINTRAY_REPO"/"$v"-linux/"$v"/publish || true
done
env:
BINTRAY_KEY: ${{ secrets.bintray_key }}
BINTRAY_USER: shivammathur
BINTRAY_REPO: php
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/install.sh
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020 Shivam Mathur

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# PHP5 for ubuntu

<a href="https://github.com/shivammathur/php5-ubuntu" title="php5 install scripts for ubuntu"><img alt="Build status" src="https://github.com/shivammathur/php5-ubuntu/workflows/Test/badge.svg"></a>
<a href="https://github.com/shivammathur/php-builder/blob/master/LICENSE" title="license"><img alt="LICENSE" src="https://img.shields.io/badge/license-MIT-428f7e.svg"></a>
<a href="https://github.com/shivammathur/php5-debian/tree/master/dist" title="builds"><img alt="PHP Versions Supported" src="https://img.shields.io/badge/php-5.3, 5.4 and 5.5-8892BF.svg"></a>

> Scripts to install end of life PHP versions.
PHP versions in this project have reached end of life and should not be used except for testing backward-compatibility.

## Usage

### PHP 5.3
```bash
curl -sSL https://github.com/shivammathur/php5-ubuntu/releases/latest/download/install.sh | bash -s 5.3
```

### PHP 5.4
```bash
curl -sSL https://github.com/shivammathur/php5-ubuntu/releases/latest/download/install.sh | bash -s 5.4
```

### PHP 5.5
```bash
curl -sSL https://github.com/shivammathur/php5-ubuntu/releases/latest/download/install.sh | bash -s 5.5
```

## License

The code in this project is licensed under the [MIT license](http://choosealicense.com/licenses/mit/).
Please see the [license file](LICENSE) for more information.


## This project uses the following works

- [dotdeb](https://www.dotdeb.org/ "dotdeb")
Binary file added php-5.3/deps/libdb4.8_4.8.30-11ubuntu1_amd64.deb
Binary file not shown.
Binary file added php-5.3/deps/libicu44_4.4.2-2_amd64.deb
Binary file not shown.
Binary file added php-5.3/deps/libonig2_5.9.6-1_amd64.deb
Binary file not shown.
Binary file added php-5.3/deps/libreadline6_6.3-8ubuntu2_amd64.deb
Binary file not shown.
Binary file not shown.
Binary file not shown.
13 changes: 13 additions & 0 deletions php-5.3/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apt_install="sudo DEBIAN_FRONTEND=noninteractive apt-get install -o Dpkg::Options::=--force-conflicts -y --allow-downgrades --no-upgrade"
dpkg_install="sudo DEBIAN_FRONTEND=noninteractive dpkg -i --force-conflicts"
sudo mkdir -p /var/run /run/php
$dpkg_install ./deps/*.deb
$apt_install libcurl3
$dpkg_install ./*.deb
for tool in php5 php5-cgi php-config5 phpize5; do
if [ -f /usr/bin/"$tool" ]; then
tool_name=${tool/5/}
sudo cp /usr/bin/"$tool" /usr/bin/"$tool_name"5.3
sudo update-alternatives --install /usr/bin/"$tool_name" "$tool_name" /usr/bin/"$tool_name"5.3 50
fi
done
Binary file added php-5.3/php-pear_5.3.29-1~dotdeb.0_all.deb
Binary file not shown.
Binary file added php-5.3/php5-cgi_5.3.29-1~dotdeb.0_amd64.deb
Binary file not shown.
Binary file added php-5.3/php5-cli_5.3.29-1~dotdeb.0_amd64.deb
Binary file not shown.
Binary file added php-5.3/php5-curl_5.3.29-1~dotdeb.0_amd64.deb
Binary file not shown.
Binary file added php-5.3/php5-dev_5.3.29-1~dotdeb.0_amd64.deb
Binary file not shown.
Binary file added php-5.3/php5-intl_5.3.29-1~dotdeb.0_amd64.deb
Binary file not shown.
Binary file added php-5.3/php5-redis_5.3.29-1~dotdeb.0_amd64.deb
Binary file not shown.
Binary file added php-5.3/php5-xdebug_5.3.29-1~dotdeb.0_amd64.deb
Binary file not shown.
7 changes: 7 additions & 0 deletions php-5.3/post-install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
v=5.3
for tool in php$v php-cgi$v php-config$v phpize$v; do
if [ -f /usr/bin/"$tool" ]; then
tool_name=${tool/[0-9]*/}
sudo update-alternatives --set $tool_name /usr/bin/"$tool_name$v"
fi
done
Binary file added php-5.4/deps/libdb5.1_5.1.29-7ubuntu1_amd64.deb
Binary file not shown.
Binary file not shown.
Binary file added php-5.4/deps/libonig2_5.9.6-1_amd64.deb
Binary file not shown.
Binary file added php-5.4/deps/libreadline6_6.3-8ubuntu2_amd64.deb
Binary file not shown.
Binary file not shown.
Binary file not shown.
13 changes: 13 additions & 0 deletions php-5.4/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apt_install="sudo DEBIAN_FRONTEND=noninteractive apt-get install -o Dpkg::Options::=--force-conflicts -y --allow-downgrades --no-upgrade"
dpkg_install="sudo DEBIAN_FRONTEND=noninteractive dpkg -i --force-conflicts"
sudo mkdir -p /var/run /run/php
$dpkg_install ./deps/*.deb
$apt_install libcurl3
$dpkg_install ./*.deb
for tool in php5 php5-cgi php-config5 phpize5; do
if [ -f /usr/bin/"$tool" ]; then
tool_name=${tool/5/}
sudo cp /usr/bin/"$tool" /usr/bin/"$tool_name"5.4
sudo update-alternatives --install /usr/bin/"$tool_name" "$tool_name" /usr/bin/"$tool_name"5.4 50
fi
done
Binary file added php-5.4/php-pear_5.4.45-1~dotdeb+7.1_all.deb
Binary file not shown.
Binary file added php-5.4/php5-cgi_5.4.45-1~dotdeb+7.1_amd64.deb
Binary file not shown.
Binary file added php-5.4/php5-cli_5.4.45-1~dotdeb+7.1_amd64.deb
Binary file not shown.
Binary file added php-5.4/php5-curl_5.4.45-1~dotdeb+7.1_amd64.deb
Binary file not shown.
Binary file added php-5.4/php5-dev_5.4.45-1~dotdeb+7.1_amd64.deb
Binary file not shown.
Binary file added php-5.4/php5-intl_5.4.45-1~dotdeb+7.1_amd64.deb
Binary file not shown.
Binary file added php-5.4/php5-redis_5.4.45-1~dotdeb+7.1_amd64.deb
Binary file not shown.
Binary file not shown.
Binary file not shown.
9 changes: 9 additions & 0 deletions php-5.4/post-install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
v=5.4
for tool in php$v php-cgi$v php-config$v phpize$v; do
if [ -f /usr/bin/"$tool" ]; then
tool_name=${tool/[0-9]*/}
sudo update-alternatives --set $tool_name /usr/bin/"$tool_name$v"
fi
done
sudo php5enmod redis
sudo php5enmod xdebug
Binary file added php-5.5/deps/libdb5.1_5.1.29-7ubuntu1_amd64.deb
Binary file not shown.
Binary file not shown.
Binary file added php-5.5/deps/libonig2_5.9.6-1_amd64.deb
Binary file not shown.
Binary file added php-5.5/deps/libreadline6_6.3-8ubuntu2_amd64.deb
Binary file not shown.
Binary file not shown.
Binary file not shown.
15 changes: 15 additions & 0 deletions php-5.5/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apt_install="sudo DEBIAN_FRONTEND=noninteractive apt-get install -o Dpkg::Options::=--force-conflicts -y --allow-downgrades"
dpkg_install="sudo DEBIAN_FRONTEND=noninteractive dpkg -i --force-conflicts"
sudo mkdir -p /var/run /run/php
$dpkg_install ./deps/*.deb
if [ "$(lsb_release -s -r)" = "18.04" ]; then
$apt_install libcurl3
fi
$dpkg_install ./*.deb
for tool in php5 php5-cgi php-config5 phpize5; do
if [ -f /usr/bin/"$tool" ]; then
tool_name=${tool/5/}
sudo cp /usr/bin/"$tool" /usr/bin/"$tool_name"5.5
sudo update-alternatives --install /usr/bin/"$tool_name" "$tool_name" /usr/bin/"$tool_name"5.5 50
fi
done
Binary file added php-5.5/php-pear_5.5.38-1~dotdeb+7.1_all.deb
Binary file not shown.
Binary file added php-5.5/php5-cgi_5.5.38-1~dotdeb+7.1_amd64.deb
Binary file not shown.
Binary file added php-5.5/php5-cli_5.5.38-1~dotdeb+7.1_amd64.deb
Binary file not shown.
Binary file added php-5.5/php5-curl_5.5.38-1~dotdeb+7.1_amd64.deb
Binary file not shown.
Binary file added php-5.5/php5-dev_5.5.38-1~dotdeb+7.1_amd64.deb
Binary file not shown.
Binary file added php-5.5/php5-intl_5.5.38-1~dotdeb+7.1_amd64.deb
Binary file not shown.
Binary file added php-5.5/php5-redis_5.5.38-1~dotdeb+7.1_amd64.deb
Binary file not shown.
Binary file not shown.
9 changes: 9 additions & 0 deletions php-5.5/post-install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
v=5.5
for tool in php$v php-cgi$v php-config$v phpize$v; do
if [ -f /usr/bin/"$tool" ]; then
tool_name=${tool/[0-9]*/}
sudo update-alternatives --set $tool_name /usr/bin/"$tool_name$v"
fi
done
sudo php5enmod redis
sudo php5enmod xdebug

0 comments on commit 8d37757

Please sign in to comment.