11 Dec 2014, 21:20

PHP 5.6.3 (dotdeb) pour cubietruck (armhf)

On continue sur la série, après les versions PHP 5.5.x, la version 5.6.x, en m'appuyant toujours sur les packages dotdeb.

!!! Even if based on dotdeb packaging, dotdeb is not responsible in any ways for the package you may build with this method !!!

### Add dotdeb src files in /etc/apt/sources.list.d/dotdeb.list with :
deb-src http://packages.dotdeb.org wheezy all
deb-src http://packages.dotdeb.org wheezy-php56 all

### Add dotdeb key
wget http://www.dotdeb.org/dotdeb.gpg
sudo apt-key add dotdeb.gpg

### Update your package list and prepare build environment
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install build-essential fakeroot

### Get dependencies
sudo apt-get build-dep php5

### compile PHP5
cd /tmp
apt-get source --compile php5

### create own repository sudo mkdir /var/local/repository sudo echo "deb [ trusted=yes ] file:///var/local/repository ./" > /etc/apt/sources.list.d/my_own_repo.list sudo mv /tmp/*.deb /var/local/repository/ cd /var/local/repository sudo dpkg-scanpackages ./ > Packages && sudo gzip -f Packages ### Update your package list sudo apt-get update ### install PHP sudo apt-get install php5 php5-fpm php5-cli ...
### List of generated packages :

php5-common_5.6.3-1~dotdeb.1_armhf.deb
php5-intl_5.6.3-1~dotdeb.1_armhf.deb
php5-recode_5.6.3-1~dotdeb.1_armhf.deb
php5-curl_5.6.3-1~dotdeb.1_armhf.deb
php5-ldap_5.6.3-1~dotdeb.1_armhf.deb
php5-snmp_5.6.3-1~dotdeb.1_armhf.deb
libapache2-mod-php5_5.6.3-1~dotdeb.1_armhf.deb
php5-dbg_5.6.3-1~dotdeb.1_armhf.deb
php5-mcrypt_5.6.3-1~dotdeb.1_armhf.deb
php5-sqlite_5.6.3-1~dotdeb.1_armhf.deb
libapache2-mod-php5filter_5.6.3-1~dotdeb.1_armhf.deb
php5-dev_5.6.3-1~dotdeb.1_armhf.deb
php5-mysql_5.6.3-1~dotdeb.1_armhf.deb
php5-sybase_5.6.3-1~dotdeb.1_armhf.deb
libphp5-embed_5.6.3-1~dotdeb.1_armhf.deb
php5-enchant_5.6.3-1~dotdeb.1_armhf.deb
php5-mysqlnd_5.6.3-1~dotdeb.1_armhf.deb
php5-tidy_5.6.3-1~dotdeb.1_armhf.deb
php5-fpm_5.6.3-1~dotdeb.1_armhf.deb
php5-odbc_5.6.3-1~dotdeb.1_armhf.deb
php5-xmlrpc_5.6.3-1~dotdeb.1_armhf.deb
php5-gd_5.6.3-1~dotdeb.1_armhf.deb
php5-pgsql_5.6.3-1~dotdeb.1_armhf.deb
php5-xsl_5.6.3-1~dotdeb.1_armhf.deb
php5_5.6.3-1~dotdeb.1_all.deb
php5-gmp_5.6.3-1~dotdeb.1_armhf.deb
php5-phpdbg_5.6.3-1~dotdeb.1_armhf.deb
php-pear_5.6.3-1~dotdeb.1_all.deb
php5-cgi_5.6.3-1~dotdeb.1_armhf.deb
php5-imap_5.6.3-1~dotdeb.1_armhf.deb
php5-pspell_5.6.3-1~dotdeb.1_armhf.deb
php5-cli_5.6.3-1~dotdeb.1_armhf.deb
php5-interbase_5.6.3-1~dotdeb.1_armhf.deb
php5-readline_5.6.3-1~dotdeb.1_armhf.deb

Pour ensuite avoir les extensions PECL

sudo aptitute install php-pear

Récupérer les packages suivant et les mettre dans votre répertoire repository :

#Get required lib to build pecl extension as deb packages :
wget http://packages.dotdeb.org/dists/wheezy-php56/debpear/binary-all/debpear_0.4-1~dotdeb.1_all.deb
wget http://packages.dotdeb.org/dists/wheezy-php56/pear-channels/binary-all/pear-channels_0~20140806-1_all.deb
wget http://packages.dotdeb.org/dists/wheezy-php56/dh-php5/binary-all/dh-php5_0.2_all.deb
wget http://packages.dotdeb.org/dists/wheezy-php56/pkg-php-tools/binary-all/pkg-php-tools_1.21_all.deb
# Add these packages to your local repository
sudo mv *.deb /var/local/repository cd /var/local/repository sudo dpkg-scanpackages ./ > Packages && sudo gzip -f Packages
sudo aptitude update
sudo aptitude install debpear dh-php5 pkg-php-tools pear-channels

Pour imageMagick en particulier

### Get dependencies
sudo apt-get install libmagickwand-dev libmagickcore-dev imagemagick

### Grab and build pecl imagick extension package
sudo debpear -c pecl imagick

### Result
=> build-area/php5-imagick_3.1.2-1~dotdeb.1_armhf.deb

Il ne reste plus qu'à l'ajouter à votre repo local, mettre à jour le référentiel et installer le paquet :-)