il y a la bibliothèque libdpkg-perl qui pourrait peut-être t'intéresser:
didier@hp-notebook14:~$ apt show libdpkg-perl
Package: libdpkg-perl
[...]
Description: Dpkg perl modules
This package provides the perl modules used by the scripts
in dpkg-dev. They cover a wide range of functionality. Among them
there are the following public modules:
[...]
- Dpkg::Control: parse and manipulate Debian control information
(.dsc, .changes, Packages/Sources entries, etc.)
- Dpkg::Control::Changelog: represent fields output by
dpkg-parsechangelog
- Dpkg::Control::Fields: manage (list of known) control fields
- Dpkg::Control::Hash: parse and manipulate a block of RFC822-like fields
- Dpkg::Control::Info: parse files like debian/control
- Dpkg::Control::Tests: parse files like debian/tests/control
- Dpkg::Control::Tests::Entry: represents a debian/tests/control stanza
[...]