Random thoughts shooting out of volatile mind
dh-make-font - A Font package helper for Debian
Recently I was doing the font transition for ttf-indic-fonts in Debian-IN team and by doing the same process again and again I really got bored. This boredom gave rise to this new tool called dh-make-font. I wish to see it in Debian but I don't know how the font and other packaging guru's of Debian react to my novice tool :). I won't call it tool because its nothing but a simple wrapper on top of dh_make which modifies the files and removes unnecessary file which is created by dh_make. I want to tell how you can use this tool to easily package a font according to the Debian Font Task Force's new packaging policy. I'll take the transition of ttf-telugu-fonts as an example here.

Note that here I assume that reader has a basic knowledge on how to use dh_make and about the common files used in Debian packaging.

First lets create a folder with name telu-extra-1.0. Since most of the font upstream in case of ttf-indic-fonts are inactive Debian-IN team itself acts as the upstream for these fonts so we don't have any tarballs to startwith.

Once we have created folder we will copy the font files from old ttf-telugu-fonts into telu-extra-1.0 folder also we will copy the 90-ttf-telugu-fonts.conf to our folder as 90-fonts-telu-extra.conf. Now we have the basic package content ready lets give a shot to dh-make-font

dh-make-font -c gpl3 --maint 'Debian-IN Team <debian-in-workers@lists.alioth.debian.org> telu-extra-1.0
Now the hard part to explain what I did :). I just ran dh-make-font on telu-extra-1.0 folder which we prepared above. As you can see -c switch is borrowed from the dh_make and all values it accepts are same. You can even give long switch --copyright if you wish :). --maint is the new option I've provided specific to dh-make-font. This option allows you to override Maintainer of package. If  you don't override Debian Fonts Task Force will be the maintainer. Did you ask why? Yes you guessed it right I prepared this tool to encourage people to maintain fonts as part of Debian Fonts Task Force team.

Besides the above option you can also specify -p / --package option to specify package name and version this will be passed over to dh_make. If you get confused just pass -h or --help option to the dh-make-font it will give you details :)

When you run above command we will see familiar questions appearing for us. Yes it is from dh_make, use your dh_make knowledge and proceed dh_make and dh-make-font will print few instructions on screen and our package is almost ready for Debian assuming dh_make didn't find something wrong in our setup. Now we need to do few minor stuffs.

1. Edit the control file and add the short and long descriptions remove fontforge build dependency as we are not building fonts from source (.sfd files).

2. Check the install and links file. Links file will be created only if there is a fontconfig related file getting installed. In our case it will be present

3. Edit the copyright file and insert copyright holders name for fonts also remove dh_make template from the file. Insert a valid dep5 Format uri


Now run your package building command. In my case I will use pbuilder to get my package ready. Wasn't that helpful? No I'm asking seriously please leave your thoughts and suggestion through comments and help me improve the tool.

This tool is actually helping me a lot. Within 20 minutes I could finish of 2 packages and get them into Debian-IN team repository. I hope it will help others too and also will get its place in Debian Fonts Task Force team

Now are you wondering where you can get the source? My bad here it is http://anonscm.debian.org/gitweb/?p=debian-in/dh-make-font.git;a=summary
Posted by: copyninja on Friday, 23 December 2011

blog comments powered by Disqus
Fork me on GitHub