Note
This description is not yet finished!
Table of contents
paps is a nice tool for creating Postscript files.
I'm using it within rcmpd to print the MPD playlists on a printer.
So I had to implement a missing feature myself:
I wanted to have an individual title on the printing, not the filename or the string "stdin" (when using a pipe).
The fix in the C program itself was easy - although C isn't a language I often use.
But I never created/modified a Debian package before.
So it was a little adventure I'll try to document here...
paps at Debian: https://packages.qa.debian.org/p/paps.html; https://tracker.debian.org/pkg/paps
todo: list the other websites used as source
First there are some tools to install for compiling. Probably there are more than those...
todo: get more details (gcc, make etc)
As root (or via sudo):
apt-get update apt-get upgrade apt-get install fakeroot apt-get install devscripts
Then the dependencies for the package in question:
apt-get build-dep paps
Finally (now as normal user) the package sources:
apt-cache show paps cd mkdir my_build cd my_build apt-get source paps
Now we try to compile the original source to be sure to be prepared:
cd ~/my_build cd paps-0.6.8 less debian/changelog dpkg-buildpackage -rfakeroot -us -uc
To have a working copy:
cd ~/my_build cp -r paps-0.6.8 paps-0.6.8-work
Edit the source file(s):
cd ~/my_build/paps-0.6.8-work vi src/paps.c
Compile and edit until finished:
make
Clean up the binaries:
make clean
In the original directory too, if needed:
cd ~/my_build/paps-0.6.8/src make clean
Create a patch/diff between original and your work:
cd ~/my_build diff -Naur -x '*.*[ao]' -x Makefile paps-0.6.8/src paps-0.6.8-work/src > paps-0.6.8/debian/patches/title-option
Add the created patch to the series file for activation:
cd paps-0.6.8 echo "title-option" >> debian/patches/series
Add an appropriate entry (with new version number) to the changelog:
vi debian/changelog
Add some documentation to the patchfile:
vi debian/patches/title-option
Here is the patch file.
Build the package:
dpkg-buildpackage -us -uc
Install new package (with root rights by sudo):
sudo dpkg -i paps_0.6.8-6a_armhf.deb libpaps0_0.6.8-6a_armhf.deb libpaps-dev_0.6.8-6a_armhf.deb