Installing php5-ming on Dapper
I ran into a package today that I couldn’t find in the repos for Dapper. So I had to figure out a way to get it on there.
Luckily I ran into mah online, and I asked him for some dpkg-fu. He was kind enough to give me a hand getting this working. Here is what we did.
First, I added a Feisty repo to my sources.list so I could grab the source files and patch them for Debian.
echo "deb-src http://us.archive.ubuntu.com/ubuntu/ feisty main universe" >> /etc/apt/sources.list
Next we had to increase the cache size for apt so it wouldn’t choke on the new repo
echo "APT::Cache-Limit \"33554432\";" >> /etc/apt/apt.conf
Then, you can update and install the source files
sudo apt-get update
apt-get source php5-ming
This should, among other things create a directory called ming-0.3.0. Next, see what deps are missing. Install them.
cd ming-0.3.0/
debuild -uc -us -b
This will tell you all the packages you need. The only one you won’t be able to install is python-central…who cares python sucks anyway. Let’s get rid of the need for it.
vi debian/rules
Change lines 25 and 26 to
#PYDEF=$(shell pyversions -d)
#PYVERS=$(shell pyversions -r)
And lines 181 and 182 to
#dh_pycentral
#dh_python
Now we are ready to build…but we’ll have to force it.
debuild -uc -us -b -d
In the parent directory (after that finishes) there will be a bunch of deb’s. Just install the lib-ming, and the php5-ming deb’s.
sudo dpkg -i php5-ming_0.3.0-11ubuntu1_i386.deb libming0_0.3.0-11ubuntu1_i386.deb
One last thing, you have to enable the use of ming in the php.ini file
echo "extension=ming.so" >> /etc/php5/apache2/php.ini
Then restart Apache.
That’s it. You can also now take those deb’s and use them on any Dapper machine…though, as mah pointed out…I wouldn’t use the Python ones if I were you :)
