[pkg-php-pear] Example to package composer package

David Prévot david at tilapin.org
Thu Feb 10 15:27:29 GMT 2022


Hi Fab,

Le 10/02/2022 à 10:28, Fab a écrit :

> How to package a composer package for Debian? I've seen that there is
> dh_phpcomposer in pkg-php-tools and [1], but how to use it, name the
> package...

There is dh_phpcomposer(1) (that also points to 
/usr/share/doc/pkg-php-tools/README.Composer), but that may be a bit 
old. For the name, it’s usually easier if it matches the way 
dh_phpcomposer(1) translates it from the name as provided in 
composer.json (but overrides are possible).

> What about the dependencies? Will they be packaged automatically, or will the
> dependencies be automatically added?

The latter (you’ll need to get the dependencies packaged), you may also 
have a look at phpabtpl(1) to help providing an autoload.php.

> Can you recommend an existing Debian package that I could use as a base? Or
> maybe some additional documentation?

You may look at a package recently uploaded, extra points if it looks 
like what you are currently aiming at packaging. Maybe 
php-doctrine-common is straightforward enough.

> I would need three packages [2] and I can't find them in Debian.
[…]
> https://packagist.org/packages/paragonie/random_compat

That’s php-random-compat. The version currently in experimental provides 
/usr/share/pkg-php-tools/{autoloaders,overrides}/php-random-compat to 
help dh_phpcomposer(1) and phpabtpl(1) find the correct package name and 
path.

Regards

David
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 495 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-php-pear/attachments/20220210/62247079/attachment.sig>


More information about the pkg-php-pear mailing list