<commit_before>#!/bin/bash
# Build PHP-FPM Package

# Get the current script path
SCRIPTPATH=`pwd -P`
RELEASE=$(lsb_release --codename | cut -f2)
VERSION=$1

# Build the package in tmp
rm -rf /tmp/php*
cd /tmp

# Download and Extract the ARchive
wget http://us1.php.net/get/php-$VERSION.tar.gz/from/this/mirror -O php-$VERSION.tar.gz
tar -xf php-$VERSION.tar.gz


cd $SCRIPTPATH
echo "Copying init.d and checkinstall file"
cp init-php-fpm /etc/init.d/php-fpm
cp init-php-fpm /tmp/php-$VERSION/init-php-fpm
cp setup /tmp/php-$VERSION/setup

# Copy the Script Paths
cd /tmp/php-$VERSION
cp $SCRIPTPATH/*-pak .

./configure  '--with-libdir=lib64' '--with-config-file-path=/etc/php' '--with-config-file-scan-dir=/etc/php/conf.d' '--with-pic' '--without-gdbm' '--with-gettext' '--with-iconv' '--with-openssl' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--with-kerberos' '--enable-shmop' '--enable-calendar' '--with-mysql' '--with-gd' '--with-mcrypt' '--enable-pdo' '--with-pdo-mysql=mysqlnd' '--enable-json' '--with-curl' '--enable-fpm' '--enable-mbstring' '--enable-inline-optimization' '--enable-pcntl' '--enable-mbregex' '--with-mhash' '--with-pcre-regex' '--with-fpm-user=www-data' '--enable-zip' '--with-mysqli=mysqlnd' '--with-sqlite3' '--with-readline' '--enable-opcache' '--enable-soap' '--with-jpeg-dir' '--with-png-dir'

# Install the init script
$(which update-rc.d) /etc/init.d/php-fpm defaults

mkdir -p /etc/php/conf.d
make -j2
make install

cd /tmp/php-$VERSION
sudo checkinstall -D -pkgname php-fpm  -pkglicense PHP -pkggroup PHP -maintainer <EMAIL> -provides "php-fpm, php-fpm-5.6"  -requires "libxml2, libxml2-dev, libcurl4-openssl-dev, libmcrypt-dev, libmcrypt4, libjpeg-turbo8, libjpeg-turbo8-dev, libpng12-dev, libltdl-dev, libreadline-dev" -replaces "php-fpm-5.5" -conflicts "php, php-common" -pakdir /tmp/ -y sh /tmp/php-$VERSION/setup

mv /tmp/php-fpm_$VERSION-1_amd64.deb /tmp/php-fpm_$VERSION-1_amd64_$RELEASE.deb<commit_msg>Updating PHP for cross lsb_release builds<commit_after>#!/bin/bash
# Build PHP-FPM Package

# Get the current script path
SCRIPTPATH=`pwd -P`
RELEASE=$(lsb_release --codename | cut -f2)
VERSION=$1

# Build the package in tmp
rm -rf /tmp/php*
cd /tmp

# Download and Extract the ARchive
wget http://us1.php.net/get/php-$VERSION.tar.gz/from/this/mirror -O php-$VERSION.tar.gz
tar -xf php-$VERSION.tar.gz


cd $SCRIPTPATH
echo "Copying init.d and checkinstall file"
cp init-php-fpm /etc/init.d/php-fpm
cp init-php-fpm /tmp/php-$VERSION/init-php-fpm
cp setup /tmp/php-$VERSION/setup

# Copy the Script Paths
cd /tmp/php-$VERSION
cp $SCRIPTPATH/*-pak .

./configure  '--with-libdir=lib64' '--with-config-file-path=/etc/php' '--with-config-file-scan-dir=/etc/php/conf.d' '--with-pic' '--without-gdbm' '--with-gettext' '--with-iconv' '--with-openssl' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--with-kerberos' '--enable-shmop' '--enable-calendar' '--with-mysql' '--with-gd' '--with-mcrypt' '--enable-pdo' '--with-pdo-mysql=mysqlnd' '--enable-json' '--with-curl' '--enable-fpm' '--enable-mbstring' '--enable-inline-optimization' '--enable-pcntl' '--enable-mbregex' '--with-mhash' '--with-pcre-regex' '--with-fpm-user=www-data' '--enable-zip' '--with-mysqli=mysqlnd' '--with-sqlite3' '--with-readline' '--enable-opcache' '--enable-soap' '--with-jpeg-dir' '--with-png-dir'

# Install the init script
$(which update-rc.d) /etc/init.d/php-fpm defaults

mkdir -p /etc/php/conf.d
make -j2
make install

cd /tmp/php-$VERSION
sudo checkinstall -D--fstrans -pkgrelease 1-"$RELEASE" -pkgname php-fpm  -pkglicense PHP -pkggroup PHP -maintainer <EMAIL> -provides "php-fpm, php-fpm-5.6"  -requires "libxml2, libmcrypt4, libjpeg-turbo8" -replaces "php-fpm-5.5" -conflicts "php, php-common" -pakdir /tmp/ -y sh /tmp/php-$VERSION/setup

mv /tmp/php-fpm_$VERSION-1_amd64.deb /tmp/php-fpm_$VERSION-1_amd64_$RELEASE.deb
{'fraction_non_alphanumeric': 0.2054013875123885, 'fraction_numerical': 0.011397423191278493, 'mean_word_length': 3.5359550561797755, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 3}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '47689', 'n_tokens_mistral': 1719, 'n_tokens_neox': 1651, 'n_words': 321}