Package: debhelper

I saw that the Ubuntu Live CD (Ubuntu is downstream from Debian) had a
lot of wasted space in its PNG and SVG images, and XML files. The
latest version of the Live CD, codename Lucid Lynx, stands to save 11
MB (out of 699) from PNG and SVG optimisations alone. However, some
packages break horrendously when their XML files are stripped of
whitespace.

I have proof-of-concept code [1] that deconstructs the Ubuntu Live CD
and attempts to optimise its PNG and SVG images. Ubuntu suggested that
I file a bug on debhelper to have this added to the dh_compress
debhelper so that all packages could benefit from this optimisation.
Basically, I want to do this:

dh_compress --xml .xml,.glade,.ui

--> `xmllint --noblanks --nsclean -i FILE -o FILE-opt && test -f
FILE-opt && mv FILE-opt FILE` (all files having one of those
extensions)

dh_compress --png

--> `optipng -o7 FILE` (all .png files)

dh_compress --svg

--> `scour.py [2] --enable-id-stripping --shorten-ids -i FILE -o
FILE-opt && test -s FILE-opt && mv FILE-opt FILE || rm FILE-opt` (all
.svg files)

However, I know no Perl, and dh_compress is in Perl. Any advice? Or
perhaps someone could take my proof-of-concept code and adapt it for
dh_compress? :)

If it's unacceptable to add so many Build-Depends for dh_compress,
then perhaps this suggestion could use other names, like dh_xmlopt,
dh_svgopt, dh_pngopt.

[1] https://lists.ubuntu.com/archives/ubuntu-devel-discuss/2010-May/011504.html
[2] https://code.launchpad.net/~louis-simard/scour/rework (only the
'rework' branch accepts the --shorten-ids option)



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to