In the last days I was trying to create some packages for Slackware 14.1. I’ve created two virtual machines with VirtualBox, one for the 32 bit version and the other for the 64 bit version. These VMs have a clean Slackware installation and are intended to be used only for building packages. I’ve configured slackpkg and upgraded the system to the last patch level. In order to upgrade PHP to the last version I’ve basically followed the steps below on each VM:
Create a directory in your home called php:
$USER is an environment variable containing the name of the current logged user. You can write your user name directly if you want (i.e. mkdir /home/peter/php).
Go into your php directory and download php.SlackBuild and slack-desc files from a Slackware mirror (I suggest you to choose an ftp mirror):
# 32 bit version cd /home/$USER/php wget ftp://ftp.swin.edu.au/slackware/slackware-14.1/source/n/php/php.SlackBuild wget ftp://ftp.swin.edu.au/slackware/slackware-14.1/source/n/php/slack-desc
# 64 bit version cd /home/$USER/php wget ftp://ftp.swin.edu.au/slackware/slackware64-14.1/source/n/php/php.SlackBuild wget ftp://ftp.swin.edu.au/slackware/slackware64-14.1/source/n/php/slack-desc
Create a directory in your home called alpine:
Download the entire folder of alpine (always using wget):
# 32 bit version cd /home/$USER/alpine wget -r -nd ftp://ftp.swin.edu.au/slackware/slackware-14.1/source/n/alpine/
# 64 bit version cd /home/$USER/alpine wget -r -nd ftp://ftp.swin.edu.au/slackware/slackware64-14.1/source/n/alpine/
The -r option turns on the recursive retrieving, while the -nd option tells wget to not create a hierarchy of directories when retrieving recursively.
Become root and give execution permissions to both alpine and php SlackBuild scripts:
su chmod +x alpine.SlackBuild chmod +x ../php/php.SlackBuild
Now create the package:
cd ../php/php.SlackBuild ./php.SlackBuild
At the end you’ll find the php package in your /tmp directory.
Now, if you want to upgrade the package on another pc you only have to take a copy of your package and use the upgradepkg command (as root):
# 32 bit version upgradepkg php-5.6.2-i486-1.txz
# 64 bit version upgradepkg php-5.6.2-x86_64-1.txz
Since the Slackware philosophy is to keep unchanged the official packages provided by the distribution, you’ve to blacklist php in order to prevent warnings by slackpkg.
You can find some pre-built packages in the packages section of my Slackware stuff ;-)